is then the matrix inverse of . The procedure is numerically unstable unless pivoting
(exchanging rows and columns as appropriate) is used. Picking the largest available
element as the pivot is usually a good choice.
Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Gauss-Jordan Elimination" and "Gaussian
Elimination with Backsubstitution." §2.1 and 2.2 in Numerical
Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England:
Cambridge University Press, pp. 27-32 and 33-34, 1992.