Skip to main content

Section5.2Cofactor Expansions

Objectives
  1. Learn to recognize which methods are best suited to compute the determinant of a given matrix.
  2. Recipes: the determinant of a 3 × 3 matrix, compute the determinant using cofactor expansions.
  3. Vocabulary words: minor, cofactor.

In this section, we give a recursive formula for the determinant of a matrix, called a cofactor expansion. The formula is recursive in that we will compute the determinant of an n × n matrix assuming we already know how to compute the determinant of an ( n 1 ) × ( n 1 ) matrix.

At the end is a supplementary subsection on Cramer’s rule and a cofactor formula for the inverse of a matrix.

Subsection5.2.1Cofactor Expansions

A recursive formula must have a starting point. For cofactor expansions, the starting point is the case of 1 × 1 matrices. The definition of determinant directly implies that

det A a B = a .

To describe cofactor expansions, we need to introduce some notation.

Definition

Let A be an n × n matrix.

  1. The ( i , j ) minor, denoted A ij , is the ( n 1 ) × ( n 1 ) matrix obtained from A by deleting the i th row and the j th column.
  2. The ( i , j ) cofactor C ij is defined in terms of the minor by
    C ij =( 1 ) i + j det ( A ij ) .

Note that the signs of the cofactors follow a “checkerboard pattern.” Namely, ( 1 ) i + j is pictured in this matrix:

GKI + + + ++ + + + HLJ .

The cofactors C ij of an n × n matrix are determinants of ( n 1 ) × ( n 1 ) submatrices. Hence the following theorem is in fact a recursive procedure for computing the determinant.

Proof

Note that the theorem actually gives 2 n different formulas for the determinant: one for each row and one for each column. For instance, the formula for cofactor expansion along the first column is

det ( A )= n M i = 1 a i 1 C i 1 = a 11 C 11 + a 21 C 21 + ··· + a n 1 C n 1 = a 11 det ( A 11 ) a 21 det ( A 21 )+ a 31 det ( A 31 ) −···± a n 1 det ( A n 1 ) .

Remember, the determinant of a matrix is just a number, defined by the four defining properties in Section 5.1, so to be clear:

You obtain the same number by expanding cofactors along any row or column.

Now that we have a recursive formula for the determinant, we can finally prove the existence theorem in Section 5.1.

The determinant of a 2 × 2 matrix

Let us compute (again) the determinant of a general 2 × 2 matrix

A = N abcd O .

The minors are

a b c d C D A 11 = = A d B a b c d C D A 12 = = A c B a b c d C D A 21 = = A b B a b c d C D A 22 = = A a B .

The minors are all 1 × 1 matrices. As we have seen that the determinant of a 1 × 1 matrix is just the number inside of it, the cofactors are therefore

C 11 =+ det ( A 11 )= dC 12 = det ( A 12 )= cC 21 = det ( A 21 )= bC 22 =+ det ( A 22 )= a

Expanding cofactors along the first column, we find that

det ( A )= aC 11 + cC 21 = ad bc ,

which agrees with the formulas in this definition in Section 4.5 and this example in Section 5.1.

The determinant of a 3 × 3 matrix

We can also use cofactor expansions to find a formula for the determinant of a 3 × 3 matrix. Let is compute the determinant of

A = E a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 F

by expanding along the first row. The minors and cofactors are:

a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 GI HJ A 11 = = N a 22 a 23 a 32 a 33 O C 11 =+ det N a 22 a 23 a 32 a 33 O a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 GI HJ A 12 = = N a 21 a 23 a 31 a 33 O C 12 = det N a 21 a 23 a 31 a 33 O a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 GI HJ A 13 = = N a 21 a 22 a 31 a 32 O C 13 =+ det N a 21 a 22 a 31 a 32 O

The determinant is:

det ( A )= a 11 C 11 + a 12 C 12 + a 13 C 13 = a 11 det N a 22 a 23 a 32 a 33 O a 12 det N a 21 a 23 a 31 a 33 O + a 13 det N a 21 a 22 a 31 a 32 O = a 11 ( a 22 a 33 a 23 a 32 ) a 12 ( a 21 a 33 a 23 a 31 )+ a 13 ( a 21 a 32 a 22 a 31 )= a 11 a 22 a 33 + a 12 a 23 a 31 + a 13 a 21 a 32 a 13 a 22 a 31 a 11 a 23 a 32 a 12 a 21 a 33 .

The formula for the determinant of a 3 × 3 matrix looks too complicated to memorize outright. Fortunately, there is the following mnemonic device.

Recipe: Computing the Determinant of a 3 × 3 Matrix

To compute the determinant of a 3 × 3 matrix, first draw a larger matrix with the first two columns repeated on the right. Then add the products of the downward diagonals together, and subtract the products of the upward diagonals:

det E a 11 a 12 a 13 a 21 a 22 a 23 a 31 a 32 a 33 F = a 11 a 22 a 33 + a 12 a 23 a 31 + a 13 a 21 a 32 a 13 a 22 a 31 a 11 a 23 a 32 a 12 a 21 a 33 a 11 a 12 a 13 a 11 a 12 a 21 a 22 a 23 a 21 a 22 a 31 a 32 a 33 a 31 a 32 a 11 a 12 a 13 a 11 a 12 a 21 a 22 a 23 a 21 a 22 a 31 a 32 a 33 a 31 a 32

Alternatively, it is not necessary to repeat the first two columns if you allow your diagonals to “wrap around” the sides of a matrix, like in Pac-Man or Asteroids.

Cofactor expansions are most useful when computing the determinant of a matrix that has a row or column with several zero entries. Indeed, if the ( i , j ) entry of A is zero, then there is no reason to compute the ( i , j ) cofactor. In the following example we compute the determinant of a matrix with two zeros in the fourth column by expanding cofactors along the fourth column.

Cofactor expansions are also very useful when computing the determinant of a matrix with unknown entries. Indeed, it is inconvenient to row reduce in this case, because one cannot be sure whether an entry containing an unknown is a pivot or not.

It is often most efficient to use a combination of several techniques when computing the determinant of a matrix. Indeed, when expanding cofactors on a matrix, one can compute the determinants of the cofactors in whatever way is most convenient. Or, one can perform row and column operations to clear some entries of a matrix before expanding cofactors, as in the previous example.

Summary: methods for computing determinants

We have several ways of computing determinants:

  1. Special formulas for 2 × 2 and 3 × 3 matrices.

    This is usually the best way to compute the determinant of a small matrix, except for a 3 × 3 matrix with several zero entries.

  2. Cofactor expansion.

    This is usually most efficient when there is a row or column with several zero entries, or if the matrix has unknown entries.

  3. Row and column operations.

    This is generally the fastest when presented with a large matrix which does not have a row or column with a lot of zeros in it.

  4. Any combination of the above.

    Cofactor expansion is recursive, but one can compute the determinants of the minors using whatever method is most convenient. Or, you can perform row and column operations to clear some entries of a matrix before expanding cofactors.

Remember, all methods for computing the determinant yield the same number.

Subsection5.2.2Cramer’s Rule and Matrix Inverses

Recall from this proposition in Section 4.5 that one can compute the determinant of a 2 × 2 matrix using the rule

A = N d b ca O = A 1 = 1 det ( A ) N d b ca O .

We computed the cofactors of a 2 × 2 matrix in this example; using C 11 = d , C 12 = c , C 21 = b , C 22 = a , we can rewrite the above formula as

A 1 = 1 det ( A ) N C 11 C 21 C 12 C 22 O .

It turns out that this formula generalizes to n × n matrices.

The matrix of cofactors is sometimes called the adjugate matrix of A , and is denoted adj ( A ) :

adj ( A )= GKKKKI C 11 C 21 ··· C n 1,1 C n 1 C 12 C 22 ··· C n 1,2 C n 2 ............... C 1, n 1 C 2, n 1 ··· C n 1, n 1 C n , n 1 C 1 n C 2 n ··· C n 1, n C nn HLLLLJ .

Note that the ( i , j ) cofactor C ij goes in the ( j , i ) entry the adjugate matrix, not the ( i , j ) entry: the adjugate matrix is the transpose of the cofactor matrix.

It is clear from the previous example that (5.2.1) is a very inefficient way of computing the inverse of a matrix, compared to augmenting by the identity matrix and row reducing, as in this subsection in Section 4.5. However, it has its uses.

  • If a matrix has unknown entries, then it is difficult to compute its inverse using row reduction, for the same reason it is difficult to compute the determinant that way: one cannot be sure whether an entry containing an unknown is a pivot or not.
  • This formula is useful for theoretical purposes. Notice that the only denominators in (5.2.1) occur when dividing by the determinant: computing cofactors only involves multiplication and addition, never division. This means, for instance, that if the determinant is very small, then any measurement error in the entries of the matrix is greatly magnified when computing the inverse. In this way, (5.2.1) is useful in error analysis.

The proof of the theorem uses an interesting trick called Cramer’s Rule, which gives a formula for the entries of the solution of an invertible matrix equation.

Proof

Now we use Cramer’s rule to prove the first theorem of this subsection.