Matrix Inverse via Cofactors

⚡ Key Takeaways

Matrix Inverse via Cofactors computes the inverse of a square matrix AA as A−1=1det⁡(A)adj⁡(A)A^{-1} = \frac{1}{\det(A)}\operatorname{adj}(A), where adj⁡(A)\operatorname{adj}(A) is the adjugate — the transpose of the matrix of signed minors (cofactors). Works for any invertible n×nn \times n matrix over a field (or commutative ring with invertible determinant). Classic result formalized in the 18th–19th century; foundational in linear algebra courses, Cramer's rule, and symbolic computation.

💡 The Core Insight

The product of a row of AA with the corresponding column of the cofactor matrix reproduces the cofactor (Laplace) expansion of the determinant. The product with a non-corresponding column reproduces the determinant of a matrix with a repeated row — which is always zero. These two facts — "right answer on the diagonal, zero off the diagonal" — are exactly the statement A adj⁡(A)=det⁡(A)IA\,\operatorname{adj}(A) = \det(A) I. Dividing by det⁡(A)\det(A) gives the inverse.

Formal Statement

DefinitionMinor, Cofactor, and Adjugate

Let A=(aij)A = (a_{ij}) be an n×nn \times n matrix over a field FF. The (i,j)(i,j) minor MijM_{ij} is the determinant of the (n−1)×(n−1)(n-1)\times(n-1) matrix obtained by deleting row ii and column jj of AA. The (i,j)(i,j) cofactor is the signed minor:

1
Cij=(−1)i+jMij.\quad C_{ij} = (-1)^{i+j} M_{ij}.

Derivation hint: the sign (−1)i+j(-1)^{i+j} is the parity contributed by moving entry (i,j)(i,j) to the top-left corner via row/column swaps in the determinant's permutation sum. The cofactor matrix is C=(Cij)C = (C_{ij}). The adjugate (classical adjoint) is its transpose:

2
adj⁡(A)=CT,(adj⁡(A))ij=Cji.\quad \operatorname{adj}(A) = C^{T}, \qquad \big(\operatorname{adj}(A)\big)_{ij} = C_{ji}.

Derivation hint: transposition is required so that the row–column pairing in A adj⁡(A)A\,\operatorname{adj}(A) pairs row ii of AA with the cofactors of row ii, reconstructing a Laplace expansion.

TheoremCofactor Inverse Formula

For any n×nn \times n matrix AA,

3
A adj⁡(A)=adj⁡(A) A=det⁡(A) In.\quad A\,\operatorname{adj}(A) = \operatorname{adj}(A)\,A = \det(A)\, I_n.

Derivation hint: the diagonal entries are Laplace expansions of det⁡(A)\det(A); off-diagonal entries are Laplace expansions of a determinant with a duplicated row, hence zero. If det⁡(A)≠0\det(A) \neq 0, then AA is invertible and

4
A−1=1det⁡(A) adj⁡(A).\quad A^{-1} = \frac{1}{\det(A)}\,\operatorname{adj}(A).

Derivation hint: multiply [3] on the left or right by 1det⁡(A)I\frac{1}{\det(A)}I and use uniqueness of the two-sided inverse. Entrywise, this reads

5
(A−1)ij=Cjidet⁡(A)=(−1)i+jMjidet⁡(A).\quad \big(A^{-1}\big)_{ij} = \frac{C_{ji}}{\det(A)} = \frac{(-1)^{i+j} M_{ji}}{\det(A)}.

Derivation hint: read off entry (i,j)(i,j) of adj⁡(A)/det⁡(A)\operatorname{adj}(A)/\det(A) using (adj⁡A)ij=Cji(\operatorname{adj}A)_{ij}=C_{ji} from [2]; note the swapped indices.

Why It Holds / Derivation

ProofThat A adj⁡(A)=det⁡(A) IA\,\operatorname{adj}(A) = \det(A)\,I

Step 1 — Laplace expansion. Fix a row ii. Expanding det⁡(A)\det(A) along row ii gives

6
det⁡(A)=∑k=1naik Cik.\quad \det(A) = \sum_{k=1}^{n} a_{ik}\, C_{ik}.

Derivation hint: group the n!n! terms of the Leibniz determinant sum by which column the entry from row ii occupies; the remaining factor is exactly CikC_{ik}.

Step 2 — Diagonal entries. The (i,i)(i,i) entry of A adj⁡(A)A\,\operatorname{adj}(A) is

7
(A adj⁡(A))ii=∑k=1naik (adj⁡A)ki=∑k=1naik Cik=det⁡(A).\quad \big(A\,\operatorname{adj}(A)\big)_{ii} = \sum_{k=1}^{n} a_{ik}\,(\operatorname{adj}A)_{ki} = \sum_{k=1}^{n} a_{ik}\,C_{ik} = \det(A).

Derivation hint: substitute (adj⁡A)ki=Cik(\operatorname{adj}A)_{ki}=C_{ik} from [2], then apply [6].

Step 3 — Off-diagonal entries. For i≠ji \neq j,

8
(A adj⁡(A))ij=∑k=1naik (adj⁡A)kj=∑k=1naik Cjk.\quad \big(A\,\operatorname{adj}(A)\big)_{ij} = \sum_{k=1}^{n} a_{ik}\,(\operatorname{adj}A)_{kj} = \sum_{k=1}^{n} a_{ik}\,C_{jk}.

Derivation hint: again use [2], now pairing row ii entries with cofactors of row jj. This last sum is the Laplace expansion along row jj of the matrix A′A' formed from AA by replacing row jj with a copy of row ii. Since CjkC_{jk} depends only on rows ≠j\neq j, it equals the cofactor of A′A' in position (j,k)(j,k), so

9
∑k=1naik Cjk=det⁡(A′)=0,\quad \sum_{k=1}^{n} a_{ik}\,C_{jk} = \det(A') = 0,

because A′A' has two identical rows (rows ii and jj). Derivation hint: a determinant with two equal rows vanishes — swapping them negates the determinant yet leaves it unchanged, forcing it to be 00 (char ≠2\neq 2; the result holds in all characteristics via the alternating Leibniz formula).

Step 4 — Combine. Equations [7] and [9] give (A adj⁡(A))ij=δijdet⁡(A)\big(A\,\operatorname{adj}(A)\big)_{ij} = \delta_{ij}\det(A), i.e. A adj⁡(A)=det⁡(A)IA\,\operatorname{adj}(A)=\det(A)I. The identity adj⁡(A) A=det⁡(A)I\operatorname{adj}(A)\,A=\det(A)I follows identically by expanding along columns instead of rows. ■\blacksquare

∎
⚠️ The identity is universal; the inverse is conditional

Theorem [3] holds for every square matrix, singular or not — it is a polynomial identity in the entries aija_{ij}. Only [4] requires det⁡(A)≠0\det(A) \neq 0. When det⁡(A)=0\det(A)=0, adj⁡(A)\operatorname{adj}(A) still exists but A−1A^{-1} does not; instead A adj⁡(A)=0A\,\operatorname{adj}(A)=0.

mathematician · Pierre-Simon Laplace | 1749–1827

Laplace's 1772 memoir on determinants gave the systematic cofactor expansion (Laplace expansion) that underpins this entire method. While determinants trace to Leibniz and Cramer, Laplace's recursive expansion along a row or column is the engine that connects minors to the determinant and, through the adjugate, to the inverse. The term "adjugate" and the modern A−1=adj⁡(A)/det⁡(A)A^{-1}=\operatorname{adj}(A)/\det(A) packaging crystallized through Cauchy and later 19th-century algebraists.

Building Intuition

🧠 Intuition

Think of det⁡(A)\det(A) as the signed volume scaling factor of the linear map AA. The inverse map must rescale volumes by 1/det⁡(A)1/\det(A) — that explains the denominator. The numerator, adj⁡(A)\operatorname{adj}(A), encodes "how each output coordinate is built from sub-volumes." Each cofactor CijC_{ij} measures the volume of the parallelepiped spanned by all columns except column jj, projected appropriately. Solving Ax=bAx=b by Cramer's rule replaces column jj of AA with bb — the cofactors are precisely the partial derivatives of det⁡\det with respect to the matrix entries: ∂det⁡(A)/∂aij=Cij\partial \det(A)/\partial a_{ij} = C_{ij}. The adjugate is therefore the gradient of the determinant, reshaped.

Figure
Cofactor structure of a 3×3 matrix: deleting row 2, column 1 to form minor M₂₁
Matrix A (delete row 2, col 1): a11a12a13 a21a22a23 a31a32a33 a12a13 a32a33 M₂₁ = a12·a33 − a13·a32 C₂₁ = (−1)²⁺¹ M₂₁ = −M₂₁ adj(A)₁₂ = C₂₁ (note the index transpose)

Worked Examples

Example2×2 inverse

Given:

10
A=(4726).\quad A = \begin{pmatrix} 4 & 7 \\ 2 & 6 \end{pmatrix}.

Derivation hint: a generic invertible 2×22\times 2 matrix; entries chosen for a clean nonzero determinant.

Step 1 — Determinant: det⁡(A)=4⋅6−7⋅2=24−14=10.\det(A) = 4\cdot 6 - 7\cdot 2 = 24 - 14 = 10.

Step 2 — Cofactors. For 2×22\times 2, C11=a22=6C_{11}=a_{22}=6, C12=−a21=−2C_{12}=-a_{21}=-2, C21=−a12=−7C_{21}=-a_{12}=-7, C22=a11=4C_{22}=a_{11}=4. So

11
C=(6−2−74),adj⁡(A)=CT=(6−7−24).\quad C = \begin{pmatrix} 6 & -2 \\ -7 & 4 \end{pmatrix}, \qquad \operatorname{adj}(A)=C^{T}=\begin{pmatrix} 6 & -7 \\ -2 & 4 \end{pmatrix}.

Derivation hint: the 2×22\times2 adjugate is "swap diagonal, negate off-diagonal," which is exactly CTC^T here.

Step 3 — Inverse:

12
 A−1=110(6−7−24)=(0.6−0.7−0.20.4) \quad \boxed{\,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}\,}

Derivation hint: scale adj⁡(A)\operatorname{adj}(A) by 1/det⁡(A)=1/101/\det(A)=1/10.

Check: AA−1=(4(0.6)+7(−0.2)4(−0.7)+7(0.4)2(0.6)+6(−0.2)2(−0.7)+6(0.4))=(1001).A A^{-1}=\begin{pmatrix}4(0.6)+7(-0.2)&4(-0.7)+7(0.4)\\2(0.6)+6(-0.2)&2(-0.7)+6(0.4)\end{pmatrix}=\begin{pmatrix}1&0\\0&1\end{pmatrix}. ✓ (dimensionless)

Example3×3 inverse

Given:

13
A=(123014560).\quad A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 1 & 4 \\ 5 & 6 & 0 \end{pmatrix}.

Derivation hint: a standard textbook matrix with an easy-to-track structure.

Step 1 — Determinant (expand along row 1):

14
det⁡(A)=1(1⋅0−4⋅6)−2(0⋅0−4⋅5)+3(0⋅6−1⋅5)=−24+40−15=1.\quad \det(A) = 1(1\cdot0-4\cdot6) - 2(0\cdot0-4\cdot5) + 3(0\cdot6-1\cdot5) = -24 + 40 - 15 = 1.

Derivation hint: each bracket is a 2×22\times2 minor; signs alternate +,−,++,-,+ along the row.

Step 2 — Cofactor matrix. Compute all nine signed minors:

15
C=(−2420−518−1545−41).\quad C = \begin{pmatrix} -24 & 20 & -5 \\ 18 & -15 & 4 \\ 5 & -4 & 1 \end{pmatrix}.

Derivation hint: e.g. C11=+det⁡ ⁣(1460)=−24C_{11}=+\det\!\begin{pmatrix}1&4\\6&0\end{pmatrix}=-24, C12=−det⁡ ⁣(0450)=20C_{12}=-\det\!\begin{pmatrix}0&4\\5&0\end{pmatrix}=20, C23=−det⁡ ⁣(1256)=4C_{23}=-\det\!\begin{pmatrix}1&2\\5&6\end{pmatrix}=4; apply signs (−1)i+j(-1)^{i+j} throughout.

Step 3 — Adjugate (transpose) and inverse:

16
adj⁡(A)=CT=(−2418520−15−4−541).\quad \operatorname{adj}(A)=C^{T}=\begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix}.

Derivation hint: transpose [15]; rows of CC become columns of adj⁡(A)\operatorname{adj}(A). Since det⁡(A)=1\det(A)=1:

17
 A−1=(−2418520−15−4−541) \quad \boxed{\,A^{-1}=\begin{pmatrix} -24 & 18 & 5 \\ 20 & -15 & -4 \\ -5 & 4 & 1 \end{pmatrix}\,}

Derivation hint: dividing by det⁡(A)=1\det(A)=1 leaves adj⁡(A)\operatorname{adj}(A) unchanged.

Check (first column): A⋅(−24,20,−5)T=(−24+40−15, 0+20−20, −120+120+0)T=(1,0,0)T.A \cdot (-24,20,-5)^T = (-24+40-15,\,0+20-20,\,-120+120+0)^T = (1,0,0)^T. ✓ (dimensionless)

Common Misconceptions

⚠️ Frequent errors
  • Forgetting the transpose. A−1=C/det⁡(A)A^{-1}=C/\det(A) is wrong; it must be CT/det⁡(A)C^{T}/\det(A). The mistake is invisible for symmetric cofactor matrices, so test cases hide it.
  • Sign of the checkerboard. The pattern (−1)i+j(-1)^{i+j} starts with ++ in the top-left and alternates. Index from 11, not 00.
  • Index swap in [5]. Entry (i,j)(i,j) of A−1A^{-1} uses CjiC_{ji}, not CijC_{ij} — the transpose again.
  • "det⁡(A)=0\det(A)=0 means undefined cofactors." No — cofactors and adj⁡(A)\operatorname{adj}(A) are perfectly defined; only the division fails.
  • Efficiency. Cofactor expansion of an n×nn\times n inverse costs O(n!⋅n)O(n!\cdot n) naively — catastrophically slow. Use it for theory and tiny matrices, not numerics.
CounterexampleThe method cannot rescue a singular matrix

Let A=(1224)A=\begin{pmatrix}1&2\\2&4\end{pmatrix}, so det⁡(A)=1⋅4−2⋅2=0\det(A)=1\cdot4-2\cdot2=0. The adjugate is adj⁡(A)=(4−2−21)\operatorname{adj}(A)=\begin{pmatrix}4&-2\\-2&1\end{pmatrix}, and indeed

18
A adj⁡(A)=(1224)(4−2−21)=(0000)=det⁡(A) I.\quad A\,\operatorname{adj}(A)=\begin{pmatrix}1&2\\2&4\end{pmatrix}\begin{pmatrix}4&-2\\-2&1\end{pmatrix}=\begin{pmatrix}0&0\\0&0\end{pmatrix}=\det(A)\,I.

Derivation hint: identity [3] forces the product to be 0⋅I0\cdot I; you cannot divide by det⁡(A)=0\det(A)=0, confirming AA has no inverse. Attempting adj⁡(A)/det⁡(A)\operatorname{adj}(A)/\det(A) divides by zero — there is no inverse, consistent with rows being linearly dependent.

Connections

connection

The cofactor formula sits at the crossroads of several core results. It is the engine behind Cramer's Rule, since xj=det⁡(Aj)/det⁡(A)x_j = \det(A_j)/\det(A) is exactly (adj⁡(A) b)j/det⁡(A)(\operatorname{adj}(A)\,b)_j/\det(A). It depends entirely on the Laplace Expansion of the determinant and on properties of the Determinant as an alternating multilinear form. The identity ∂det⁡(A)/∂aij=Cij\partial\det(A)/\partial a_{ij}=C_{ij} links it to Jacobi's Formula for the derivative of a determinant. For practical computation it is contrasted with Gaussian Elimination and LU Decomposition, which compute inverses in O(n3)O(n^3). Over rings rather than fields, the adjugate appears in the Cayley–Hamilton Theorem, where adj⁡(xI−A)\operatorname{adj}(xI-A) generates the characteristic polynomial's coefficients.

Real-World Applications

🔬 Where this appears

Historical Development

⏳ History
- 1683 — Seki Takakazu (Japan) independently develops determinant-like quantities for solving simultaneous equations.
- 1693 — Gottfried Leibniz writes to L'Hôpital describing determinants and the systematic elimination of variables.
- 1750 — Gabriel Cramer publishes Cramer's Rule, expressing solutions as ratios of determinants — the conceptual seed of the adjugate.
- 1772 — Pierre-Simon Laplace introduces the cofactor (Laplace) expansion of a determinant along any row or column.
- 1812 — Augustin-Louis Cauchy gives the first rigorous, unified theory of determinants, proves the product rule det⁡(AB)=det⁡Adet⁡B\det(AB)=\det A\det B, and systematizes minors and cofactors.
- 1841 — Carl Gustav Jacob Jacobi develops the calculus of determinants and the functional determinant (Jacobian), formalizing ∂det⁡/∂aij=Cij\partial\det/\partial a_{ij}=C_{ij}.
- 1858 — Arthur Cayley founds matrix algebra proper in A Memoir on the Theory of Matrices, defining the inverse and stating what becomes the Cayley–Hamilton theorem.
- 1880s — Ferdinand Georg Frobenius consolidates rank, adjugate, and determinant theory into the modern framework.
- 20th century — recognition that cofactor methods, while exact, are computationally infeasible for large nn, driving the dominance of elimination-based algorithms.

Subtleties & Limits

open-problem · Boundaries and refinements

The adjugate behaves richly near singularity: if AA has rank n−1n-1, then rank⁡(adj⁡(A))=1\operatorname{rank}(\operatorname{adj}(A))=1; if rank⁡(A)≤n−2\operatorname{rank}(A)\le n-2, then adj⁡(A)=0\operatorname{adj}(A)=0. This makes adj⁡\operatorname{adj} a sensitive but non-continuous-in-rank probe of degeneracy. Numerically, computing inverses via cofactors amplifies round-off and scales factorially, so the genuine open practical questions concern stable, fast exact inversion over rings (where one cannot pivot freely by division): Bareiss-style fraction-free elimination and division-free determinant/adjugate algorithms (e.g., Berkowitz, Mahajan–Vinay) aim to compute adj⁡(A)\operatorname{adj}(A) in polynomial arithmetic operations without divisions — relevant to complexity classes like GapL\mathsf{GapL} and the algebraic complexity of the determinant. Whether the determinant/adjugate admit polynomial-size formulas (vs. circuits) ties into Valiant's VP\mathsf{VP} vs. VNP\mathsf{VNP} program, one of the central open problems of algebraic complexity.

See Also

Determinant · Laplace Expansion · Cramer's Rule · Cayley–Hamilton Theorem · Jacobi's Formula · Gaussian Elimination · LU Decomposition · Adjugate Matrix