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.



Definition of the Inverse

For a square matrix AA of order nn, the inverse — if it exists — is the unique matrix A1A^{-1} satisfying

Inverse Definition
AA1=A1A=IAA^{-1} = A^{-1}A = I

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.

The inverse is defined only for square matrices. A rectangular matrix cannot satisfy AA1=A1A=IAA^{-1} = A^{-1}A = I because the products would require incompatible dimensions. 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.

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 IImatrix notation; the arithmetic a1a^{-1} the label imitates — negative exponents.
A1A^{-1}
A inverse
The 1-1 superscript's fourth habitat — and like f1f^{-1} and sin1\sin^{-1}, a label: A1A^{-1} is defined by AA1=A1A=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 A1A^{-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 A1A^{-1} multiplies.
A/BA/B — does not exist
Matrix division — a notation deliberately never defined
The missing sign is itself a convention: since AB1B1AAB^{-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=A1BX = A^{-1}B. From XA=BXA = B: postmultiply to get X=BA1X = 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=B1A1(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: An=(A1)nA^{-n} = (A^{-1})^n extends matrix powers downward, and (A1)T=(AT)1(A^{-1})^{T} = (A^{T})^{-1} — written ATA^{-T} in advanced and numerical texts, one compact mark for the pair.
Also writtenATA^{-T}, as above — worth recognizing on sight in optimization and statistics writing.
Do not confuse(AB)1=A1B1(AB)^{-1} = A^{-1}B^{-1} — the scalar-habit version, false for matrices whenever ABBAAB \neq BA; the same trap as (AB)T(AB)^T, and the same cure: reverse.

The 2×2 Inverse Formula

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

Inverse 2x2 Formula
(abcd)1=1adbc(dbca)\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 adbcad - bc.

Worked Examples


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

Verification: AA1=(3152)(2153)=(653+310105+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 2643=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 76=17 - 6 = 1. The inverse is A1=(7321)A^{-1} = \begin{pmatrix} 7 & -3 \\ -2 & 1 \end{pmatrix}.

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 ARn×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}

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 bRn\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.
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 bRn\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

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 [AI][A \mid I] and apply row operations to reduce the left half to the identity. If the reduction succeeds, the right half becomes A1A^{-1}:

Inverse via Row Reduction
[AI]row ops[IA1][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 EkE2E1A=IE_k \cdots E_2 E_1 A = I, which means A1=EkE2E1A^{-1} = E_k \cdots E_2 E_1. Applying the same operations to II produces exactly this product.

Worked Example


A=(121253133)A = \begin{pmatrix} 1 & 2 & 1 \\ 2 & 5 & 3 \\ 1 & 3 & 3 \end{pmatrix}


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

(121100011210012101)\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:

(121100011210001111)\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:

(120011010321001111)\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:

(100631010321001111)\begin{pmatrix} 1 & 0 & 0 & 6 & -3 & 1 \\ 0 & 1 & 0 & -3 & 2 & -1 \\ 0 & 0 & 1 & 1 & -1 & 1 \end{pmatrix}


So A1=(631321111)A^{-1} = \begin{pmatrix} 6 & -3 & 1 \\ -3 & 2 & -1 \\ 1 & -1 & 1 \end{pmatrix}.

If at any point during reduction the left half develops a row of all zeros, AA is singular and no inverse exists.
adj A3×3a2,2a3,3a2,3a3,2a1,3a3,2a1,2a3,3a1,2a2,3a1,3a2,2a2,3a3,1a2,1a3,3a1,1a3,3a1,3a3,1a1,3a2,1a1,1a2,3a2,1a3,2a2,2a3,1a1,2a3,1a1,1a3,2a1,1a2,2a1,2a2,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 Aadj(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
A1=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 A1A^{-1} is a cofactor of AA divided by det(A)\det(A).

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 (dcba)\begin{pmatrix} d & -c \\ -b & a \end{pmatrix}, and transposing gives (dbca)\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 A1A^{-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 (n1)×(n1)(n-1) \times (n-1) determinant.
A3×3a1,1a1,2a1,3a2,1a2,2a2,3a3,1a3,2a3,3C3×3a2,2a3,3a2,3a3,2a2,3a3,1a2,1a3,3a2,1a3,2a2,2a3,1a1,3a3,2a1,2a3,3a1,1a3,3a1,3a3,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
(A1)1=A(A^{-1})^{-1} = A

The inverse of a product reverses the order:

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

This generalizes to any number of factors — (A1A2Ak)1=Ak1A21A11(A_1 A_2 \cdots A_k)^{-1} = A_k^{-1} \cdots A_2^{-1} A_1^{-1}.

Transpose and inverse commute:

Inverse of Transpose
(AT)1=(A1)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=1cA1(cA)^{-1} = \frac{1}{c}\, A^{-1}

for any nonzero scalar cc. Powers behave cleanly:

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

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

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

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

This follows immediately from the multiplicative property of the determinant: det(A)det(A1)=det(AA1)=det(I)=1\det(A)\det(A^{-1}) = \det(AA^{-1}) = \det(I) = 1.
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(A1)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=B1A1(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=A1B1(AB)^{-1} = A^{-1}B^{-1} — the order must reverse

The order reverses, because (AB)(B1A1)=A(BB1)A1=AA1=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: (A1A2Ak)1=Ak1A21A11(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=(A1)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=1cA1(cA)^{-1} = \tfrac{1}{c}A^{-1}
Scalars pass through and invert.
Conditional
Holds when
AA invertible and c0c \neq 0

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

v
Powers§ 6(Ak)1=(A1)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 AkA^{-k} meaning either side of the identity.

vi
Determinant of the inverse§ 6det(A1)=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 AA1=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)1A1+B1(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
(A1)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=B1A1(AB)^{-1} = B^{-1}A^{-1}
Holds when
both AA and BB invertible
Common error
writing (AB)1=A1B1(AB)^{-1} = A^{-1}B^{-1} — the order must reverse
The order reverses, because (AB)(B1A1)=A(BB1)A1=AA1=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: (A1A2Ak)1=Ak1A21A11(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=(A1)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=1cA1(cA)^{-1} = \tfrac{1}{c}A^{-1}
Holds when
AA invertible and c0c \neq 0
Scalars pass through and invert. The condition c0c \neq 0 is doing real work — 0A0 \cdot A is the zero matrix, which is never invertible whatever AA was.
Read the full section
Powers§ 6Conditional
(Ak)1=(A1)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 AkA^{-k} meaning either side of the identity.
Read the full section
det(A1)=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 AA1=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)1A1+B1(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

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=A1bA\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 A1A^{-1} gives A1Ax=A1bA^{-1}A\mathbf{x} = A^{-1}\mathbf{b}, which simplifies to x=A1b\mathbf{x} = A^{-1}\mathbf{b}.

In principle, this solves the system in one matrix-vector multiplication — but only if A1A^{-1} is already known. Computing A1A^{-1} from scratch requires roughly as much work as solving the system 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=A1b\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)D1=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)

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

Orthogonal Matrix Inverse
Q1=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 A1A^{-1} is also symmetric: (A1)T=(AT)1=A1(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(A11,,Ak1)\text{diag}(A_1^{-1}, \dots, A_k^{-1}) — each block is inverted independently.
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 — detQ=±1\det Q = \pm 1
inverseQ1=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 di0d_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(A11,,Ak1)\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 A1+B1A^{-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 A1+B1=I+I=2IA^{-1} + B^{-1} = I + I = 2I — these are clearly different.

The inverse of a product reverses order. Writing (AB)1=A1B1(AB)^{-1} = A^{-1}B^{-1} is wrong; the correct identity is (AB)1=B1A1(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 A1A^{-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.
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=A1b\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 A1A^{-1} first and then multiplying.

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 A1A^{-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 A1A^{-1} explicitly — the 2×22 \times 2 swap-and-negate formula, row reduction of [AI][A \mid I], and the adjugate identity — and a fourth strategy, often the best one in practice, is to skip computing A1A^{-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 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

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=A1BX = A^{-1}B; from XA=BXA = B you postmultiply to get X=BA1X = BA^{-1}. Since A1BBA1A^{-1}B \neq BA^{-1} in general, no textbook defines matrix division.Read more →

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

+
Because undoing a sequence means undoing the last step first, the way you remove a coat before a shirt. Multiplying by AA then BB is reversed by undoing BB then AA. 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 ATA^{-T} mean?

+
It is a compact spelling for the inverse and the transpose together, and the order does not matter: (A1)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 →