In linear algebra, the inverse square matrix A is another square matrix A−1 such that the product A−1A is the identity matrix. There are many methods for calculating an inverse matrix, if it exists.
Gaussian elimination Gaussian elimination is a useful and easy way to compute the inverse of a matrix. To compute a matrix inverse using this method, an augmented matrix is first created with the left side being the matrix to invert and the right side being the identity matrix. Then, Gaussian elimination is used to convert the left side into the identity matrix, which causes the right side to become the inverse of the input matrix. For example, take the following matrix: 𝐀=(−1321−1) The first step to compute its inverse is to create the augmented matrix (−132101−101) Call the first row of this matrix R1 and the second row R2. Then, add row 1 to row 2 (R1+R2→R2). This yields (−1321001211) Next, subtract row 2, multiplied by 3, from row 1 (R1−3R2→R1), which yields (−10−2−301211) Finally, multiply row 1 by −1 (−R1→R1) and row 2 by 2 (2R2→R2). This yields the identity matrix on the left side and the inverse matrix on the right:(10230122) Thus, 𝐀−1=(2322) It works because the process of Gaussian elimination can be viewed as a sequence of applying left matrix multiplication using elementary row operations using elementary matrices (𝐄n), such as 𝐄n𝐄n−1⋯𝐄2𝐄1𝐀=𝐈 Applying right-multiplication using 𝐀−1, we get 𝐄n𝐄n−1⋯𝐄2𝐄1𝐈=𝐈𝐀−1. And the right side 𝐈𝐀−1=𝐀−1, which is the inverse we want. To obtain 𝐄n𝐄n−1⋯𝐄2𝐄1𝐈, we create the augmented matrix by combining A with I and applying Gaussian elimination. The two portions will be transformed using the same sequence of elementary row operations. When the left portion becomes I, the right portion applied the same elementary row operation sequence will become A−1.
Newton's method Newton's method can be used to invert non-zero real numbers, and a generalization of that approach can be used to invert a matrix 𝐀. One selects a seed matrix 𝐗0, and then generates new matrices 𝐗1,𝐗2,… using the iteration formula
𝐗k+1=2𝐗k−𝐗k𝐀𝐗k. In many instances, the sequence 𝐗k approaches 𝐀−1, and truncating the sequence gives an approximation of 𝐀−1. Victor Pan and John Reif have studied ways of generating a starting seed. Newton's method is particularly useful when dealing with families of related matrices that behave enough like the sequence manufactured for the homotopy above: Sometimes a good starting point for refining an approximation for the new inverse can be the already obtained inverse of a previous matrix that nearly matches the current matrix. For example, the pair of sequences of inverse matrices used in obtaining matrix square roots by Denman–Beavers iteration. That may need more than one pass of the iteration at each new matrix, if they are not close enough together for just one to be enough. Newton's method is also useful for "touch up" corrections to the Gauss–Jordan algorithm which has been contaminated by small errors from imperfect computer arithmetic.
Cayley–Hamilton method The Cayley–Hamilton theorem allows the inverse of A to be expressed in terms of det(A), traces and powers of A:
𝐀−1=1det(𝐀)∑s=0n−1𝐀s∑k1,k2,…,kn−1∏l=1n−1(−1)kl+1lklkl!tr(𝐀l)kl, where n is size of A, and tr(A) is the trace of matrix A given by the sum of the main diagonal. The sum is taken over s and the sets of all kl≥0 satisfying the linear Diophantine equation
s+∑l=1n−1lkl=n−1 The formula can be rewritten in terms of complete Bell polynomials of arguments tl=−(l−1)!tr(Al) as
𝐀−1=1det(𝐀)∑s=1n𝐀s−1(−1)n−1(n−s)!Bn−s(t1,t2,…,tn−s) That is described in more detail under Cayley–Hamilton method.
Eigendecomposition
If matrix A can be eigendecomposed, and if none of its eigenvalues are zero, then A is invertible and its inverse is given by
𝐀−1=𝐐𝜦−1𝐐−1, where Q is the square (N × N) matrix whose ith column is the eigenvector qi of A, and Λ is the diagonal matrix whose diagonal entries are the corresponding eigenvalues, that is, Λii=λi. If A is symmetric, Q is guaranteed to be an orthogonal matrix, therefore 𝐐−1=𝐐T. Furthermore, because Λ is a diagonal matrix, its inverse is easy to calculate:
[Λ−1]ii=1λi
Cholesky decomposition
If matrix A is positive definite, then its inverse can be obtained as
𝐀−1=(𝐋∗)−1𝐋−1, where L is the lower triangular Cholesky decomposition of A, and L* denotes the conjugate transpose of L.
Solution using the adjugate
Writing the transpose of the matrix of cofactors, known as an adjugate matrix, may also be an efficient way to calculate the inverse of small matrices, but the recursive method is inefficient for large matrices. To determine the inverse, we calculate a matrix of cofactors:
𝐀−1=1|𝐀|𝐂T=1|𝐀|(𝐂11𝐂21⋯𝐂n1𝐂12𝐂22⋯𝐂n2⋮⋮⋱⋮𝐂1n𝐂2n⋯𝐂nn) so that
(𝐀−1)ij=1|𝐀|(𝐂T)ij=1|𝐀|(𝐂ji) where |A| is the determinant of A, C is the matrix of cofactors, and CT represents the matrix transpose.
Inversion of 2 × 2 matrices The cofactor equation listed above yields the following result for 2 × 2 matrices. Inversion of these matrices can be done as follows:
𝐀−1=[abcd]−1=1det𝐀[d−b−ca]=1ad−bc[d−b−ca] This is possible because 1/(ad − bc) is the reciprocal of the determinant of the matrix in question, and the same strategy could be used for other matrix sizes. The Cayley–Hamilton method gives
𝐀−1=1det𝐀[(tr𝐀)𝐈−𝐀]
Inversion of 3 × 3 matrices A computationally efficient 3 × 3 matrix inversion is given by
𝐀−1=[abcdefghi]−1=1det(𝐀)[ABCDEFGHI]T=1det(𝐀)[ADGBEHCFI] (where the scalar A is not to be confused with the matrix A). If the determinant is non-zero, the matrix is invertible, with the entries of the intermediary matrix on the right side above given by
A=(ei−fh),D=−(bi−ch),G=(bf−ce),B=−(di−fg),E=(ai−cg),H=−(af−cd),C=(dh−eg),F=−(ah−bg),I=(ae−bd). The determinant of A can be computed by applying the rule of Sarrus as follows:
det(𝐀)=aA+bB+cC The Cayley–Hamilton decomposition gives
𝐀−1=1det(𝐀)(12[(tr𝐀)2−tr(𝐀2)]𝐈−𝐀tr𝐀+𝐀2)
The general 3 × 3 inverse can be expressed concisely in terms of the cross product and triple product. If a matrix 𝐀=[𝐱0𝐱1𝐱2] (consisting of three column vectors, 𝐱0, 𝐱1, and 𝐱2) is invertible, its inverse is given by
𝐀−1=1det(𝐀)[(𝐱1×𝐱2)T(𝐱2×𝐱0)T(𝐱0×𝐱1)T] The determinant of A, det(A), is equal to the triple product of x0, x1, and x2—the volume of the parallelepiped formed by the rows or columns:
… excerpt ends here. Continue reading the full article.