Post Reply 
(12C) Determinant of the 3x3 Matrix
12-08-2018, 01:59 PM (This post was last modified: 12-08-2018 02:00 PM by Dieter.)
Post: #2
RE: (12C) Determinant of the 3x3 Matrix
(12-08-2018 05:15 AM)Gamo Wrote:  Program to get the "Determinant of the 3x3 Matrix"

a1 b1 c1
a2 b2 c2
a3 b3 c3

It works, but entering the matrix is very cumbersome. First of all you have to remember the exact sequence (a1, b2, c3, b1, c2, a3, c1, a2, b3). This is very error prone: usually a matrix is enterend row by row or column by column. After each entered element an intermediate result shows up that may confuse the user. The stack must not be disturbed during entry and if you only get one single element wrong you have to start all over again.

So here's another idea. ;-)

Take a look at the keyboard. The numbers 1 through 9 are nicely arranged like the elements of a 3x3 matrix. Simply store the respective element in the register with the same position on the keyboard!

This way you can enter the matrix in any order you like, errors can be corrected, elements can be changed and the deteminant recomputed, and more.

So your example matrix

6  2 -4
5  6 -2
5  2 -3

is stored this way:

6 [STO] 7   2 [STO] 8  -4 [STO] 9

5 [STO] 4   6 [STO] 5  -2 [STO] 6

5 [STO] 1   2 [STO] 5  -3 [STO] 3

Looks quite intuitive to me. ;-)
You can also recall the registers to review the matrix.

Then run this program:

Code:
RCL 7
RCL 5
x
RCL 3
x
RCL 4
RCL 2
x
RCL 9
x
+
RCL 8
RCL 6
x
RCL 1
x
+
RCL 9
RCL 5
x
RCL 1
x
-
RCL 6
RCL 2
x
RCL 7
x
-
RCL 8
RCL 4
x
RCL 3
x
-

[R/S] => 6,00

Alternative method
Instead of storing the elements directly you can also enter the matrix this way:

f[CLEAR FIN]

6 [CFj]   2 [CFj]   -4 [CFj]

5 [CFj]   6 [CFj]   -2 [CFj]

5 [CFj]   2 [CFj]   -3 [CFj]

You may enter the matrix row by row or column by column – doesn't matter.

But, important: add a final [CHS] at the end of the above program.

[R/S] => 6,00

Dieter
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(12C) Determinant of the 3x3 Matrix - Gamo - 12-08-2018, 05:15 AM
RE: (12C) Determinant of the 3x3 Matrix - Dieter - 12-08-2018 01:59 PM



User(s) browsing this thread: 1 Guest(s)