matrix Inverse using Hp-17BII+


The HP 27S and 19B Technical Manual uses the matrix of 
(cofactors / determinant) method to solve Ax=B. I originally
started doing the inversion using LU decomposition to be able
to invert N*N matrices but soon found that I could not enter
values into the ITEM() array at run time (i.e. whilst trying
to solve). Therefore I pursued a solution for a 3*3 matrix
only, just to say that I had done it!

The underlying equations using LU decomposition are shown below.

U12=A12 / L11
U13=A13 / L11
L22=A22 - L21.U12
U23=(A23 - L21.U13) / L22
L33=A33 - L31.U13 - L32.U23
Y1=1 / L11
Y2=-L21.Y1 / L22
Y3=(-L31.Y1 - L32.Y2) / L33
V21=Y2 - U23.V31
V11=Y1 - V21.U12 - U13.V31
Y2=1 / L22
Y3=-L32.Y2 / L33
V22=Y2 - U23.V32
V12=Y1 - U12.V22 - U13.V32
Y3=1 / L33
V23=Y2 - U23.V33
V13=Y1 - U12.V23 - U13.V33

I had to split the equations into Z for variable registration, 
SUM for the input array A and AINV for calculation otherwise
the equation seemed to run out memory at run time and did not
calculate the last few terms.


+L(U23:ITEM(A:6)- G(L21)xG(U13))/G(L22))

Use the SUM menu to input the values for the 9 matrix elements
where element k = (row-1)*3 + column. Click on NAME and save the
data as A.

Go to the solve menu, find the Z formula and click on CALC to
register the variables.

Find the AINV formula and click on CALC. Click on AINV, when it
is finished the display should show AINV=0.000…

Click on EXIT and go to the Z equation. Click on CALC and then
RCL V11, RCL V12, RCL …. to show all the elements of the inverse
matrix of A.

A useful test matrix is the Hilbert matrix 1, ½, 1/3, ½, 1/3, ¼,
1/3, ¼, 1/5 with the resultant inverse matrix elements 9, -36,
30, -36, 192, -180, 30, -180, 180 ignoring the rounding errors.

I have not studied the accuracy of the results as yet but
thought I would post it for any comments and hopefully any
improvements on technique. Also are there any tricks that I do
not know about that I could have used?

Edited: 9 Aug 2005, 9:07 a.m.

Possibly Related Threads...
Thread Author Replies Views Last Post
  AFTER HP-Prime update, Shift+Matrix CRASHES Joseph Ec 3 604 12-06-2013, 11:06 AM
Last Post: Joseph Ec
  Solver issue with HP 17BII - different from 19BII Jeff Kearns 13 1,138 11-28-2013, 02:36 AM
Last Post: Don Shepherd
  HP Prime Matrix TERRIBLE bug and question uklo 19 1,657 11-25-2013, 12:10 PM
Last Post: Mic
  17BII & 17BII+ Discounted Payback Period Revisited Tom Neudorfl 8 940 11-25-2013, 10:28 AM
Last Post: Don Shepherd
  HP Prime: editing a matrix Alberto Candel 6 635 11-20-2013, 06:26 PM
Last Post: Helge Gabert
  Absolute Value and Matrix BruceTTT 5 644 11-11-2013, 11:52 PM
Last Post: Walter B
  Is the Prime a superset of the HP 17bII+ ? vrrr 3 481 10-16-2013, 12:03 PM
Last Post: Michael de Estrada
  WP-34S Matrix operations with routine-local registers? Tom Grydeland 1 361 09-04-2013, 10:46 AM
Last Post: Marcus von Cube, Germany
  Matrix Characteristic Polynomial - Reloaded. Ángel Martin 12 925 08-22-2013, 05:33 PM
Last Post: Thomas Klemm
  Matrix Richard Berler 3 427 08-18-2013, 06:24 PM
Last Post: Paul Dale

Forum Jump: