The Matrix Product Program


This program multiplies two matrices. You can save one of the matrices for future use.


Introduction

The Matrix Product program multiplies matrix A by matrix B to result in matrix C. The size of matrix A is M x N, the size of matrix B is N x P, and the size of matrix C is M x P.

Before running the program, you must partition the calculator for at least 10 + ( M + 1 ) ( N + 1 ) data registers.

After you enter the complete matrix A, the program prompts you for the first column of matrix B. When you have entered that column, the program generates the first column of matrix C. Then you enter the second column of matrix B and obtain the second column of matrix C. The column-by-column pattern continues until the last column of matrix B is multiplied with matrix A.

You can reuse matrix A for additional multiplications. However, matrix C is not available for further multiplication unless you enter each element as a new matrix A.

You can save matrix A as a data file anytime after entering (and, if necessary, editing) the matrix. To save matrix A, you must specify 10 + N x M data registers, starting with register 000. For information on saving data as a file, refer to the RPD-95 Programming Guide.

Reference

Advanced Engineering Mathematics, C. R. Wylie, Jr., McGraw-Hill Book Company, 1966.

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 Matrix Product program. For information on loading a data file, refer to the RPD-95 Programming Guide.

Starting the Program

To start the Matrix Product program:
  1. Select { MAT } from the MATHEMATICS menu.
    The program displays the MATRIX ALGEBRA menu.
  2. Press { A*B }
    The program displays
    D_dfuYdi
  3. Select the option that applies to your data.
  • To enter a new matrix, press { NEW } and proceed to the section on using new data below.
  • To use data you have loaded from the file space or from a storage device, press { OLD } and proceed to the section on using old data below.

If Using Old Data

If you select { OLD } from the MATRIX PRODUCT menu, the program displays:
D_1StuJL
  1. Enter the number of columns in the B matrix and press { cB }.
  2. Press { EOD }.
  3. Proceed to the section below labeled "Entering a Column in the B Matrix".

If Entering New Data

If you are specifying new values for the A matrix, the program displays:
D_lE9DRL
  1. Enter the number of rows in the A matrix and press { rA }.
  2. Enter the number of columns in the A matrix and press { cA }.
  3. Enter the number of columns in the B matrix and press { cB }.
  4. Press { EOD } to indicate you have entered the data.

Entering the A Matrix

When you press { EOD }, the program prompts you for the values in the A matrix, one column at a time.
D_tm13O1
Enter all the values for the A matrix, pressing { ENT } after each value.

The Edit Menu

After you have entered all the values, the program displays:
D_EOcxPF
  • If you have no changes to make, press { EOD } and proceed to the section below labeled "Entering a Column in the B Matrix".
  • If you want to edit a value in the A matrix, use the procedure described below.

Editing a Value in the A 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.

Entering a Column in the B Matrix

After you enter the A matrix, the program prompts you to enter the first column of the B matrix. (Anytime after entering the A matrix, you can save it as a data file.)
D_TBOF8g
Enter all the values for the indicated column of the B matrix, pressing { ENT } after each value.

The Edit Menu

After you have entered a column, the program displays:
D_ma7CqI
  • If you have no changes to make, press { NO } and proceed to the section below labeled "Displaying a Column in the Resulting Matix".
  • If you want to edit a value, press { YES } and use the procedure described below.

Editing the Column Entries

When you select { YES } from the EDIT? menu, the program displays the same menu that you used to enter the column values.
  • 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, select { NO } from the EDIT? menu.

Displaying a Column in the Resulting Matrix

When you select { NO } from the EDIT? menu, the program displays a message indicating the column of the resulting matrix that you can examine.
D_4ah5el
To examine the results in the indicated column:
  1. Press { NXT }.
    The program displays the value in the first row of the column, for example:.
    D_RaZbya
  2. Press { NXT } to display the remaining values in the current column.
When you have displayed all the values in the column, the program proceeds in one of two ways.
  • If there are more columns in the B matrix, the program lets you enter values for the next column.
  • If there are no more columns in the B matrix, the program returns to the MATRIX PRODUCT menu.


Back