It is easy to invert a matrix using GEMPACK.

To learn how, download the file GPINVERT.ZIP (5K)

Unzip the files in GPINVERT.ZIP into a new directory and run TESTINV.BAT. The inverted matrix should appear in file OUTPUT.HAR at header "X". Examine INVERT.TAB to see how it is done. It is easy to modify this example to invert other matrices.

TESTINV.BAT also runs a second example INVERT2.CMF, which reads in a nearly singular matrix in BADMATRIX.HAR. In this case, the product of the original matrix and the produced "inverse" is NOT the identity matrix (see CHECK matrix in OUTPUT2.HAR). We urge you to check results to identify cases like this !

We are grateful to Terry Maidment for raising this question.

Go back to

GEMPACK FAQ Page