Solving the equation ax = b – HP 15c User Manual

Page 156

Advertising
background image

156 Section 12: Calculating with Matrices

Solving the Equation AX = B

The ÷ function is useful for solving
matrix equations of the form AX = B,
where A is the coefficient matrix, B is
the constant matrix, and X is the
solution matrix. The descriptor of the
constant matrix B should be entered in
the Y-register and the descriptor of the
coefficient matrix A should be entered
in the X-register Pressing ÷ then
calculates the solution X=A

-1

B.

*

Remember that the ÷ function replaces the coefficient matrix by its LU
decomposition and that this matrix must not be specified as the result
matrix. Furthermore, using ÷ rather than ∕ and * gives a solution
faster and with improved accuracy.

At the beginning of this section, you found the solution for a system of
linear equations in which the constant matrix and the solution matrix each
had one column. The following example illustrates that you can use the HP-
15C to find solutions for more than one set of constants—that is, for a
constant matrix and solution matrix with more than one column.

Example: Looking at his receipts for his
last three deliveries of cabbage and
broccoli, Silas Farmer sees the following
summary.

* If A is a singular matrix (that is, one that doesn’t have an inverse), then the HP-15C modifies the LU form

of A by an amount that is usually small compared to round-off error. The calculated solution corresponds
to that for a nonsingular coefficient matrix close to the original, singular matrix.

Y

constant matrix

X

coefficient

matrix

Advertising