Objectives
- Learn to recognize which methods are best suited to compute the determinant of a given matrix.
- Recipes: the determinant of a matrix, compute the determinant using cofactor expansions.
- 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 matrix assuming we already know how to compute the determinant of an matrix.
At the end is a supplementary subsection on Cramer’s rule and a cofactor formula for the inverse of a matrix.
A recursive formula must have a starting point. For cofactor expansions, the starting point is the case of matrices. The definition of determinant directly implies that
To describe cofactor expansions, we need to introduce some notation.
Let be an matrix.
Note that the signs of the cofactors follow a “checkerboard pattern.” Namely, is pictured in this matrix:
The cofactors of an matrix are determinants of submatrices. Hence the following theorem is in fact a recursive procedure for computing the determinant.
Let be an matrix with entries
Note that the theorem actually gives 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
Remember, the determinant of a matrix is just a number, defined by the four defining properties in Section 4.1, so to be clear:
You obtain the same number by expanding cofactors along row or column.
Now that we have a recursive formula for the determinant, we can finally prove the existence theorem in Section 4.1.
Let us compute (again) the determinant of a general matrix
The minors are
The minors are all matrices. As we have seen that the determinant of a matrix is just the number inside of it, the cofactors are therefore
Expanding cofactors along the first column, we find that
which agrees with the formulas in this definition in Section 3.5 and this example in Section 4.1.
We can also use cofactor expansions to find a formula for the determinant of a matrix. Let is compute the determinant of
by expanding along the first row. The minors and cofactors are:
The determinant is:
The formula for the determinant of a matrix looks too complicated to memorize outright. Fortunately, there is the following mnemonic device.
To compute the determinant of a 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:
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 entry of is zero, then there is no reason to compute the 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.
We have several ways of computing determinants:
Special formulas for and matrices.
This is usually the best way to compute the determinant of a small matrix, except for a matrix with several zero entries.
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.
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.
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.