Let A = (aij) be an n by n matrix. By deleting the i-th row and the j-th column, we get an n - 1 by n - 1 matrix Aij.
The cofactor of the ij-entry aij is defined as the number
Cij = (-1)i+j detAij.
The cofactor expansion means the following method for computing the determinant. The proof will be given here, after the rigorous definition of determinants. The key feature is that the computation of the determinant of an n by n matrix becomes the computation of the determinants of n n - 1 by n - 1 matrices.
For any j-th column, detA = a1jC1j + a2jC2j + ... + anjCnj.
For a 3 by 3 matrix, the cofactor expansion along the first row is
where the darker row indicates the row along which the cofactors are expanded, and the negative sign for the second 2 by 2 determinant is due to (-1)1+2 = -1. You are encouraged to compare both sides by using the usual formulae for 2 by 2 and 3 by 3 determinants.
Example In an earlier example, we computed the determinant of
|A = [||1||-1||1||]|
by direct computation and row/column operations. Now we apply the cofactor expansion along the third row
where the term a33C33 is omitted because a33 = 0. We see that cofactor expansion along the rows or columns with maximal number of zeros is often more efficient.
We may also compute the determinant by column expansion. Again we prefer expanding along the third column because it contains zero.