Matrix Inversion Demo Page

There are several pages that describe the method demonstrated here. Please consult them for the details of the inverse itself and the meaning of the different pieces below. :-) Also, this was written using Firefox and the Firebug plug-in.

Create the A matrix

Enter the size of the matrix you want to invert in this area. The JavaScript will make an input form of the requested size which you can populate.



Populate the A matrix

Enter the values into the matrix.

Initial A

Reduce the A matrix

This next button starts the inverse. The delay field is in ms. The algorithm will do each major step and then pause this amount before doing the next part. Doing so allows you to see the inverse while it progresses.


Working area

The A, C, and R matrices (defined in the instructions on the previous pages) are stored and worked here. The A matrix is completely reduced.

A

 

R

   

C

  

Create the A from the components

The pseudo-inverse is made from the C and R matrices.

C×R

A Confirmation

These matrices confirm the solution works.


Intermediate calculation of the (A×A) matrix and confirmation of the left and right-hand inverse properties (items 1 and 2 in the list on the previous pages.)

A×A


A×A×A


A×A×A

The null space vector.

(I-A×A)

Sources

The old sources are available on the next page.

Temporary addendum

I noticed there are times when the JavaScript doesn't work. It's because I have some problem with the script somewhere, it's not a problem with the method. The Java, C, C++, Fortran, and Ada versions never failed. There's even tests with the Java version that chaotically fill matrices of all sizes, invert them, check the results, and report any errors (if there ever were errors, that is.) If I have any time I'll step through the script to find the malfunctioning part. It's probably a missing parseFloat somewhere.