beautypg.com

Determining the accuracy of a matrix solution – HP 48g Graphing Calculator User Manual

Page 181

Attention! The text in this document has been recognized automatically. To view the original document, you can use the "Original mode".

background image

Determining the Accuracy of a Matrix Solution

There are two approaches to evaluating the accuracy of a computed

matrix solution when you suspect that you may be using singular or
ilhconditioned matrices:

■ Compute the residual array. This array is the result of substituting

the computed solution back into the original equation. The closer
the residual array is to being an array of zero elements, the more
accurate the solution.

B Use the condition nmnber. The condition number can be used to

estimate the number of accurate digits that can be expected using a
given matrix.

To

find

the

residuals for

a computed solution to

a

system

of

linear

equations (AX=B|:

1. Enter the array (vector or matrix) of constants (B) onto the stack.

2. Enter the matrix of coefficients (A).
3. Enter the computed solution array (must be of the same type and

dimensions as the constants array)(X).

4. Press either

(MTHI

M

h

T R

(NXT)

R S D (or

SOLVE)

S Y S

R S D ). The resulting array of residuals (AX-B) shows how close

the computed solution was to an actual solution—the smaller the

absolute value of the elements, the better the solution.

To approximate

the number

of

accurate digits in a computed

soiutiOEi:

14

1. If the elements in the matrix A are exact, enter 15, the maximum

number of digits computed internally by the HP 48, onto the

stack. If the elements in matrix A were rounded to 12 digits (from

previous computations, for example), then enter 12.

2. Enter the matrix of coefficients (A).
3. Press

[MTH

1 M F i T R N O R M C O N D to find the condition number

of the matrix.

4. Press fr^(LOG ) |3 to find the approximate number of accurate

digits in a solution computed using the given matrix of coefficients.

This is merely a rough, rule-of-thumb estimate of a solution’s

accuracy and not a precise computation of it.

Matrices and Linear Algebra 14-17

This manual is related to the following products: