Chapter Matrix Calculations 26 matrix memories (Mat A through Mat Z) plus a Matrix Answer Memory (MatAns), make it possible to perform the following matrix operations.
6-1 Before Performing Matrix Calculations In the Main Menu, select the MAT icon to enter the Matrix Mode and display its initial screen. 2 (row) × 2 (column) matrix Not dimension preset • {DEL}/{DEL·A} ... deletes {a specific matrix}/{all matrices} • The maximum number of rows that can be specified for a matrix is 255, and the maximum number of columns is 255. k About Matrix Answer Memory (MatAns) The calculator automatically stores matrix calculation results in Matrix Answer Memory.
Before Performing Matrix Calculations 6-1 Specify the number of rows. cw Specify the number of columns. d w • All of the cells of a new matrix contain the value 0. • If “Mem ERROR” remains next to the matrix area name after you input the dimensions, it means there is not enough free memory to create the matrix you want. uTo input cell values Example To input the following data into Matrix B : 1 4 2 3 5 6 Select Mat B.
6-1 Before Performing Matrix Calculations k Deleting Matrices You can delete either a specific matrix or all matrices in memory. uTo delete a specific matrix 1. While the MATRIX list is on the display, use f and c to highlight the matrix you want to delete. 2. Press 1 (DEL). 3. Press 1 (YES) to delete the matrix or 6 (NO) to abort the operation without deleting anything. • The indicator “None” replaces the dimensions of the matrix you delete. uTo delete all matrices 1.
6-2 Matrix Cell Operations Use the following procedure to prepare a matrix for cell operations. 1. While the MATRIX list is on the display, use f and c to highlight the name of the matrix you want to use. 2. Press w and the function menu with the following items appears. • {R·OP} ... {row calculation menu} • {ROW}/{COL} ... {row}/{column} operation menu All of the following examples use Matrix A recalled by the above operation.
-2 Matrix Cell Operations uTo calculate the product of a row Example To calculate the product of row 2 of the following matrix and the scalar 4 : Matrix A = 1 2 3 4 5 6 1(R·OP)2(×Rw) Input multiplier value. ew Specify row number. cw uTo calculate the product of a row and add the result to another row Example To calculate the product of row 2 of the following matrix and the scalar 4, then add the result to row 3 : Matrix A = 1 2 3 4 5 6 1(R·OP)3(×Rw+) Input multiplier value.
Matrix Cell Operations 6-2 k Row Operations The following menu appears whenever you press 2 (ROW) while a recalled matrix is on the display. • {DEL} ... {delete row} • {INS} ... {insert row} • {ADD} ...
6-2 Matrix Cell Operations uTo add a row Example To add a new row below row 3 of the following matrix : Matrix A = 1 2 3 4 5 6 2(ROW)cc 3(ADD) k Column Operations The following menu appears whenever you press 3 (COL) while a recalled matrix is on the display. • {DEL} ... {delete column} • {INS} ... {insert column} • {ADD} ...
Matrix Cell Operations 6-2 uTo insert a column Example To insert a new column between columns 1 and 2 of the following matrix : Matrix A = 1 2 3 4 5 6 3(COL)e 2(INS) uTo add a column Example To add a new column to the right of column 2 of the following matrix : Matrix A = 1 2 3 4 5 6 3(COL)e 3(ADD) 87
6-3 Modifying Matrices Using Matrix Commands [OPTN]-[MAT] uTo display the matrix commands 1. From the Main Menu, select the RUN icon and press w. P.27 2. Press K to display the option menu. 3. Press 2 (MAT) to display the matrix operation menu. The following describes only the matrix command menu items that are used for creating matrices and inputting matrix data. • {Mat} ... {Mat command (matrix specification)} P.91 • {M→L} ...
Modifying Matrices Using Matrix Commands w 6-3 Matrix name • An error occurs if memory becomes full as you are inputting data. • You can also use the above format inside a program that inputs matrix data. uTo input an identity matrix Use the matrix operation menu’s Identity command (1) to create an identity matrix.
6-3 Modifying Matrices Using Matrix Commands k Modifying Matrices Using Matrix Commands You can also use matrix commands to assign values to and recall values from an existing matrix, to fill in all cells of an existing matrix with the same value, to combine two matrices into a single matrix, and to assign the contents of a matrix column to a list file.
Modifying Matrices Using Matrix Commands Example 2 6-3 To combine the following two matrices : A= 1 B= 2 3 4 K2(MAT)5(Aug)1(Mat) aA,1(Mat)aBw • The two matrices you combine must have the same number of rows. An error occurs if you try to combine two matrices that have different numbers of rows. uTo assign the contents of a matrix column to a list file Use the following format with the matrix operation menu’s Mat→List command (2) to specify a column and a list file.
6-4 Matrix Calculations [OPTN]-[MAT] Use the matrix command menu to perform matrix calculation operations. uTo display the matrix commands 1. From the Main Menu, select the RUN icon and press w. P.27 2. Press K to display the option menu. 3. Press 2 (MAT) to display the matrix command menu. The following describes only the matrix commands that are used for matrix arithmetic operations. • {Mat} ... {Mat command (matrix specification)} • {Det} ... {Det command (determinant command)} • {Trn} ...
Matrix Calculations 6-4 • The two matrices must have the same dimensions in order to be added or subtracted. An error occurs if you try to add or subtract matrices of different dimensions. • For multiplication, the number of columns in Matrix 1 must match the number of rows in Matrix 2. Otherwise, an error occurs. • You can use an identity matrix in place of Matrix 1 or Matrix 2 in the matrix arithmetic format. Use the matrix command menu’s Identity command (1) to input the identity matrix.
6-4 Matrix Calculations Example Obtain the determinant for the following matrix : 1 2 4 5 6 –1 –2 0 Matrix A = 3 3(Det)1(Mat)aAw • Determinants can be obtained only for square matrices (same number of rows and columns). Trying to obtain a determinant for a matrix that is not square produces an error. • The determinant of a 2 × 2 matrix is calculated as shown below. |A|= a11 a12 = a11a22 – a12a21 a21 a22 • The determinant of a 3 × 3 matrix is calculated as shown below.
Matrix Calculations 6-4 k Matrix Inversion Matrix Mat A !X Mat Z MatAns Example w To invert the following matrix : Matrix A = 1 2 3 4 1(Mat)aA!Xw • Only square matrices (same number of rows and columns) can be inverted. Trying to invert a matrix that is not square produces an error. • A matrix with a value of zero cannot be inverted. Trying to invert a matrix with value of zero produces an error. • Calculation precision is affected for matrices whose value is near zero.
6-4 Matrix Calculations k Squaring a Matrix Matrix Mat A Mat Z MatAns Example x w To square the following matrix : Matrix A = 1 2 3 4 1(Mat)aAxw k Raising a Matrix to a Power Matrix Natural number Mat A Mat Z MatAns Example M k w To raise the following matrix to the third power : Matrix A = 1 2 3 4 1(Mat)aAMdw k Determining the Absolute Value, Integer Part, Fraction Part, and Maximum Integer of a Matrix Function command Abs Frac Int Intg 96 Matrix Mat A Mat Z MatAns w
Matrix Calculations Example 6-4 To determine the absolute value of the following matrix : Matrix A = 1 –2 –3 4 K6(g)4(NUM)1(Abs) K2(MAT)1(Mat)aAw • Determinants and inverse matrices are calculated using the elimination method, so errors (such as dropped digits) may be generated. • Matrix operations are performed individually on each cell, so calculations may require considerable time to complete.
98