matrix inverse

1 Matrix Inverse

The inversePlanetmathPlanetmathPlanetmathPlanetmath of an n×n matrix A is denoted by A-1. The inverse is defined so that


where In is the n×n identity matrixMathworldPlanetmath.

It should be stressed that only square matricesMathworldPlanetmath have inverses proper– however, a matrix of any size may have “left” and “right” inverses (which will not be discussed here).

A precondition for the existence of the matrix inverse A-1 (i.e. the matrix is invertible) is that detA0 (the determinantMathworldPlanetmath is nonzero), the reason for which we will see in a second.

The general form of the inverse of a matrix A is


where adj(A) is the adjugate of A (the matrix formed by the cofactorsPlanetmathPlanetmath of A, i.e. with adj(A)ij=Cij(A)).11Some other sources call the adjugate the adjointPlanetmathPlanetmathPlanetmathPlanetmath; however on PM the adjoint is reserved for the conjugate transposeMathworldPlanetmath. This can also be thought of as a generalizationPlanetmathPlanetmath of the 2×2 formulaMathworldPlanetmathPlanetmath given in the next sectionPlanetmathPlanetmathPlanetmathPlanetmathPlanetmath. However, due to the inclusion of the determinant in the expression, it is impractical to actually use this to calculate inverses.

This general form also explains why the determinant must be nonzero for invertibility; as we are dividing through by its value.

An invertible matrix is also said to be nonsingular.

2 Calculating the Inverse By Hand

Method 1:

An easy way to calculate the inverse of a matrix by hand is to form an augmented matrix [A|I] from A and In, then use Gaussian eliminationMathworldPlanetmath to transform the left half into I. At the end of this procedure, the right half of the augmented matrix will be A-1 (that is, you will be left with [I|A-1]).

Method 2:

One can calculate the i,jth element of the inverse by using the general formula; i.e.


where Cij(A) is the i,jth cofactor expansion of the matrix A.

Note that the indices on the left-hand side are swapped relative to the right-hand side.

2.1 2-by-2 case:

For the 2×2 case, the general formula reduces to a memorable shortcut. For the 2×2 matrix


The inverse M-1 is always


where detM is simply ad-bc.

2.2 Remarks

Some caveats: computing the matrix inverse for ill-conditioned matrices is error-prone; special care must be taken and there are sometimes special algorithms to calculate the inverse of certain classes of matrices (for example, Hilbert matricesMathworldPlanetmath).

3 Avoiding the Inverse and Numerical Calculation

The need to find the matrix inverse depends on the situation– whether done by hand or by computer, and whether the matrix is simply a part of some equation or expression or not.

Instead of computing the matrix A-1 as part of an equation or expression, it is nearly always better to use a matrix factorization instead. For example, when solving the system Ax=b, actually calculating A-1 to get x=A-1b is discouraged. LU-factorization is typically used instead.

We can even use this fact to speed up our calculation of the inverse by itself. We can cast the problem as finding X in


For n×n matrices A, X, and B (where X=A-1 and B=In). To solve this, we first find the LU decomposition of A, then iterate over the columns, solving Ly=Pbk and Uxk=y each time (k=1n). The resulting values for xk are then the columns of A-1.

4 Elements of Invertible Matrices

Typically the matrix elements are members of a field when we are speaking of inverses (i.e. the reals, the complex numbers). However, the matrix inverse may exist in the case of the elements being members of a commutative ring, provided that the determinant of the matrix is a unit in the ring.


  • 1 Golub and Van Loan, “Matrix Computations,” Johns Hopkins Univ. Press, 1996.
  • 2 “Matrix Math,” mrmeanie/matrix/matrices.htm mrmeanie/matrix/matrices.htm
Title matrix inverse
Canonical name MatrixInverse
Date of creation 2013-03-22 13:04:25
Last modified on 2013-03-22 13:04:25
Owner akrowne (2)
Last modified by akrowne (2)
Numerical id 18
Author akrowne (2)
Entry type Definition
Classification msc 15A09
Synonym inverse
Synonym matrix inversion
Defines invertible
Defines adjugate
Defines adjugate of a matrix