Lesson 3.1 · Determinants
Introduction to determinants
Every square matrix has a single number attached to it, called its determinant, that tells you two things at once: whether the matrix is invertible, and by how much the linear transformation stretches area or volume. This lesson defines the determinant and shows you how to compute it efficiently by cofactor expansion.
The determinant
You met the number when you inverted a matrix: is invertible exactly when . That number is the determinant.
Definition
Determinant of a 2 × 2 matrix
Vertical bars around an array of numbers mean "the determinant of this matrix," not absolute value.
There is a picture behind the formula. The columns of are where the transformation sends and , so the unit square is carried to the parallelogram spanned by the two columns. For , the columns are and , and
The parallelogram has area , exactly the determinant. You will prove this in general later in the unit; for now, keep the idea in mind: the determinant measures how the transformation scales area, and its sign records whether orientation is flipped. A determinant of means the square is flattened onto a line, which is exactly when fails to be invertible.
Minors and cofactors
For larger matrices, the determinant is defined recursively: an determinant is built out of determinants.
Definition
Minor and cofactor
For an matrix , let be the submatrix you get by deleting row and column . Its determinant, , is the minor. The cofactor is
The factor follows a checkerboard pattern that starts with in the top-left corner:
So a cofactor is just a minor with a sign attached. You don't need to compute each time; read the sign off the checkerboard.
Cofactor expansion
Cofactor expansion
For an matrix with , you can compute by expanding across any row :
or down any column :
Every row and every column gives the same answer.
The usual definition expands across the first row; the fact that every other row and column gives the same number is a theorem (its proof is a careful bookkeeping argument you can find in any linear algebra text). The practical payoff is huge: you get to choose the row or column, so choose the one with the most zeros. Each zero entry kills an entire term, and you never have to compute that cofactor.
Worked example: A 3 × 3 determinant
Compute for .
Expand across row 1. The signs are :
Check by expanding down column 2, which has a zero. The signs in column 2 are :
Both expansions agree: .
Common mistake
The most common error is dropping the checkerboard sign. The sign belongs to the position, not to the entry. In the check above, the entry sits in position , which carries a sign, so the term is , which is positive.
Using zeros to your advantage
A cofactor expansion of an matrix produces determinants of size . Expanding all the way down with no zeros takes on the order of multiplications, which is hopeless for large . With zeros, though, whole branches disappear.
Worked example: A 4 × 4 determinant with a sparse column
Compute for .
Column 2 has only one nonzero entry, the in position . Its sign is . Delete row 4 and column 2:
In the determinant, row 3 has one nonzero entry, the in position , with sign :
So .
Triangular matrices
Push the zero idea to the extreme. A matrix is upper triangular if every entry below the main diagonal is , and lower triangular if every entry above it is . Expand an upper triangular matrix down its first column: only the top entry survives, and what's left is again upper triangular. Repeat, and you get a clean result.
Triangular matrices
If is triangular (upper or lower), then is the product of the entries on the main diagonal:
Worked example: Reading off a triangular determinant
Compute .
The matrix is upper triangular, so multiply the diagonal: . The entries above the diagonal don't matter at all.
This fact is the seed of the fast method in the next lesson: row reduce a matrix to triangular form, keep track of how each row operation changes the determinant, and then multiply down the diagonal.
Tip
Two quick checks before you expand anything. If a matrix has a row or column of all zeros, its determinant is (expand along that row). If it is triangular, just multiply the diagonal.
Practice
Compute .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Compute for .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Let . Find the cofactor .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Compute the determinant of the lower triangular matrix
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Compute .
Enter a number. Fractions like 3/4 and sqrt(2) are OK.
Find all values of for which is not invertible.
Separate answers with commas, e.g. 2, -5
You need for . Which expansion requires computing the fewest cofactors?