Inlinear algebra, aninvertible matrix (non-singular,non-degenerate orregular) is asquare matrix that has aninverse. In other words, if a matrix is invertible, it can be multiplied by another matrix to yield theidentity matrix. Invertible matrices are the same size as their inverse.
The inverse of a matrix represents the inverse operation, meaning if a matrix is applied to a particular vector, followed by applying the matrix's inverse, the result is the original vector.
Ann-by-nsquare matrixA is calledinvertible if there exists ann-by-n square matrixB such thatwhereIn denotes then-by-nidentity matrix and the multiplication used is ordinarymatrix multiplication.[1] If this is the case, then the matrixB is uniquely determined byA, and is called theinverse ofA, denoted byA−1.Matrix inversion is the process of finding the matrix which when multiplied by the original matrix gives the identity matrix.[2]
The matrix is invertible, as it has inverse which can be confirmed by computing
To check that it is invertible without finding an inverse, can be computed, which is non-zero.
On the other hand, this is a non-invertible matrix:
We can see the rank of this 2-by-2 matrix is 1, which isn − 1 ≠n, so it is non-invertible. Additionally, we can compute that thedeterminant of is 0, which is anecessary and sufficient condition for a matrix to be non-invertible.
Gaussian elimination is a useful and easy way to compute the inverse of a matrix. To compute a matrix inverse using this method, anaugmented matrix is first created with the left side being the matrix to invert and the right side being theidentity 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:
The first step to compute its inverse is to create the augmented matrix
Call the first row of this matrix and the second row. Then, add row 1 to row 2 This yields
Next, subtract row 2, multiplied by 3, from row 1 which yields
Finally, multiply row 1 by −1 and row 2 by 2 This yields the identity matrix on the left side and the inverse matrix on the right:
Thus,It works because the process of Gaussian elimination can be viewed as a sequence of applying left matrix multiplication using elementary row operations usingelementary matrices (), such as
Applying right-multiplication using we get And the right side which is the inverse we want.
To obtain we create the augmented matrix by combiningA withI and applyingGaussian elimination. The two portions will be transformed using the same sequence of elementary row operations. When the left portion becomesI, the right portion applied the same elementary row operation sequence will becomeA−1.
Newton's method is particularly useful when dealing withfamilies of related matrices that behave enough like the sequence manufactured for thehomotopy 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 obtainingmatrix 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 fromimperfect computer arithmetic.
TheCayley–Hamilton theorem allows the inverse ofA to be expressed in terms ofdet(A), traces and powers ofA:[5]
wheren is size ofA, andtr(A) is thetrace of matrixA given by the sum of themain diagonal. The sum is taken overs and the sets of all satisfying the linearDiophantine equation
The formula can be rewritten in terms of completeBell polynomials of arguments as
If matrixA can be eigendecomposed, and if none of its eigenvalues are zero, thenA is invertible and its inverse is given by
whereQ is the square(N ×N) matrix whoseith column is theeigenvector ofA, andΛ is thediagonal matrix whose diagonal entries are the corresponding eigenvalues, that is, IfA is symmetric,Q is guaranteed to be anorthogonal matrix, therefore Furthermore, becauseΛ is a diagonal matrix, its inverse is easy to calculate:
Writing the transpose of thematrix of cofactors, known as anadjugate matrix, may also be an efficient way to calculate the inverse ofsmall matrices, but therecursive method is inefficient for large matrices. To determine the inverse, we calculate a matrix of cofactors:
so that
where|A| is thedeterminant ofA,C is the matrix of cofactors, andCT represents the matrixtranspose.
Thecofactor equation listed above yields the following result for2 × 2 matrices. Inversion of these matrices can be done as follows:[6]
This is possible because1/(ad −bc) is thereciprocal of the determinant of the matrix in question, and the same strategy could be used for other matrix sizes.
(where thescalarA is not to be confused with the matrixA).
If the determinant is non-zero, the matrix is invertible, with the entries of the intermediary matrix on the right side above given by
The determinant ofA can be computed by applying therule of Sarrus as follows:
The Cayley–Hamilton decomposition gives
The general3 × 3 inverse can be expressed concisely in terms of thecross product andtriple product. If a matrix (consisting of three column vectors,,, and) is invertible, its inverse is given by
The determinant ofA,det(A), is equal to the triple product ofx0,x1, andx2—the volume of theparallelepiped formed by the rows or columns:
The correctness of the formula can be checked by using cross- and triple-product properties and by noting that for groups, left and right inverses always coincide. Intuitively, because of the cross products, each row ofA–1 is orthogonal to the non-corresponding two columns ofA (causing the off-diagonal terms of be zero). Dividing by
causes the diagonal entries ofI =A−1A to be unity. For example, the first diagonal is:
With increasing dimension, expressions for the inverse ofA get complicated. Forn = 4, the Cayley–Hamilton method leads to an expression that is still tractable:
whereA,B,C andD arematrix sub-blocks of arbitrary size and is theSchur complement ofA. (A must be square, so that it can be inverted. Furthermore,A andD −CA−1B must be nonsingular.[7])
Matrices can also beinverted blockwise by using the analytic inversion formula:[8]
1
The strategy is particularly advantageous ifA is diagonal andM /A is a small matrix, since they are the only matrices requiring inversion.
Thenullity theorem says that the nullity ofA equals the nullity of the sub-block in the lower right of the inverse matrix, and that the nullity ofB equals the nullity of the sub-block in the upper right of the inverse matrix.
The inversion procedure that led to Equation (1) performed matrix block operations that operated onC andD first. Instead, ifA andB are operated on first, and providedD andM /D :=A −BD−1C are nonsingular,[9] the result is
2
Equating the upper-left sub-matrices of Equations (1) and (2) leads to
IfA andD are both invertible, then the above two block matrix inverses can be combined to provide the simple factorization
2
By theWeinstein–Aronszajn identity, one of the two matrices in the block-diagonal matrix is invertible exactly when the other is.
This formula simplifies significantly when the upper right block matrixB is thezero matrix. This formulation is useful when the matricesA andD have relatively simple inverse formulas (orpseudo inverses in the case where the blocks are not all square. In this special case, the block matrix inversion formula stated in full generality above becomes
If the given invertible matrix is a symmetric matrix with invertible blockA the following block inverse formula holds[10]
4
where. This requires 2 inversions of the half-sized matricesA andS and only 4 multiplications of half-sized matrices, if organized properly together with some additions, subtractions, negations and transpositions of negligible complexity. Any matrix has an associated positive semidefinite, symmetric matrix, which is exactly invertible (and positive definite), if and only if is invertible. By writing matrix inversion can be reduced to inverting symmetric matrices and 2 additional matrix multiplications, because thepositive definite matrix satisfies the invertibility condition for its left upper blockA.
thenA is nonsingular and its inverse may be expressed by aNeumann series:[12]
Truncating the sum results in an "approximate" inverse which may be useful as apreconditioner. Note that a truncated series can be accelerated exponentially by noting that the Neumann series is ageometric sum. As such, it satisfies
Therefore, only2L − 2 matrix multiplications are needed to compute2L terms of the sum.
More generally, ifA is "near" the invertible matrixX in the sense that
thenA is nonsingular and its inverse is
If it is also the case thatA −X hasrank 1 then this simplifies to
IfA is a matrix withinteger orrational entries, and we seek a solution inarbitrary-precision rationals, ap-adic approximation method converges to an exact solution inO(n4 log2n), assuming standardO(n3) matrix multiplication is used.[13] The method relies on solvingn linear systems via Dixon's method ofp-adic approximation (each inO(n3 log2n)) and is available as such in software specialized in arbitrary-precision matrix operations, for example, in IML.[14]
as the columns of the inverse matrix Note that, the place "" indicates that "" is removed from that place in the above expression for. We then have, where is theKronecker delta. We also have, as required. If the vectors are not linearly independent, then and the matrix is not invertible (has no inverse).
Over afield, a square matrix that isnot invertible is calledsingular ordegenerate. A square matrix with entries in a field is singularif and only if itsdeterminant is zero.
LetA be a squaren-by-n matrix over afieldK (e.g., the field of real numbers). The following statements are equivalent, i.e., they are either all true or all false for any given matrix:[15]
A is invertible, i.e. it has an inverse under matrix multiplication, i.e., there exists aB such thatAB =In =BA. (In that statement, "invertible" can equivalently be replaced with "left-invertible" or "right-invertible" in which one-sided inverses are considered.)
The linear transformation mappingx toAx is invertible, i.e., it has an inverse under function composition. (There, again, "invertible" can equivalently be replaced with either "left-invertible" or "right-invertible".)
The linear transformation mappingx toAx is bijective; that is, the equationAx =b has exactly one solution for eachb inKn. (There, "bijective" can equivalently be replaced with "injective" or "surjective".)
The columns ofA form abasis ofKn. (In this statement, "basis" can equivalently be replaced with either "linearly independent set" or "spanning set")
The rows ofA form a basis ofKn. (Similarly, here, "basis" can equivalently be replaced with either "linearly independent set" or "spanning set")
Thedeterminant ofA is nonzero:detA ≠ 0. In general, a square matrix over acommutative ring is invertible if and only if its determinant is aunit (i.e. multiplicatively invertible element) of that ring.
The number 0 is not aneigenvalue ofA. (More generally, a number is an eigenvalue ofA if the matrix is singular, whereI is the identity matrix.)
Furthermore, the following properties hold for an invertible matrixA:
for nonzero scalark
ifA has orthonormal columns, where+ denotes theMoore–Penrose inverse andx is a vector
For any invertiblen-by-n matricesA andB, More generally, if are invertiblen-by-n matrices, then
Left and right inverses are equal. That is, if and then.
The rows of the inverse matrixV of a matrixU areorthonormal to the columns ofU (and vice versa interchanging rows for columns). To see this, suppose thatUV =VU =I where the rows ofV are denoted as and the columns ofU as for Then clearly, theEuclidean inner product of any two This property can also be useful in constructing the inverse of a square matrix in some instances, where a set oforthogonal vectors (but not necessarily orthonormal vectors) to the columns ofU are known. In which case, one can apply the iterativeGram–Schmidt process to this initial set to determine the rows of the inverseV.
A matrix that is its own inverse (i.e., a matrixA such thatA =A−1 and consequentlyA2 =I) is called aninvolutory matrix.
Over the field of real numbers, the set of singularn-by-n matrices, considered as asubset of is anull set, that is, hasLebesgue measure zero. That is true because singular matrices are the roots of thedeterminant function. It is acontinuous function because it is apolynomial in the entries of the matrix. Thus in the language ofmeasure theory,almost alln-by-n matrices are invertible.
Furthermore, the set ofn-by-n invertible matrices isopen anddense in thetopological space of alln-by-n matrices. Equivalently, the set of singular matrices isclosed andnowhere dense in the space ofn-by-n matrices.
In practice, however, non-invertible matrices may be encountered. Innumerical calculations, matrices that are invertible but close to a non-invertible matrix may still be problematic and are said to beill-conditioned.
Suppose that the invertible matrixA depends on a parametert. Then thederivative of the inverse ofA with respect tot is given by[17]
To derive the above expression for the derivative of the inverse ofA, one can differentiate the definition of the matrix inverse using theproduct rule, and then solve for the derivative of the inverse ofA:
Subtracting from both ends of this formula, and multiplying on the right by finishes the derivation.
If is a small number then the derivative formula gives:
Non-square matrices, i.e.m-by-n matrices for whichm ≠n, do not have an inverse. However, in some cases such a matrix may have aleft inverse orright inverse. IfA ism-by-n and therank ofA is equal ton, (n ≤m), thenA has a left inverse, ann-by-m matrixB such thatBA =In. IfA has rankm (m ≤n), then it has a right inverse, ann-by-m matrixB such thatAB =Im.
While the most common case is that of matrices over thereal orcomplex numbers, all of those definitions can be given for matrices over anyalgebraic structure equipped withaddition andmultiplication (i.e.rings). However, in the case of a ring beingcommutative, the condition for a square matrix to be invertible is that its determinant is invertible in the ring, which in general is a stricter requirement than it being nonzero. For anoncommutative ring, the usual determinant is not defined. The conditions for existence of left-inverse or right-inverse are more complicated, since a notion of rank does not exist over rings.
For most practical applications, it is not necessary to invert a matrix to solve asystem of linear equations; however, for a unique solution, it is necessary for the matrix involved to be invertible.
Decomposition techniques likeLU decomposition are much faster than inversion, and various fast algorithms for special classes of linear systems have also been developed.
Although an explicit inverse is not necessary to estimate the vector of unknowns, it is the easiest way to estimate their accuracy and is found in the diagonal of a matrix inverse (the posterior covariance matrix of the vector of unknowns). However, faster algorithms to compute only the diagonal entries of a matrix inverse are known in many cases.[19]
Matrix inversion plays a significant role incomputer graphics, particularly in3D graphics rendering and3D simulations. Examples include screen-to-worldray casting, world-to-subspace-to-world object transformations, and physical simulations.
Matrix inversion also plays a significant role in theMIMO (Multiple-Input, Multiple-Output) technology inwireless communications. The MIMO system consists ofN transmit andM receive antennas. Unique signals, occupying the samefrequency band, are sent viaN transmit antennas and are received viaM receive antennas. The signal arriving at each receive antenna will be alinear combination of theN transmitted signals forming anN × M transmission matrixH. It is crucial for the matrixH to be invertible so that the receiver can figure out the transmitted information.[20]
^Pan, Victor; Reif, John (1985),Efficient Parallel Solution of Linear Systems, Proceedings of the 17th Annual ACM Symposium on Theory of Computing, Providence:ACM
^Pan, Victor; Reif, John (1985),Harvard University Center for Research in Computing Technology Report TR-02-85, Cambridge, MA:Aiken Computation Laboratory
^Bernstein, Dennis (2005).Matrix Mathematics. Princeton University Press. p. 44.ISBN978-0-691-11802-4.
^Tzon-Tzer, Lu; Sheng-Hua, Shiou (2002). "Inverses of 2 × 2 block matrices".Computers & Mathematics with Applications.43 (1–2):119–129.doi:10.1016/S0898-1221(01)00278-4.
^Bernstein, Dennis (2005).Matrix Mathematics. Princeton University Press. p. 45.ISBN978-0-691-11802-4.
^abT. H. Cormen, C. E. Leiserson, R. L. Rivest, C. Stein,Introduction to Algorithms, 3rd ed., MIT Press, Cambridge, MA, 2009, §28.2.
^Ran Raz. On the complexity of matrix product. In Proceedings of the thirty-fourth annual ACM symposium on Theory of computing. ACM Press, 2002.doi:10.1145/509907.509932.
^Stewart, Gilbert (1998).Matrix Algorithms: Basic decompositions. SIAM. p. 55.ISBN978-0-89871-414-2.
^Magnus, Jan R.; Neudecker, Heinz (1999).Matrix Differential Calculus : with Applications in Statistics and Econometrics (Revised ed.). New York: John Wiley & Sons. pp. 151–152.ISBN0-471-98633-X.