Solution 11694: Algorithm Used for Calculating the Inverse of a Matrix on a Texas Instruments Graphing Calculator.
How is the inverse of a matrix calculated?
Texas Instruments graphing calculators use a LU (Lower-Upper) decomposition
or factorization algorithm when calculating the inverse of a matrix (reference
"Numerical Methods and Software" by Kahaner, Moler, and Nash).
If A is a square matrix and is the product of a lower triangular matrix (named L), and an upper triangular matrix (named U), this can be written as:
A = L * U
In addition, the identity matrix of A will always be a square matrix with the same dimensions of A, containing ones down its main diagonal and remaining spaces filled with zeros. Knowing that A * A-1 equals the identity matrix and letting X symbolize A-1, we can follow that A * X = Indentity. Since A is equal to L * U, this means:
L * U * X = Indentity
Let's say A = [[2,-1,0] [4,3,-3] [8,-14,5]]. Therefore, the identity matrix = [[1,0,0] [0,1,0] [0,0,1]]. From A, we get L = [[1,0,0] [2,1,0] [4,-2,1]] and U = [[2,-1,0] [0,5,-3] [0,0,-1]].
Now, let's define another matrix as Y = U * X. So L * Y = Indentity. From here, we can easily solve for Y by using back substitution and find that Y = [[1,0,0] [-2,1,0] [-8,2,1]].
Knowing U and Y, we can now solve for X (which equals A-1) in the equation U * X = Y using back substitution and find that X = [[27/10,-1/2,-3/10] [22/5,-1,-3/5] [8,-2,-1]].