Matrix Inversion Formula – A⁻¹ = adj(A) / det(A) Reference

Complete matrix inversion formula reference: cofactor, adjugate, inverse formula, X = A⁻¹B, and fully worked 2×2 and 3×3 examples with all steps shown.

Formula
The inverse of a square matrix A is computed by dividing the adjugate matrix (transpose of the cofactor matrix) by the determinant. The solution vector X is then obtained by multiplying A⁻¹ by the right-hand side vector B.
Variables
SymbolNameDescriptionUnit
ACoefficient matrixSquare n×n matrix of system coefficients
A⁻¹Inverse matrixThe matrix such that A·A⁻¹ = I (identity matrix)
adj(A)Adjugate matrixTranspose of the cofactor matrix: adj(A) = Cᵀ
det(A)Determinant of AScalar value; must be non-zero for the inverse to exist
CᵢⱼCofactorCᵢⱼ = (−1)ⁱ⁺ʲ · Mᵢⱼ, where Mᵢⱼ is the (i,j) minor determinant
MᵢⱼMinorDeterminant of the (n−1)×(n−1) submatrix with row i and column j removed
BConstants vectorColumn vector of right-hand side values
XSolution vectorColumn vector [x₁, x₂, ..., xₙ]ᵀ
How to Use
  1. Compute det(A). If det(A) = 0 → stop, no inverse exists.
  2. For each entry (i, j), compute the minor Mᵢⱼ by deleting row i and column j and taking the determinant.
  3. Apply the sign: Cᵢⱼ = (−1)ⁱ⁺ʲ · Mᵢⱼ to form the cofactor matrix C.
  4. Transpose C to get the adjugate: adj(A) = Cᵀ.
  5. Divide: A⁻¹ = adj(A) / det(A).
  6. Multiply: X = A⁻¹ · B to find the solution.
Examples
1. 2×2 system: 5x₁ + 2x₂ = 4, 3x₁ + x₂ = 2
Solution: x₁ = 0, x₂ = 2. Verify: 5(0)+2(2)=4 ✓, 3(0)+2=2 ✓
2. Singular matrix: 2x₁ + 4x₂ = 6, x₁ + 2x₂ = 3
det(A) = 0 → A is singular, no inverse exists. Use Gaussian elimination to determine infinite vs no solution.
3. 3×3 system: x₁ + 2x₂ + 3x₃ = 14, x₁ + x₂ + x₃ = 6, 2x₁ + x₂ + x₃ = 8

Cofactor matrix C and adjugate adj(A) = Cᵀ:

Solution: x₁ = 2, x₂ = 0, x₃ = 4. Verify: 1(2)+2(0)+3(4) = 14 ✓, 1+0+4 = 6 ✓, 4+0+4 = 8 ✓