Overview
Cofactor expansion (Laplace expansion) is a method for computing determinants of any size matrix by reducing it to smaller determinants. It's especially useful when a row or column has many zeros.
Definitions
Minor
The minor M i j M_{ij} M ij is the determinant of the ( n − 1 ) × ( n − 1 ) (n-1) \times (n-1) ( n − 1 ) × ( n − 1 ) submatrix obtained by deleting row i i i and column j j j .
Cofactor
The cofactor C i j C_{ij} C ij is the signed minor:
C i j = ( − 1 ) i + j × M i j C_{ij} = (-1)^{i+j} \times M_{ij} C ij = ( − 1 ) i + j × M ij
Sign Pattern
[ + − + − ⋯ − + − + ⋯ + − + − ⋯ − + − + ⋯ ⋮ ⋮ ⋮ ⋮ ⋱ ] \begin{bmatrix} + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ + & - & + & - & \cdots \\ - & + & - & + & \cdots \\ \vdots & \vdots & \vdots & \vdots & \ddots \end{bmatrix} + − + − ⋮ − + − + ⋮ + − + − ⋮ − + − + ⋮ ⋯ ⋯ ⋯ ⋯ ⋱
Entry ( i , j ) (i,j) ( i , j ) has sign ( − 1 ) i + j (-1)^{i+j} ( − 1 ) i + j .
Cofactor Expansion Formula
Along Row i i i
det ( A ) = ∑ j = 1 n a i j C i j = a i 1 C i 1 + a i 2 C i 2 + ⋯ + a i n C i n \det(A) = \sum_{j=1}^{n} a_{ij} C_{ij} = a_{i1}C_{i1} + a_{i2}C_{i2} + \cdots + a_{in}C_{in} det ( A ) = ∑ j = 1 n a ij C ij = a i 1 C i 1 + a i 2 C i 2 + ⋯ + a in C in
Along Column j j j
det ( A ) = ∑ i = 1 n a i j C i j = a 1 j C 1 j + a 2 j C 2 j + ⋯ + a n j C n j \det(A) = \sum_{i=1}^{n} a_{ij} C_{ij} = a_{1j}C_{1j} + a_{2j}C_{2j} + \cdots + a_{nj}C_{nj} det ( A ) = ∑ i = 1 n a ij C ij = a 1 j C 1 j + a 2 j C 2 j + ⋯ + a nj C nj
3×3 Example
A = [ 1 2 3 4 5 6 7 8 9 ] A = \begin{bmatrix} 1 & 2 & 3 \\ 4 & 5 & 6 \\ 7 & 8 & 9 \end{bmatrix} A = 1 4 7 2 5 8 3 6 9
Expansion Along Row 1:
det ( A ) = 1 × C 11 + 2 × C 12 + 3 × C 13 \det(A) = 1 \times C_{11} + 2 \times C_{12} + 3 \times C_{13} det ( A ) = 1 × C 11 + 2 × C 12 + 3 × C 13
Calculate minors:
M 11 = ∣ 5 6 8 9 ∣ = 5 ( 9 ) − 6 ( 8 ) = − 3 M_{11} = \begin{vmatrix} 5 & 6 \\ 8 & 9 \end{vmatrix} = 5(9) - 6(8) = -3 M 11 = 5 8 6 9 = 5 ( 9 ) − 6 ( 8 ) = − 3
M 12 = ∣ 4 6 7 9 ∣ = 4 ( 9 ) − 6 ( 7 ) = − 6 M_{12} = \begin{vmatrix} 4 & 6 \\ 7 & 9 \end{vmatrix} = 4(9) - 6(7) = -6 M 12 = 4 7 6 9 = 4 ( 9 ) − 6 ( 7 ) = − 6
M 13 = ∣ 4 5 7 8 ∣ = 4 ( 8 ) − 5 ( 7 ) = − 3 M_{13} = \begin{vmatrix} 4 & 5 \\ 7 & 8 \end{vmatrix} = 4(8) - 5(7) = -3 M 13 = 4 7 5 8 = 4 ( 8 ) − 5 ( 7 ) = − 3
Calculate cofactors:
C 11 = ( + 1 ) ( − 3 ) = − 3 C_{11} = (+1)(-3) = -3 C 11 = ( + 1 ) ( − 3 ) = − 3
C 12 = ( − 1 ) ( − 6 ) = 6 C_{12} = (-1)(-6) = 6 C 12 = ( − 1 ) ( − 6 ) = 6
C 13 = ( + 1 ) ( − 3 ) = − 3 C_{13} = (+1)(-3) = -3 C 13 = ( + 1 ) ( − 3 ) = − 3
Determinant:
det ( A ) = 1 ( − 3 ) + 2 ( 6 ) + 3 ( − 3 ) = − 3 + 12 − 9 = 0 \det(A) = 1(-3) + 2(6) + 3(-3) = -3 + 12 - 9 = 0 det ( A ) = 1 ( − 3 ) + 2 ( 6 ) + 3 ( − 3 ) = − 3 + 12 − 9 = 0
4×4 Example
A = [ 1 0 0 3 2 1 0 4 0 0 5 6 0 0 0 7 ] A = \begin{bmatrix} 1 & 0 & 0 & 3 \\ 2 & 1 & 0 & 4 \\ 0 & 0 & 5 & 6 \\ 0 & 0 & 0 & 7 \end{bmatrix} A = 1 2 0 0 0 1 0 0 0 0 5 0 3 4 6 7
Expand along column 1 (most zeros):
det ( A ) = 1 × C 11 + 2 × C 21 + 0 × C 31 + 0 × C 41 = 1 × C 11 + 2 × C 21 \det(A) = 1 \times C_{11} + 2 \times C_{21} + 0 \times C_{31} + 0 \times C_{41} = 1 \times C_{11} + 2 \times C_{21} det ( A ) = 1 × C 11 + 2 × C 21 + 0 × C 31 + 0 × C 41 = 1 × C 11 + 2 × C 21
Calculate C 11 C_{11} C 11 :
M 11 = ∣ 1 0 4 0 5 6 0 0 7 ∣ = 1 ( 5 × 7 − 6 × 0 ) = 35 (triangular: product of diagonal) M_{11} = \begin{vmatrix} 1 & 0 & 4 \\ 0 & 5 & 6 \\ 0 & 0 & 7 \end{vmatrix} = 1(5 \times 7 - 6 \times 0) = 35 \quad \text{(triangular: product of diagonal)} M 11 = 1 0 0 0 5 0 4 6 7 = 1 ( 5 × 7 − 6 × 0 ) = 35 (triangular: product of diagonal)
C 11 = ( + 1 ) ( 35 ) = 35 C_{11} = (+1)(35) = 35 C 11 = ( + 1 ) ( 35 ) = 35
Calculate C 21 C_{21} C 21 :
M 21 = ∣ 0 0 3 0 5 6 0 0 7 ∣ M_{21} = \begin{vmatrix} 0 & 0 & 3 \\ 0 & 5 & 6 \\ 0 & 0 & 7 \end{vmatrix} M 21 = 0 0 0 0 5 0 3 6 7
Expand along column 1: all entries are 0, so M 21 = 0 M_{21} = 0 M 21 = 0
C 21 = ( − 1 ) ( 0 ) = 0 C_{21} = (-1)(0) = 0 C 21 = ( − 1 ) ( 0 ) = 0
Final:
det ( A ) = 1 ( 35 ) + 2 ( 0 ) = 35 \det(A) = 1(35) + 2(0) = 35 det ( A ) = 1 ( 35 ) + 2 ( 0 ) = 35
Strategy: Choose Best Row/Column
Always expand along the row or column with the most zeros to minimize computation.
Cofactor Matrix
The matrix of cofactors:
C = [ C 11 C 12 ⋯ C 1 n C 21 C 22 ⋯ C 2 n ⋮ ⋮ ⋱ ⋮ C n 1 C n 2 ⋯ C n n ] C = \begin{bmatrix} C_{11} & C_{12} & \cdots & C_{1n} \\ C_{21} & C_{22} & \cdots & C_{2n} \\ \vdots & \vdots & \ddots & \vdots \\ C_{n1} & C_{n2} & \cdots & C_{nn} \end{bmatrix} C = C 11 C 21 ⋮ C n 1 C 12 C 22 ⋮ C n 2 ⋯ ⋯ ⋱ ⋯ C 1 n C 2 n ⋮ C nn
Adjugate (Adjoint)
The adjugate is the transpose of the cofactor matrix:
adj ( A ) = C T \text{adj}(A) = C^T adj ( A ) = C T
Computing Inverse via Cofactors
A − 1 = 1 det ( A ) × adj ( A ) A^{-1} = \frac{1}{\det(A)} \times \text{adj}(A) A − 1 = d e t ( A ) 1 × adj ( A )
Example
For A = [ a b c d ] A = \begin{bmatrix} a & b \\ c & d \end{bmatrix} A = [ a c b d ] :
C = [ d − c − b a ] C = \begin{bmatrix} d & -c \\ -b & a \end{bmatrix} C = [ d − b − c a ]
adj ( A ) = [ d − b − c a ] \text{adj}(A) = \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} adj ( A ) = [ d − c − b a ]
A − 1 = 1 a d − b c [ d − b − c a ] A^{-1} = \frac{1}{ad-bc} \begin{bmatrix} d & -b \\ -c & a \end{bmatrix} A − 1 = a d − b c 1 [ d − c − b a ]