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:
  1. Select { MAT } from the MATHEMATICS menu.
    The program displays the MATRIX ALGEBRA menu.
  2. Press { LIN }.
    The program displays:
    D_CJ88rl
  3. 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:
D_0YRNv1
To begin entering the A matrix:
  1. Enter the number of rows (or simultaneous equations) in the matrix and press { n }.
  2. Press { EOD } to proceed.
    The program prompts you for the first values in the A matrix, one column at a time.
    D_MvADQ3
  3. 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:
D_8mWmf6
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:
  1. Enter the row number of the value and press the [ x~t ] key to store the number in the t-register.
  2. Enter the column number of the value and press { i~j }.
    The program displays the current value.
  3. Enter the new value and press { ENT }. If the displayed value is already correct, press { ENT }.
  4. 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.
D_rRZzdm
{ 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:
  1. 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.
    D_XbVU9x
    The display scrolls to the left until the entire value is in view, for example:
    D_DIXmWC
  2. Press { NXT } to display each remaining value in the matrix.
  3. Press { ESC } to return to the SELECT OPTION menu.

Solving the System

To enter a constant vector (matrix B) and solve the system:
  1. Select { SYS } from the SELECT OPTION menu.
    The program prompts you to enter the first value in the constant vector.
    D_qaub0Z
  2. Enter all values in the vector, pressing { ENT } after each value.
    After you have entered all the values, the program displays:
    D_E6Kqou
  3. 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.
  4. 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.
    D_qaub0Z
  5. 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.
  6. 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:
    D_FvLaWg
  7. Press { NXT } to display the solution for each remaining variable.
  8. 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:
  1. Select { det } from the SELECT OPTION menu.
    The program displays the value of the determinant, for example:
    D_y4vBOi
  2. Press { ESC } to return to the SELECT OPTION menu.


Back