The Inversion/Linear Systems Program
This program performs matrix inversion, solves a system of simultaneous equations, or calculates the determinant of a matrix.
Introduction
The Inversion/Linear Systems program has three options that can be used individually or in succession to perform matrix operations. Each option uses the upper-lower decomposition method to perform its operation. The program accepts one nth order matrix (n rows and n columns).You must partition the calculator for at least 11 + n2 + n registers for the inversion or determinant options, or for at least 11 + n2 + 3n for the simultaneous equations option.
You enter the elements of the matrix and then select an option. The simultaneous equations or determinant options do not affect the stored matrix. However, the inversion option replaces the stored matrix with the result of the inversion.
You can save the A matrix as a data file, provided you save the matrix immediately after entering (and, if necessary, editing) it. To save the A matrix, you must specify 11 + n2 data registers, starting with register 000. For information on saving data as a file, refer to the RPD-95 Programming Guide.
Reference
Applied Numerical Analysis, Curtis F. Gerald, Addison-Wesley Publishing Co., 1970.Before Starting the Program
If you have previously saved the A matrix as a file and want to use that data, you must load the data into the data registers before running the Inversion/Lineary Systems program. For information on loading a data file, refer to the RPD-95 Programming Guide.Starting the Program
To start the Inversion/Lineary Systems program:- Select { MAT } from the
MATHEMATICS menu.
The program displays the MATRIX ALGEBRA menu. - Press { LIN }.
The program displays:
- Select the option that applies to your data.
- To enter a new matrix, press { NEW } and proceed to "Entering the A Matrix" below.
- To use data you have loaded from the file space or from storage, press { OLD } and proceed to "Selecting the Options" below.
Entering the A Matrix
When you select { NEW } from the INV/LINEAR SYS menu, the program displays:To begin entering the A matrix:
- Enter the number of rows (or simultaneous equations) in the matrix and press { n }.
- Press { EOD } to proceed.
The program prompts you for the first values in the A matrix, one column at a time.
- Enter all the values, press { ENT } after each value.
The Edit Menu
After you have entered all the values for the A matrix, the program displays:If you have no changes to make, press { EOD } and proceed to "Selecting Options" below.
If you want to edit a value in the A matrix, use the editing procedure described in "Editing a Value in the Matrix" below.
Editing a Value in the Matrix
To edit a value:- Enter the row number of the value and press the [ x~t ] key to store the number in the t-register.
- Enter the column number of the value and press { i~j
}.
The program displays the current value. - Enter the new value and press { ENT }. If the displayed value is already correct, press { ENT }.
- Press { EOD } to leave the EDIT menu.
Selecting Options
After you press { EOD } to leave the EDIT menu, the program displays a menu to let you choose your next option. If you want to save the A matrix as a data file, you must save it before proceeding with the program.{ INV } - Calculates the inverse of the A matrix. See "Calculating the Inverse" below.
{ SYS } - Lets you enter a constant vector (matrix B) and then solves the system. See "Solving the System" below.
{ det } - Calculates the determinant of the A matrix. See the section on "Calculating the Determinant" below.
{ ESC } - Returns to the INV/LINEAR SYS menu.
Calculating the Inverse
To calculate the inverse of the A matrix:- Select { INV } from the SELECT
OPTION menu.
• If there is no inverse (the determinant = 0), the program displays the message SINGULAR.
• If there is an inverse, the program lets you examine each value in the resulting matrix, starting with the elements in the first column.
The display scrolls to the left until the entire value is in view, for example:
- Press { NXT } to display each remaining value in the matrix.
- Press { ESC } to return to the SELECT OPTION menu.
Solving the System
To enter a constant vector (matrix B) and solve the system:- Select { SYS } from the SELECT
OPTION menu.
The program prompts you to enter the first value in the constant vector.
- Enter all values in the vector, pressing { ENT
} after each value.
After you have entered all the values, the program displays:
- Decide whether you need to correct any of the values.
• If you have changes to make, proceed to step 4.
• If you have no changes to make, proceed to step 6. - To edit the values you have entered for the constant vector,
select { YES } from the EDIT?
menu.
The program displays the same menu you use to enter the values.
- Make any necessary changes in the vector.
• To display the current value, press the [ CE ] key.
• To accept the current value and proceed to the next value, press { ENT }.
• To edit the current value, enter the correct value and press { ENT }.
When you have finished editing the column, the program returns to the EDIT? menu. - To display the solutions, select { NO } from
the EDIT? menu.
• If there is no solution, the program displays the message SINGULAR.
• If there is a solution, the program displays the solution for each variable, beginning with the first variable, for example:
- Press { NXT } to display the solution for each remaining variable.
- When you have displayed all solutions, press { ESC } to return to the SELECT OPTION menu.
Calculating the Determinant
To calculate the determinant of the A matrix:- Select { det } from the SELECT
OPTION menu.
The program displays the value of the determinant, for example:
- Press { ESC } to return to the SELECT OPTION menu.
☚ Back