Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Inverse of a Matrix






Undoing a Matrix

For real numbers, dividing by a means multiplying by 1/a. Matrices have no division operation, but invertible matrices have an inverse that plays the same role — multiplying by A⁻¹ reverses the effect of multiplying by A. Not every matrix has an inverse, and understanding when one exists, how to compute it, and what properties it carries is central to linear algebra.

For step-by-step results on your own numbers, use the matrix inverse calculator on CalculateMatrix.



Definition of the Inverse

With numbers, an equation like 3x = 6 is undone by dividing — or, the same thing, multiplying by 1/3.
The number 13\frac{1}{3} cancels 33 because 13⋅3=1\frac{1}{3} \cdot 3 = 1, and multiplying by 11 changes nothing. That is all "dividing by 3" means.
With matrices there is no division: A x = b cannot be "solved" by writing x = b / A.
Take AA with rows (3,1)(3, 1) and (5,2)(5, 2). There is no rule for dividing by a matrix, so the move that settles 3x=63x = 6 is not available. The question becomes: is there a matrix that does for AA what 13\frac{1}{3} does for 33?
The definition
The inverse of a square matrix AA is a matrix A−1A^{-1} whose product with AA, in either order, is the identity matrix II — the matrix version of 13⋅3=1\frac{1}{3} \cdot 3 = 1.
For a square matrix AA of order nn, the inverse — if it exists — is the unique matrix A−1A^{-1} satisfying
Inverse Definition
AA−1=A−1A=IAA^{-1} = A^{-1}A = I
So for AA with rows (3,1)(3, 1), (5,2)(5, 2), the inverse is the matrix with rows (2,−1)(2, -1), (−5,3)(-5, 3); then Ax=bA\mathbf{x} = \mathbf{b} is solved by x=A−1b\mathbf{x} = A^{-1}\mathbf{b}.
The inverse is another matrix of the same size, and there is at most one of it.
entry of A·Brow of A · column of Bvalue
row 1, column 13·2 + 1·(−5)1
row 1, column 23·(−1) + 1·30
row 2, column 15·2 + 2·(−5)0
row 2, column 25·(−1) + 2·31
Both products must equal the identity. A matrix possessing an inverse is called invertible or nonsingular. A matrix with no inverse is called singular.
Uniqueness follows from a short argument. Suppose both BB and CC satisfy AB=IAB = I and CA=ICA = I. Then B=IB=(CA)B=C(AB)=CI=CB = IB = (CA)B = C(AB) = CI = C, so BB and CC must be the same matrix. This means a matrix either has no inverse or has exactly one.
Nothing is lost for ordinary numbers: a 1 × 1 matrix (a) has inverse (1/a).
The identity of size 11 is (1)(1), and (a)(1a)=(1)(a)(\frac{1}{a}) = (1) — the old reciprocal, written in brackets. Matrix inverses extend reciprocals; they do not replace them.
What is lost: many nonzero matrices have no inverse, and only square matrices can have one.
Every nonzero number has a reciprocal, but the matrix with rows (1,2)(1, 2) and (2,4)(2, 4) is not zero and still has no inverse — its second row is a multiple of the first. Which matrices are invertible is settled in when does the inverse exist.
The inverse is defined only for square matrices. A rectangular matrix cannot satisfy AA−1=A−1A=IAA^{-1} = A^{-1}A = I because rank(A)≤min⁡(m,n)\text{rank}(A) \le \min(m, n), so at least one of the products (m×mm \times m or n×nn \times n) has rank too low to be an identity. One-sided inverses (left or right) can exist for rectangular matrices with full column or full row rank, but the two-sided inverse is a strictly square concept.
The rest of the page covers notation, the 2 × 2 formula, when the inverse exists, computing it by row reduction or the adjugate, its properties, and solving systems with it.

Inverse Notation

Notation

Inverse Notation

The last stop of the −1 superscript, the division sign that deliberately does not exist, and what happens when inverse meets transpose.
AA, juxtaposition and II — matrix notation; the arithmetic a−1a^{-1} the label imitates — negative exponents.
A−1A^{-1}
A inverse
The −1-1 superscript's fourth habitat — and like f−1f^{-1} and sin⁡−1\sin^{-1}, a label: A−1A^{-1} is defined by AA−1=A−1A=IAA^{-1} = A^{-1}A = I in the Definition above, not by any division. Only on plain numbers does the superscript mean a genuine reciprocal.
CasesExists only for square, nonsingular matrices — writing A−1A^{-1} silently asserts both. The vocabulary pair travels with the mark: invertible/nonsingular when it exists, singular when it does not.
Also writteninv⁡(A)\operatorname{inv}(A) — the functional spelling in software (MATLAB, NumPy), rarely in print.
Do not confuse1A\frac{1}{A}. There is no matrix fraction — the reciprocal habit has nothing to grab, because “over AA” cannot say on which side A−1A^{-1} multiplies.
A/BA/B — does not exist
Matrix division — a notation deliberately never defined
The missing sign is itself a convention: since AB−1≠B−1AAB^{-1} \neq B^{-1}A in general, a fraction bar cannot record which side the inverse acts on. Every “division” must be spelled out as a one-sided product.
CasesFrom AX=BAX = B: premultiply to get X=A−1BX = A^{-1}B. From XA=BXA = B: postmultiply to get X=BA−1X = BA^{-1}. Different sides, different answers — the fraction bar would erase the distinction that decides the result.
Also writtenA\B and B/A do exist in MATLAB — as solver commands, precisely because the machine tracks the side for you.
Do not confuseScalar division. Writing BA\frac{B}{A} in a matrix computation is not shorthand — it is ambiguous between two generally different matrices, which is why no textbook defines it.
(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}
The inverse of a product reverses the order
Same reversal the transpose performs — undoing a sequence means undoing the last step first. The proof is one line of the Properties below; the notation habit it breaks is the scalar one, where order never mattered.
CasesThe superscripts compose and commute with each other: A−n=(A−1)nA^{-n} = (A^{-1})^n extends matrix powers downward, and (A−1)T=(AT)−1(A^{-1})^{T} = (A^{T})^{-1} — written A−TA^{-T} in advanced and numerical texts, one compact mark for the pair.
Also writtenA−TA^{-T}, as above — worth recognizing on sight in optimization and statistics writing.
Do not confuse(AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1} — the scalar-habit version, false for matrices whenever AB≠BAAB \neq BA; the same trap as (AB)T(AB)^T, and the same cure: reverse.
DownloadPNG2×PDF
Notation · Cheat sheet
Matrix Notation at a Glance
The marks from the notation cards across the matrix pages: how each is read and what it means. Every group links to the full card on its page.
Matrix operations
A=(aij)A = (a_{ij})
A with entries a i j
Capital for the matrix, aija_{ij} for one entry: row first, column second.
ABAB
A times B
Product written with no sign; needs (m×n)(n×p)(m \times n)(n \times p).
ATA^{T}
A transpose
Rows and columns swapped: (AT)ij=aji(A^{T})_{ij} = a_{ji}.
InverseThis page
A−1A^{-1}
A inverse
The matrix with AA−1=A−1A=IAA^{-1} = A^{-1}A = I.
A/BA/B
not defined
No matrix division: AB−1AB^{-1} and B−1AB^{-1}A differ.
(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}
the order reverses
Undo the last step first.
Rank
rank⁡(A)\operatorname{rank}(A)
the rank of A
The number of independent columns, which equals the number of independent rows.
min⁡(m,n)\min(m, n)
the cap on the rank
rank⁡(A)≤min⁡(m,n)\operatorname{rank}(A) \le \min(m, n); full rank when it reaches it.
Trace
tr⁡(A)\operatorname{tr}(A)
the trace of A
The sum of the diagonal entries aiia_{ii}.
tr⁡(AB)=tr⁡(BA)\operatorname{tr}(AB) = \operatorname{tr}(BA)
unchanged by rotating factors
Rotations only: tr⁡(ABC)\operatorname{tr}(ABC) need not equal tr⁡(BAC)\operatorname{tr}(BAC).
⟨A,B⟩F\langle A, B \rangle_F
the Frobenius inner product
Equals tr⁡(ATB)\operatorname{tr}(A^{T}B): entries multiplied in pairs, then summed.
Same marks, different job
ATA^{T}A label, not a power: TT is not a number.
A−1A^{-1}The inverse matrix, not 1A\frac{1}{A}, which has no meaning.
a23a_{23} vs a32a_{32}Row 22, column 33 against row 33, column 22: different entries.
Matrix Notation at a Glance·/linear-algebra/matrix/operationsLearn Math Class

The 2×2 Inverse Formula

For a 2×22 \times 2 matrix A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} with ad−bc≠0ad - bc \neq 0, the inverse is

Inverse 2x2 Formula
(abcd)−1=1ad−bc(d−b−ca)\begin{pmatrix} a & b \\ c & d \end{pmatrix}^{-1} = \frac{1}{ad - bc}\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}

The recipe is: swap the diagonal entries, negate the off-diagonal entries, and divide everything by the determinant ad−bcad - bc.

Worked Examples


Pitfall: Dropping the determinant factor
Swapping and negating without dividing turns A=(4726)A = \begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix} into (6−7−24)\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix}, and AA times that is 10I10I, not II. With det⁡(A)=10\det(A) = 10, the inverse is 110(6−7−24)\frac{1}{10}\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix}.

For A=(3152)A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}, the determinant is 3⋅2−1⋅5=13 \cdot 2 - 1 \cdot 5 = 1. The inverse is A−1=(2−1−53)A^{-1} = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}. Since det⁡(A)=1\det(A) = 1, every entry of A−1A^{-1} is an integer.

Verification: AA−1=(3152)(2−1−53)=(6−5−3+310−10−5+6)=(1001)AA^{-1} = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix} \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix} = \begin{pmatrix} 6 - 5 & -3 + 3 \\ 10 - 10 & -5 + 6 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix}.

For A=(2436)A = \begin{pmatrix} 2 & 4 \\ 3 & 6 \end{pmatrix}, the determinant is 2⋅6−4⋅3=02 \cdot 6 - 4 \cdot 3 = 0. The second column is twice the first, the columns are linearly dependent, and no inverse exists.

For A=(1327)A = \begin{pmatrix} 1 & 3 \\ 2 & 7 \end{pmatrix}, the determinant is 7−6=17 - 6 = 1. The inverse is A−1=(7−3−21)A^{-1} = \begin{pmatrix} 7 & -3 \\ -2 & 1 \end{pmatrix}.
The 2 by 2 inverse: swap the diagonal, negate the off-diagonal, divide by the determinantabcdA1ad − bcd−b−caA⁻¹1 swap the diagonal: a and d trade places2 negate the off-diagonal: b → −b, c → −c3 divide every entry by the determinant ad − bconly possible when ad − bc ≠ 0
The 2 × 2 recipe

Follow the colours across the arrow. The amber entries a and d trade corners; the blue entries b and c stay where they are but change sign; and the whole matrix is scaled by 1/(ad − bc). Multiply the result by A and every product collapses to the identity — which is also why the recipe fails the moment ad − bc is zero: there is nothing to divide by.

Three moves and one division: the 2 × 2 inverse is the one case simple enough to carry out by eye.
DownloadPNG2×PDF
3152
−1=
2−1−53
Swap the diagonal, negate the off-diagonal, divide by the determinant. Here det = 1, so every entry of the inverse is an integer.
The 2×2 inverse, one example·/linear-algebra/matrix/inverseLearn Math Class

When Does the Inverse Exist?

The invertible matrix theorem collects a list of conditions that are all equivalent for an n×nn \times n matrix AA. Each approaches invertibility from a different angle — algebraic, geometric, computational, spectral — but they are all either simultaneously true or simultaneously false.

Invertible Matrix Theorem
For A∈Rn×n, the following are equivalent:(1) A is invertible(2) det⁡(A)≠0(3) rank⁡(A)=n(4) columns of A are linearly independent(5) rows of A are linearly independent(6) columns of A span Rn(7) columns form a basis of Rn(8) Ax=0 has only the trivial solution(9) Ax=b has a unique solution for every b(10) Null⁡(A)={0}(11) rref⁡(A)=I(12) A is a product of elementary matrices(13) 0 is not an eigenvalue of A\begin{aligned} \text{For } A \in \mathbb{R}^{n \times n}, \text{ the following are equivalent:} & \\ (1)\ A \text{ is invertible} \quad (2)\ \det(A) \neq 0 \quad (3)\ \operatorname{rank}(A) = n & \\ (4)\ \text{columns of } A \text{ are linearly independent} & \\ (5)\ \text{rows of } A \text{ are linearly independent} & \\ (6)\ \text{columns of } A \text{ span } \mathbb{R}^n \quad (7)\ \text{columns form a basis of } \mathbb{R}^n & \\ (8)\ A\mathbf{x} = \mathbf{0} \text{ has only the trivial solution} & \\ (9)\ A\mathbf{x} = \mathbf{b} \text{ has a unique solution for every } \mathbf{b} & \\ (10)\ \operatorname{Null}(A) = \{\mathbf{0}\} & \\ (11)\ \operatorname{rref}(A) = I \quad (12)\ A \text{ is a product of elementary matrices} & \\ (13)\ 0 \text{ is not an eigenvalue of } A & \end{aligned}

Fact: A random matrix is invertible
Fill a matrix with numbers drawn at random from an interval and it is invertible with probability 11: the singular ones all satisfy the one equation det⁡(A)=0\det(A) = 0, a surface with no volume in the space of entries. With entries only 00 or 11 the odds turn: just 66 of the 1616 such 2×22 \times 2 matrices are invertible.

AA is invertible. The determinant det⁡(A)≠0\det(A) \neq 0. The rank of AA equals nn. The columns of AA are linearly independent. The rows of AA are linearly independent. The columns of AA span Rn\mathbb{R}^n. The columns of AA form a basis for Rn\mathbb{R}^n. The homogeneous system Ax=0Ax = \mathbf{0} has only the trivial solution. The system Ax=bAx = \mathbf{b} has a unique solution for every b∈Rn\mathbf{b} \in \mathbb{R}^n. The null space of AA is {0}\{\mathbf{0}\}. The reduced row echelon form of AA is II. The matrix AA is a product of elementary matrices. Zero is not an eigenvalue of AA.

The power of this theorem is that proving any one condition automatically establishes all the others. Checking the determinant is often the fastest single test, but in large-scale computation, rank determination via row reduction is more practical.
DownloadPNG2×PDFSVG
Square matrices · TFAE

The invertibility equivalence

Twelve statements about an n×nn \times n matrix, no one of them primary. Any may be taken as the definition and the rest derived — which is why the picture is a ring and not a list.

12statements
A is invertibleALL EQUIVALENT123456789101112
  1. det⁡(A)≠0\det(A) \neq 0det
  2. A is a product of elementary matricesdet
  3. 0 is not an eigenvalue of Adet
  4. rank⁡(A)=n\operatorname{rank}(A) = n — full rankrank
  5. rref⁡(A)=In\operatorname{rref}(A) = I_nrank
  6. The columns of A are linearly independentspace
  7. The columns of A span Rn\mathbb{R}^nspace
  8. The columns of A form a basis for Rn\mathbb{R}^nspace
  9. The rows of A are linearly independentspace
  10. null⁡(A)={0}\operatorname{null}(A) = \{\mathbf{0}\}space
  11. Ax=0A\mathbf{x} = \mathbf{0} has only the trivial solutionsystem
  12. Ax=bA\mathbf{x} = \mathbf{b} has a unique solution for every b∈Rn\mathbf{b} \in \mathbb{R}^nsystem
What the tagging exposesThe twelve are not twelve independent claims so much as one fact seen from four sides. rank⁡(A)=n\operatorname{rank}(A) = n and rref⁡(A)=In\operatorname{rref}(A) = I_n are the same statement in two notations, and the row condition follows from the column condition because row rank equals column rank. What the tagging exposes is how much of the theorem lives in the subspace corner — five of twelve — against a determinant corner that gets stated first and remembered longest.
det ×3rank ×2space ×5system ×2
The invertibility equivalence·/linear-algebra/matrix/inverseLearn Math Class
All thirteen conditions are one fact seen from different sides: AA sends no nonzero vector to 0\mathbf{0}.

Computing the Inverse by Row Reduction

The standard algorithm for computing the inverse of an n×nn \times n matrix AA is to form the n×2nn \times 2n augmented matrix [A∣I][A \mid I] and apply row operations to reduce the left half to the identity. If the reduction succeeds, the right half becomes A−1A^{-1}:

Inverse via Row Reduction
[A∣I]→row ops[I∣A−1][A \mid I] \xrightarrow{\text{row ops}} [I \mid A^{-1}]

Each row operation is left-multiplication by an elementary matrix. If the sequence of operations is E1,E2,…,EkE_1, E_2, \dots, E_k, then Ek⋯E2E1A=IE_k \cdots E_2 E_1 A = I, which means A−1=Ek⋯E2E1A^{-1} = E_k \cdots E_2 E_1. Applying the same operations to II produces exactly this product.

Worked Example


Computing the Inverse by Row Reduction
A=(121253133)A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 5 & 3 \\ 1 & 3 & 3 \end{pmatrix}

Form [A∣I][A \mid I] and reduce. Subtract 22 times row 11 from row 22, and subtract row 11 from row 33:

Computing the Inverse by Row Reduction
(121100011−210012−101)\begin{pmatrix} 1 & 2 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & -2 & 1 & 0 \\ 0 & 1 & 2 & -1 & 0 & 1 \end{pmatrix}

Subtract row 22 from row 33:

Computing the Inverse by Row Reduction
(121100011−2100011−11)\begin{pmatrix} 1 & 2 & 1 & 1 & 0 & 0 \\ 0 & 1 & 1 & -2 & 1 & 0 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{pmatrix}

Subtract row 33 from row 22, and subtract row 33 from row 11:

Computing the Inverse by Row Reduction
(12001−1010−32−10011−11)\begin{pmatrix} 1 & 2 & 0 & 0 & 1 & -1 \\ 0 & 1 & 0 & -3 & 2 & -1 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{pmatrix}

Subtract 22 times row 22 from row 11:

Computing the Inverse by Row Reduction
(1006−31010−32−10011−11)\begin{pmatrix} 1 & 0 & 0 & 6 & -3 & 1 \\ 0 & 1 & 0 & -3 & 2 & -1 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{pmatrix}

So A−1=(6−31−32−11−11)A^{-1} = \begin{pmatrix} 6 & -3 & 1 \\ -3 & 2 & -1 \\ 1 & -1 & 1 \end{pmatrix}.

Pitfall: Stopping at echelon form
Reading the right half once the left half is triangular, after the second step, gives (100−2101−11)\begin{pmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 1 & -1 & 1 \end{pmatrix}; AA times it has first row (−2,1,1)(-2, 1, 1), not (1,0,0)(1, 0, 0). The left half has to reach II; then the right half is A−1A^{-1}, with first row (6,−3,1)(6, -3, 1).

The reduction ran in two stages. The first two steps cleared the entries below the diagonal and left an upper triangular left half with ones on the diagonal. The last two steps worked upward from row 33 and cleared the entries above the diagonal, and every operation was applied to the whole row of six entries. Multiplying AA by the final right half returns II, which confirms the result.

RULE
If at any point during reduction the left half develops a row of all zeros, AA is singular and no inverse exists.

To compute the inverse of a specific matrix with each step shown, use the matrix calculator.
adj A3×3a2,2​a3,3​−a2,3​a3,2​a1,3​a3,2​−a1,2​a3,3​a1,2​a2,3​−a1,3​a2,2​a2,3​a3,1​−a2,1​a3,3​a1,1​a3,3​−a1,3​a3,1​a1,3​a2,1​−a1,1​a2,3​a2,1​a3,2​−a2,2​a3,1​a1,2​a3,1​−a1,1​a3,2​a1,1​a2,2​−a1,2​a2,1​÷det A|A|=A⁻¹3×3C1,1​/|A|C2,1​/|A|C3,1​/|A|C1,2​/|A|C2,2​/|A|C3,2​/|A|C1,3​/|A|C2,3​/|A|C3,3​/|A|
The identity reached on the left, the inverse on the right

The same row operations were applied to both halves throughout. By the time the left block has become the identity, the right block has recorded everything that was done to get there — and that record is the inverse. A matrix that cannot reach the identity has no inverse to record. Step through the operations on the matrix inverse visualizer.

For anything larger than 3×3 this is the method that is actually used; the adjugate route below is for understanding rather than for computing.

Computing the Inverse via the Adjugate

The adjugate identity A⋅adj⁡(A)=det⁡(A)⋅IA \cdot \operatorname{adj}(A) = \det(A) \cdot I gives an explicit formula when det⁡(A)≠0\det(A) \neq 0:

Inverse via Adjugate
A−1=1det⁡(A) adj⁡(A)A^{-1} = \frac{1}{\det(A)}\, \operatorname{adj}(A)

The adjugate is the transpose of the cofactor matrix, so each entry of A−1A^{-1} is a cofactor of AA divided by det⁡(A)\det(A).

Pitfall: Forgetting to transpose the cofactors
Dividing the cofactor matrix itself by det⁡(A)\det(A) for A=(3152)A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix} gives (2−5−13)\begin{pmatrix} 2 & -5 \\ -1 & 3 \end{pmatrix}, and AA times it is (5−128−19)\begin{pmatrix} 5 & -12 \\ 8 & -19 \end{pmatrix}. Transposed first, it gives the inverse (2−1−53)\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}.

For the 2×22 \times 2 case, the adjugate formula reduces to the swap-and-negate formula from section 22. The cofactor matrix of (abcd)\begin{pmatrix} a & b \\ c & d \end{pmatrix} is (d−c−ba)\begin{pmatrix} d & -c \\ -b & a \end{pmatrix}, and transposing gives (d−b−ca)\begin{pmatrix} d & -b \\ -c & a \end{pmatrix}, which is exactly the numerator matrix in the 2×22 \times 2 inverse formula.

For 3×33 \times 3 and larger matrices, the adjugate formula remains exact and fully symbolic — it shows explicitly how each entry of A−1A^{-1} depends on the entries of AA. This makes it valuable for theoretical work and for deriving sensitivity formulas. For numerical computation, however, it is vastly more expensive than row reduction: computing the adjugate requires n2n^2 cofactors, each of which is an (n−1)×(n−1)(n-1) \times (n-1) determinant.
A3×3a1,1​a1,2​a1,3​a2,1​a2,2​a2,3​a3,1​a3,2​a3,3​→C3×3a2,2​a3,3​−a2,3​a3,2​a2,3​a3,1​−a2,1​a3,3​a2,1​a3,2​−a2,2​a3,1​a1,3​a3,2​−a1,2​a3,3​a1,1​a3,3​−a1,3​a3,1​????
Cofactors assembled before transposing and dividing

Each position is being filled with the signed determinant of the matrix left when its row and column are deleted. Transposing this array and dividing by the determinant gives the inverse, which shows plainly where the failure lives: a zero determinant makes the final division impossible no matter how well the cofactors came out. Follow the full route on the matrix inverse visualizer.

The formula is exact and completely impractical beyond small matrices, since the number of cofactors grows faster than any gain in clarity.

Properties of the Inverse

The inverse satisfies a collection of identities that mirror and extend the familiar rules for reciprocals of real numbers.

Applying the inverse twice recovers the original:

Inverse Involution
(A−1)−1=A(A^{-1})^{-1} = A

The inverse of a product reverses the order:

Inverse of Product
(AB)−1=B−1A−1(AB)^{-1} = B^{-1} A^{-1}

Pitfall: Keeping the order in a product
Writing (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1} for A=(1101)A = \begin{pmatrix} 1 & 1 \\ 0 & 1 \end{pmatrix} and B=(1011)B = \begin{pmatrix} 1 & 0 \\ 1 & 1 \end{pmatrix} gives (2−1−11)\begin{pmatrix} 2 & -1 \\ -1 & 1 \end{pmatrix}. The inverse of AB=(2111)AB = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix} is B−1A−1=(1−1−12)B^{-1}A^{-1} = \begin{pmatrix} 1 & -1 \\ -1 & 2 \end{pmatrix}.

This generalizes to any number of factors — (A1A2⋯Ak)−1=Ak−1⋯A2−1A1−1(A_1 A_2 \cdots A_k)^{-1} = A_k^{-1} \cdots A_2^{-1} A_1^{-1}.

The reason is the order in which the matrices act. In ABxAB\mathbf{x}, the matrix BB acts on x\mathbf{x} first and AA acts second, so getting x\mathbf{x} back means removing AA first and BB second: B−1A−1(AB)x=B−1(A−1A)Bx=B−1Bx=xB^{-1}A^{-1}(AB)\mathbf{x} = B^{-1}(A^{-1}A)B\mathbf{x} = B^{-1}B\mathbf{x} = \mathbf{x}.

Transpose and inverse commute:

Inverse of Transpose
(AT)−1=(A−1)T(A^T)^{-1} = (A^{-1})^T

It does not matter whether you transpose first and then invert, or invert first and then transpose.

Scalars pass through as expected:

Inverse of Scalar Multiple
(cA)−1=1c A−1(cA)^{-1} = \frac{1}{c}\, A^{-1}

for any nonzero scalar cc. Powers behave cleanly:

Inverse of Power
(Ak)−1=A−k(A^k)^{-1} = A^{-k}

equivalently (A−1)k(A^{-1})^k.

The determinant of the inverse is the reciprocal of the determinant:

Determinant of Inverse
det⁡(A−1)=1det⁡(A)\det(A^{-1}) = \frac{1}{\det(A)}

This follows immediately from the multiplicative property of the determinant: det⁡(A)det⁡(A−1)=det⁡(AA−1)=det⁡(I)=1\det(A)\det(A^{-1}) = \det(AA^{-1}) = \det(I) = 1.
DownloadPNG2×PDF
Matrix · inverse

Properties of the inverse

Seven identities that mirror the rules for reciprocals — with two that do not. The order reversal and the missing sum rule are where the analogy with real numbers stops.

07identities
Conditional6
i
Involution§ 6(A−1)−1=A(A^{-1})^{-1} = A
Inverting twice returns the original.
Conditional
Holds when
AA invertible

Inverting twice returns the original. The inverse relation is symmetric — if BB is the inverse of AA then AA is the inverse of BB, so neither matrix in the pair is privileged.

ii
Inverse of a product§ 6(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}
The order reverses, because (AB)(B^-1A^-1) = A(BB^-1)A^-1 = AA^-1 = I only in that arrangement.
Conditional
Holds when
both AA and BB invertible
Common error
writing (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1} — the order must reverse

The order reverses, because (AB)(B−1A−1)=A(BB−1)A−1=AA−1=I(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AA^{-1} = I only in that arrangement. This extends to any number of factors: (A1A2⋯Ak)−1=Ak−1⋯A2−1A1−1(A_1A_2\cdots A_k)^{-1} = A_k^{-1}\cdots A_2^{-1}A_1^{-1}. The reversal is the same one the transpose performs, and both trace back to matrix multiplication not commuting.

iii
Inverse of a transpose§ 6(AT)−1=(A−1)T(A^{\mathsf{T}})^{-1} = (A^{-1})^{\mathsf{T}}
The two operations commute — transpose then invert, or invert then transpose, and the result is…
Conditional
Holds when
AA invertible

The two operations commute — transpose then invert, or invert then transpose, and the result is the same. Worth contrasting with the product rule directly above: there the order matters, here it does not.

iv
Scalar multiple§ 6(cA)−1=1cA−1(cA)^{-1} = \tfrac{1}{c}A^{-1}
Scalars pass through and invert.
Conditional
Holds when
AA invertible and c≠0c \neq 0

Scalars pass through and invert. The condition c≠0c \neq 0 is doing real work — 0⋅A0 \cdot A is the zero matrix, which is never invertible whatever AA was.

v
Powers§ 6(Ak)−1=(A−1)k(A^k)^{-1} = (A^{-1})^k
Follows from the product rule applied k times; the order reversal cancels out because every…
Conditional
Holds when
AA invertible, kk a positive integer

Follows from the product rule applied kk times; the order reversal cancels out because every factor is the same matrix. This is what lets negative exponents be defined at all, with A−kA^{-k} meaning either side of the identity.

vi
Determinant of the inverse§ 6det⁡(A−1)=1det⁡(A)\det(A^{-1}) = \dfrac{1}{\det(A)}
Immediate from (AB) = (A)(B) applied to AA^-1 = I.
Conditional
Holds when
det⁡(A)≠0\det(A) \neq 0

Immediate from det⁡(AB)=det⁡(A)det⁡(B)\det(AB) = \det(A)\det(B) applied to AA−1=IAA^{-1} = I. It also gives a one-line proof that a singular matrix has no inverse: there is no real number whose product with zero is one. See determinant properties.

Fails or undefined1
vii
Sum and difference§ 9(A+B)−1≠A−1+B−1(A + B)^{-1} \neq A^{-1} + B^{-1}
There is no product-style identity for the inverse of a sum, and A + B may not even be…
Fails
Fails when
in general — no rule exists

There is no product-style identity for the inverse of a sum, and A+BA + B may not even be invertible when both AA and BB are. The Woodbury identity handles a restricted case, but nothing does in general. This entry exists so the absence is stated rather than inferred from silence.

WitnessA = I, B = −I, both invertible
A + B = O, which has no inverse at all
Conditional
Fails or undefined
Involution§ 6Conditional
(A−1)−1=A(A^{-1})^{-1} = A
Holds when
AA invertible
Inverting twice returns the original. The inverse relation is symmetric — if BB is the inverse of AA then AA is the inverse of BB, so neither matrix in the pair is privileged.
Read the full section
(AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}
Holds when
both AA and BB invertible
Common error
writing (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1} — the order must reverse
The order reverses, because (AB)(B−1A−1)=A(BB−1)A−1=AA−1=I(AB)(B^{-1}A^{-1}) = A(BB^{-1})A^{-1} = AA^{-1} = I only in that arrangement. This extends to any number of factors: (A1A2⋯Ak)−1=Ak−1⋯A2−1A1−1(A_1A_2\cdots A_k)^{-1} = A_k^{-1}\cdots A_2^{-1}A_1^{-1}. The reversal is the same one the transpose performs, and both trace back to matrix multiplication not commuting.
Read the full section
(AT)−1=(A−1)T(A^{\mathsf{T}})^{-1} = (A^{-1})^{\mathsf{T}}
Holds when
AA invertible
The two operations commute — transpose then invert, or invert then transpose, and the result is the same. Worth contrasting with the product rule directly above: there the order matters, here it does not.
Read the full section
(cA)−1=1cA−1(cA)^{-1} = \tfrac{1}{c}A^{-1}
Holds when
AA invertible and c≠0c \neq 0
Scalars pass through and invert. The condition c≠0c \neq 0 is doing real work — 0⋅A0 \cdot A is the zero matrix, which is never invertible whatever AA was.
Read the full section
Powers§ 6Conditional
(Ak)−1=(A−1)k(A^k)^{-1} = (A^{-1})^k
Holds when
AA invertible, kk a positive integer
Follows from the product rule applied kk times; the order reversal cancels out because every factor is the same matrix. This is what lets negative exponents be defined at all, with A−kA^{-k} meaning either side of the identity.
Read the full section
det⁡(A−1)=1det⁡(A)\det(A^{-1}) = \dfrac{1}{\det(A)}
Holds when
det⁡(A)≠0\det(A) \neq 0
Immediate from det⁡(AB)=det⁡(A)det⁡(B)\det(AB) = \det(A)\det(B) applied to AA−1=IAA^{-1} = I. It also gives a one-line proof that a singular matrix has no inverse: there is no real number whose product with zero is one. See determinant properties.
Read the full section
(A+B)−1≠A−1+B−1(A + B)^{-1} \neq A^{-1} + B^{-1}
Fails when
in general — no rule exists
There is no product-style identity for the inverse of a sum, and A+BA + B may not even be invertible when both AA and BB are. The Woodbury identity handles a restricted case, but nothing does in general. This entry exists so the absence is stated rather than inferred from silence.
WitnessA = I, B = −I, both invertible
A + B = O, which has no inverse at all
Read the full section
Every identity here presupposes the matrices involved are invertible, which is exactly what the equivalence above characterises. Sum and difference are absent from this list because no rule exists — that absence is the entry, not an omission.
Properties of the inverse·/linear-algebra/matrix/inverseLearn Math Class
The inverse follows the rules of reciprocals except that order matters: to undo a product, undo the last factor first.

Solving Systems with the Inverse

When AA is invertible, the system Ax=bAx = \mathbf{b} has the unique solution

Solve System via Inverse
Ax=b  ⟹  x=A−1bA\mathbf{x} = \mathbf{b} \implies \mathbf{x} = A^{-1}\mathbf{b}

This is the matrix analogue of dividing both sides by AA. Multiplying both sides on the left by A−1A^{-1} gives A−1Ax=A−1bA^{-1}A\mathbf{x} = A^{-1}\mathbf{b}, which simplifies to x=A−1b\mathbf{x} = A^{-1}\mathbf{b}.

In principle, this solves the system in one matrix-vector multiplication — but only if A−1A^{-1} is already known. Computing A−1A^{-1} from scratch requires about three times as much work as solving the system once by Gaussian elimination, and the elimination approach is more numerically stable. Even when multiple systems share the same coefficient matrix AA with different right-hand sides, the LU decomposition is preferred: factor A=LUA = LU once, then solve each system with two cheap triangular substitutions.

The formula x=A−1b\mathbf{x} = A^{-1}\mathbf{b} is most valuable as a theoretical tool. It proves that an invertible system always has a unique solution, and it makes the dependence of x\mathbf{x} on b\mathbf{b} explicit and linear.

Inverses of Special Matrix Types

Several matrix types have inverses with guaranteed structure, and some are trivially cheap to compute.

A diagonal matrix D=diag(d1,…,dn)D = \text{diag}(d_1, \dots, d_n) is invertible if and only if every diagonal entry is nonzero, and its inverse simply reciprocates each entry:

Diagonal Matrix Inverse
D=diag(d1,…,dn)⇒D−1=diag(1/d1,…,1/dn)D = \text{diag}(d_1, \dots, d_n) \Rightarrow D^{-1} = \text{diag}(1/d_1, \dots, 1/d_n)

Pitfall: Reciprocating every entry
Applying the diagonal rule to A=(3152)A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix} gives (1/311/51/2)\begin{pmatrix} 1/3 & 1 \\ 1/5 & 1/2 \end{pmatrix}, and AA times it has first row (6/5,7/2)(6/5, 7/2), not (1,0)(1, 0). The inverse is (2−1−53)\begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}.

The rule works because a diagonal matrix scales each coordinate on its own: DD multiplies the ii-th coordinate by did_i and never mixes one coordinate into another. Undoing it means dividing each coordinate by its own did_i, which is exactly what diag(1/d1,…,1/dn)\text{diag}(1/d_1, \dots, 1/d_n) does. For example, diag(2,−4,5)−1=diag(1/2,−1/4,1/5)\text{diag}(2, -4, 5)^{-1} = \text{diag}(1/2, -1/4, 1/5).

An orthogonal matrix QQ has the cheapest possible inverse — its transpose:

Orthogonal Matrix Inverse
Q−1=QTQ^{-1} = Q^T

The inverse costs nothing to compute — just reinterpret the matrix with rows and columns swapped.

The inverse of an upper triangular matrix is upper triangular, and the inverse of a lower triangular matrix is lower triangular. The computation can be done by back-substitution without forming the full augmented matrix.

If AA is symmetric and invertible, then A−1A^{-1} is also symmetric: (A−1)T=(AT)−1=A−1(A^{-1})^T = (A^T)^{-1} = A^{-1}.

A block diagonal matrix diag(A1,…,Ak)\text{diag}(A_1, \dots, A_k) is invertible if and only if each block is invertible, and the inverse is diag(A1−1,…,Ak−1)\text{diag}(A_1^{-1}, \dots, A_k^{-1}) — each block is inverted independently.
DownloadPNG2×PDF
Matrix · inverse

When structure makes the inverse cheap

Each of these is invertible under a condition readable off the matrix, and each has an inverse that inherits the same structure. Recognising the type is worth more than any general algorithm.

6types
The inverse is free1
Orthogonal§ 8QTQ=IQ^{\mathsf{T}}Q = I
invertible whenalways — det⁡Q=±1\det Q = \pm 1
inverseQ−1=QTQ^{-1} = Q^{\mathsf{T}}
costnone — transpose
The only row where no arithmetic happens at all. Always invertible, and the inverse is a relabelling of the entries — which is why orthogonal factors are worth arranging for in a factorization.
The inverse is entrywise or blockwise2
Diagonal§ 8D=diag⁡(d1,…,dn)D = \operatorname{diag}(d_1, \ldots, d_n)
invertible whenevery di≠0d_i \neq 0
inversediag⁡(1/d1,…,1/dn)\operatorname{diag}(1/d_1, \ldots, 1/d_n)
costnn divisions
Reciprocate the diagonal. The condition is visible without computing anything, since the determinant is the product of exactly those entries.
Block diagonal§ 8diag⁡(A1,…,Ak)\operatorname{diag}(A_1, \ldots, A_k)
invertible whenevery block AiA_i invertible
inversediag⁡(A1−1,…,Ak−1)\operatorname{diag}(A_1^{-1}, \ldots, A_k^{-1})
costinvert each block
The diagonal case with numbers replaced by blocks. An n×nn \times n matrix in kk equal blocks costs kk inversions of size n/kn/k rather than one of size nn — a saving of k2k^2, since the cost is cubic.
The inverse comes from substitution2
Upper triangular§ 8zeros below the diagonal
invertible whenevery diagonal entry ≠0\neq 0
inverseupper triangular
costback substitution, n2n^2
Solve for the columns from the bottom up. The inverse stays upper triangular, which is why an LU factorization is worth keeping rather than discarding after the first solve.
Lower triangular§ 8zeros above the diagonal
invertible whenevery diagonal entry ≠0\neq 0
inverselower triangular
costforward substitution, n2n^2
The mirror image, worked from the top down. Together with the row above, these are the two solves an LU-based inverse actually performs.
Structure preserved but no shortcut1
Symmetric§ 8A=ATA = A^{\mathsf{T}}
invertible whendet⁡(A)≠0\det(A) \neq 0
inversealso symmetric
costhalf of a general solve
The one row whose condition is not local — symmetry constrains the inverse without deciding whether it exists. The saving is real but modest: only one triangle need be computed. When the matrix is also positive definite, Cholesky halves it again.
Two things recur down the table. The invertibility condition is always local — a diagonal entry, a block, never a determinant — and the inverse always belongs to the same family, which is what makes these routes composable. General row reduction discards both advantages and should be the fallback rather than the first move.
When structure makes the inverse cheap·/linear-algebra/matrix/inverseLearn Math Class
Two patterns run down the table and both are worth naming. The invertibility condition is local in every row but the last — a diagonal entry, a block, never a determinant — so whether the inverse exists can be settled by inspection. And the inverse always belongs to the same family as the original, which means these routes compose: the inverse of a product of triangular matrices is triangular, and nothing has to be recomputed from scratch.

Common Errors

Several incorrect analogies from scalar arithmetic cause persistent mistakes when working with matrix inverses.

The inverse does not distribute over addition. The expression (A+B)−1(A + B)^{-1} is not equal to A−1+B−1A^{-1} + B^{-1}, and there is no simple formula relating the two. If A=B=IA = B = I, then (A+B)−1=(2I)−1=12I(A + B)^{-1} = (2I)^{-1} = \frac{1}{2}I, while A−1+B−1=I+I=2IA^{-1} + B^{-1} = I + I = 2I — these are clearly different.

The inverse of a product reverses order. Writing (AB)−1=A−1B−1(AB)^{-1} = A^{-1}B^{-1} is wrong; the correct identity is (AB)−1=B−1A−1(AB)^{-1} = B^{-1}A^{-1}. The reversal is a consequence of non-commutativity: to undo the operation "first apply BB, then apply AA," you must first undo AA, then undo BB.

Not every matrix is invertible. Assuming an inverse exists without checking the determinant or rank leads to division-by-zero errors in the 2×22 \times 2 formula and to contradictions in row reduction.

The inverse is not the entry-by-entry reciprocal. The matrix A−1A^{-1} is not obtained by replacing each aija_{ij} with 1/aij1/a_{ij}. The inverse is a global operation that depends on all entries simultaneously.

Dropping the determinant factor

In the 2×22 \times 2 formula, the swap and the sign changes are the visible part of the work, and the division by ad−bcad - bc is left out. The result is det⁡(A)\det(A) times the inverse, not the inverse.

Wrong working: for A=(4726)A = \begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix}, swap the diagonal entries and negate the off-diagonal ones:
A−1=(6−7−24)A^{-1} = \begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix}


Right working: det⁡(A)=4⋅6−7⋅2=10\det(A) = 4 \cdot 6 - 7 \cdot 2 = 10, so
A−1=110(6−7−24)=(0.6−0.7−0.20.4)A^{-1} = \frac{1}{10}\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix} = \begin{pmatrix} 0.6 & -0.7 \\ -0.2 & 0.4 \end{pmatrix}


Why it happens: many practice matrices, including the worked examples in section 22, have determinant 11, where the division changes nothing and is easy to forget.

How to check: multiply AA by the answer. The wrong form gives (100010)=10I\begin{pmatrix} 10 & 0 \\ 0 & 10 \end{pmatrix} = 10I; the right form gives II.

Stopping at echelon form

Row reduction of [A∣I][A \mid I] has two stages: clearing the entries below the diagonal, then clearing the entries above it. After the first stage the left half is triangular and looks finished, and the right half is read off as the inverse.

Wrong working: for the matrix AA of section 44, stop when the left half is (121011001)\begin{pmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 1 \end{pmatrix} and take
A−1=(100−2101−11)A^{-1} = \begin{pmatrix} 1 & 0 & 0 \\ -2 & 1 & 0 \\ 1 & -1 & 1 \end{pmatrix}


Right working: continue upward. Subtract row 33 from rows 22 and 11, then subtract 22 times row 22 from row 11. The left half becomes II, and
A−1=(6−31−32−11−11)A^{-1} = \begin{pmatrix} 6 & -3 & 1 \\ -3 & 2 & -1 \\ 1 & -1 & 1 \end{pmatrix}


Why it happens: when Gaussian elimination is used to solve a system, it stops at echelon form and finishes with back-substitution, and that habit carries over to the inverse.

How to check: the left half must be exactly II before the right half is read. Multiplying also catches it: AA times the wrong form is (−211−523−203)\begin{pmatrix} -2 & 1 & 1 \\ -5 & 2 & 3 \\ -2 & 0 & 3 \end{pmatrix}, while AA times the right form is II.

Forgetting to transpose the cofactors

The adjugate formula needs two steps once the cofactors are known: transpose the cofactor matrix, then divide by the determinant. The transpose is skipped, and the cofactor matrix itself is divided by det⁡(A)\det(A).

Wrong working: for A=(3152)A = \begin{pmatrix} 3 & 1 \\ 5 & 2 \end{pmatrix}, the cofactors are C11=2C_{11} = 2, C12=−5C_{12} = -5, C21=−1C_{21} = -1, C22=3C_{22} = 3, and det⁡(A)=1\det(A) = 1, so
A−1=(2−5−13)A^{-1} = \begin{pmatrix} 2 & -5 \\ -1 & 3 \end{pmatrix}


Right working: transpose first, so adj⁡(A)=(2−1−53)\operatorname{adj}(A) = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}, and
A−1=11adj⁡(A)=(2−1−53)A^{-1} = \frac{1}{1}\operatorname{adj}(A) = \begin{pmatrix} 2 & -1 \\ -5 & 3 \end{pmatrix}


Why it happens: the cofactor CijC_{ij} is computed for position (i,j)(i, j), and it feels natural to leave it there. For a symmetric matrix the transpose changes nothing, so the slip goes unnoticed in such examples.

How to check: multiply AA by the answer. The wrong form gives (5−128−19)\begin{pmatrix} 5 & -12 \\ 8 & -19 \end{pmatrix}, the right form gives II. For a 2×22 \times 2 matrix, the result must also agree with the swap-and-negate formula.
Mistake Wrong Correct
Distributing over sum (A + B)⁻¹ = A⁻¹ + B⁻¹ no simple formula relates them
Order in a product (AB)⁻¹ = A⁻¹B⁻¹ (AB)⁻¹ = B⁻¹A⁻¹ (order reverses)
Assuming invertibility every square A has an inverse A⁻¹ exists iff det(A) ≠ 0
Entry-by-entry reciprocal (A⁻¹)ᵢⱼ = 1/aᵢⱼ inverse is a global operation depending on all entries

When Not to Compute the Inverse

The formula x=A−1b\mathbf{x} = A^{-1}\mathbf{b} is clean on paper but misleading as a computational strategy. In almost every practical setting, solving Ax=bAx = \mathbf{b} by row reduction or LU decomposition is faster and more numerically stable than computing A−1A^{-1} first and then multiplying.

Fact: Fractions in, trillions out
The Hilbert matrix, with entries 1i+j−1\frac{1}{i + j - 1}, has an inverse made entirely of whole numbers, and for the 10×1010 \times 10 one the largest is 3,480,673,996,8003{,}480{,}673{,}996{,}800. Rounding errors in the entries get multiplied by numbers that large, so a computer carrying 16 digits can lose about 13 of them.

Row reduction requires roughly 23n3\frac{2}{3}n^3 operations to factor a system. Computing the full inverse requires roughly 2n32n^3 operations — three times the cost — and introduces additional rounding error in floating-point arithmetic. When multiple systems with the same AA need to be solved, the LU factorization should be computed once and reused, not replaced by an explicit inverse.

The inverse is the right object when A−1A^{-1} itself — the entire matrix, not just its action on a specific b\mathbf{b} — is what matters. This happens in theoretical derivations, in symbolic formulas where the dependence on parameters must be made explicit, in sensitivity analysis, and when working with small matrices by hand. For a 2×22 \times 2 or 3×33 \times 3 matrix, computing the inverse directly is perfectly reasonable. For an n×nn \times n matrix with nn in the hundreds or thousands, it is almost never the right approach.

Methods of Computing the Inverse

Three methods can produce A−1A^{-1} explicitly — the 2×22 \times 2 swap-and-negate formula, row reduction of [A∣I][A \mid I], and the adjugate identity — and a fourth strategy, often the best one in practice, is to skip computing A−1A^{-1} altogether and solve Ax=bA\mathbf{x} = \mathbf{b} directly. The table below collects them with the conditions each requires, the cost in operations, and the situation each fits.
Method Applies when Cost (n × n) Best for
2 × 2 swap-and-negate formula n = 2 and ad − bc ≠ 0 trivial (constant time) by-hand work on 2 × 2 matrices
Row reduction of [A | I] det(A) ≠ 0 (verified during reduction) ≈ 2n³ operations numerical computation when A⁻¹ itself is needed
Adjugate formula  A⁻¹ = adj(A)/det(A) det(A) ≠ 0; symbolic entries n² cofactors, each an (n−1)-determinant theoretical derivations, sensitivity formulas
Solve Ax = b directly (skip A⁻¹) only A⁻¹b is needed, not A⁻¹ itself ≈ ⅔ n³ (Gaussian elimination) + reusable LU virtually every practical linear system
The table compares the four methods by cost. The map below puts them in the order to ask about them, starting with whether the inverse is needed at all.
DownloadPNG2×PDF
every route at once
computing the inverse

Which method for the inverse?

Ask first whether the inverse itself is needed; most practical work stops there.
Exists only ifdet(A) ≠ 0. Every method below assumes an invertible matrix.
1
Only the solution of Ax = b needed?not the matrix A⁻¹ itself
yes
Solve Ax = b directly
Gaussian elimination, about ⅔n³ operations; the LU factors can be reused→ When not to compute the inverse
no
2
Is A a 2 × 2 matrix?
yes
Swap-and-negate formula
swap the diagonal entries, negate the off-diagonal ones, divide by ad − bc→ The 2×2 formula
no
3
Are the entries symbolic?letters or parameters, not numbers
yes
Adjugate formula
A⁻¹ = adj(A) / det(A): n² cofactors, each an (n − 1) determinant→ Via the adjugate
no
Row reduction of [A | I]
reduce to [I | A⁻¹], about 2n³ operations; a singular A shows up during the reduction→ By row reduction
Which method for the inverse?·/linear-algebra/matrix/inverseLearn Math Class
The first exit is the one numerical work takes most often. Computing A−1A^{-1} from scratch costs about three times as much as solving the system once, so the other three routes are for when the matrix A−1A^{-1} itself is the goal. When not to compute the inverse goes through the cost in detail.

Matrix Inverse FAQ

Can you write BA\frac{B}{A} for matrices?

+
No, because a fraction bar cannot record which side the inverse acts on, and the two sides give different answers. From AX=BAX = B you premultiply to get X=A−1BX = A^{-1}B; from XA=BXA = B you postmultiply to get X=BA−1X = BA^{-1}. Since A−1B≠BA−1A^{-1}B \neq BA^{-1} in general, no textbook defines matrix division.Read more →

Why is (AB)−1(AB)^{-1} equal to B−1A−1B^{-1}A^{-1} rather than A−1B−1A^{-1}B^{-1}?

+
Because undoing a sequence means undoing the last step first, the way you take off a coat before the shirt under it. In ABxAB\mathbf{x}, BB acts on x\mathbf{x} first and AA second, so getting x\mathbf{x} back means removing AA first: B−1A−1(AB)x=xB^{-1}A^{-1}(AB)\mathbf{x} = \mathbf{x}. The scalar habit, where order never mattered, produces the wrong version here. The transpose reverses for the same reason: (AB)T=BTAT(AB)^{T} = B^{T}A^{T}.Read more →

What does A−TA^{-T} mean?

+
It is a compact spelling for the inverse and the transpose together, and the order does not matter: (A−1)T=(AT)−1(A^{-1})^{T} = (A^{T})^{-1}, so one mark covers both readings. It appears frequently in optimization, statistics and numerical writing, where the combination is common enough to deserve its own abbreviation.Read more →

Can a non-square matrix have an inverse?

+
Not a two-sided one. For an m×nm \times n matrix with m≠nm \neq n, rank(A)≤min⁡(m,n)\text{rank}(A) \le \min(m, n), so one of the two products, m×mm \times m or n×nn \times n, has rank too low to be an identity. What can exist is a one-sided inverse: a left inverse when the columns are independent (full column rank), or a right inverse when the rows are (full row rank).Read more →

Is (A+B)−1(A + B)^{-1} equal to A−1+B−1A^{-1} + B^{-1}?

+
No, and there is no general formula for the inverse of a sum. With A=B=IA = B = I, (A+B)−1=(2I)−1=12I(A + B)^{-1} = (2I)^{-1} = \frac{1}{2}I, while A−1+B−1=2IA^{-1} + B^{-1} = 2I. The sum need not even be invertible when both terms are: A=IA = I and B=−IB = -I are invertible, but A+B=OA + B = O has no inverse at all.Read more →

Is a randomly chosen matrix invertible?

+
Almost surely, if the entries are drawn at random from an interval of real numbers: the probability is 11. The singular matrices are exactly those with det⁡(A)=0\det(A) = 0, a single equation that cuts out a surface with no volume in the space of entries. With entries restricted to 00 and 11 the odds change sharply: only 66 of the 1616 such 2×22 \times 2 matrices are invertible.Read more →

Why is the Hilbert matrix so hard to invert on a computer?

+
Because its inverse has enormous entries. The Hilbert matrix has entries 1i+j−1\frac{1}{i + j - 1}, and its inverse is made entirely of whole numbers; for the 10×1010 \times 10 case the largest is 3,480,673,996,8003{,}480{,}673{,}996{,}800. Rounding errors in the stored fractions get multiplied by numbers that large, so arithmetic carrying about 16 digits can lose about 13 of them.Read more →