39 Gs Using Matrices
39 Gs Using Matrices
hp calculators
Matrices are stored and edited in the Matrix Catalog. It can hold matrices that are vectors or contain complex numbers. Once
defined, a matrix or vector can be used or manipulated in any other view. Some extremely powerful matrix functions are included in
the MATH menu. It can be cleared using SHIFT CLEAR.
Figure 1
! 2 3" !0 4" !1
Given that A=# $ and B = # $ , find the value of B A
& %1 4 ' %2 3&
Enter the Matrix Catalog by pressing SHIFT MATRIX. With the highlight on M1, press EDIT. Enter the values 2 and 3, pressing
ENTER after each. Press down arrow to begin a new line and enter the values –1 and 4. Leave the edit view by pressing SHIFT
MATRIX again. Use the same method to create M2.
Figure 2 Figure 3
Now in the HOME view, perform the calculation by typing ALPHA M 2 X-1 * ALPHA M1. Then store the solution in M3 in case it is
required later. The value displayed can be viewed more easily using SHOW.
Figure 4 Figure 5
Systems of simultaneous linear equations of any size can be solved either with an inverse matrix or using the function RREF from
the MATH menu.
A B C Value
The sales of type A, B and C computers for three successive weeks are shown right. Find the Week 1 2 0 4 $12,900
prices of each type of computer. Week 2 3 5 0 $13,335
Week 3 1 4 2 $13,950
!2 0 4" ! A" !12900 "
This system of equations can be represented in matrix form as: # $ # $ # $
# 3 5 0 $ % # B $ = #13335$
#&1 4 2 $' #&C $' #&13950 $'
If we enter the first matrix as M1 and the values as M3 then the solution is M1-1*M3.
Change to the Matrix Catalog and enter the M1 as outlined on the previous page. Before entering the values into M2, press shift key
3 to change it to GO->. This moves the cursor down instead of right after each entry.
Figure 6 Figure 7
Rounding error may make it difficult to see the solution in the HOME view. Viewing M3 is probably the better option.
Figure 8 Figure 9
If there is no valid solution then the matrix inverse will not exist, as shown below.
Figure 10
Here it is better to use the RREF function (Reduced Row Echelon Form). It acts on an augmented matrix and its advantage is that it
will work even if the equations are inconsistent. Three cases can result, as below.
Figure 12 Figure 13
Case 2: No solution
2x + y ! z = 2 " " 2 1 !1 2 #
#
3 x + 5 y = !1$ becomes $$ 3 5 0 !1%%
x + 4 y + z = 3 #% $&1 4 1 3 %'
Figure 14
In this case the final line of the reduced row echelon matrix is [ 0 0 0 1 ], hence no solution.
Figure 15 Figure 16
This case is similar to that of no solution but the final line of the reduced row echelon matrix will be [ 0 0 0 0 ], which corresponds to
the case of infinite solutions.
Although it is possible to find roots of any graph by using the PLOT view and FCN, the MATH menu provides a function called
POLYROOT which will find all the roots of any polynomial in one operation.
Figure 17
Coefficients must be supplied in the form of a row vector using square brackets and solutions are returned the same form. If any of
the roots are complex then the entire set will be returned in complex form (a,b) as in the example below.
Figure 18 Figure 19
Note: A worthwhile tip here is to store the solution vector into a matrix variable. This allows easy viewing of the solutions, both real
and complex.