Out of last lecture's three defining properties comes an explicit formula for the determinant — the big formula, a sum of n factorial terms, one for every permutation, half with plus signs and half with minus. Cofactors repackage that sum as an expansion along a row, connecting an n by n determinant to determinants one size smaller. The payoff is a tridiagonal matrix of ones whose determinants repeat with period six.
This is the second of three lectures on determinants — “a fascinating, small topic inside linear algebra.” Determinants used to be the big thing and linear algebra the little thing; that situation has reversed. The goal today is a formula for the determinant. It will be a messy formula — that’s exactly why the course started with the three properties instead.
Everybody knows the 2×2 answer, but Strang wants to derive it from the properties, because the derivation is the method that will scale to n×n. Property 1 gives detI=1; property 2 (a row exchange flips the sign) gives det[0110]=−1. Now use property 3 — linearity in one row at a time, the other row held fixed. Split the first row of [acbd] as (a,b)=(a,0)+(0,b), then split the second row of each piece:
Four easy determinants, and two die instantly: the first and last each have a column of zeros — a singular matrix, determinant zero “for, like, forty-eight different reasons.” The survivors: the diagonal piece gives ad, and the anti-diagonal piece gives −bc (one row exchange to reach diagonal form, then factor out b and c). So det=ad−bc, the answer we knew — but now we own the method.
Three by three: the survivors
Run the same splitting on a 3×3. Each of the three rows breaks into three pieces, so the count goes 3→9→27 — three cubed pieces. “Yes, oh God.” But most are zero. A piece survives only when no column is left empty, and that forces the rule:
Each surviving piece has one entry from each row and each column. It looks like a permutation matrix with the ones replaced by entries aij. Factor the entries out and what remains is the determinant of a permutation matrix — +1 or −1 according to whether an even or odd number of row exchanges brings it back to the identity.
For 3×3 there are six survivors. Column numbers in order (1,2,3) gives +a11a22a33; order (1,3,2) is one exchange away from the identity, so −a11a23a32; and so on through all six permutations:
The plus terms are the ones that “go down this way” (parallel to the main diagonal, wrapping around) and the minuses go the other way — down toward Miami and down toward LA. Strang refuses to make that arrows-on-the-board rule precise, for two reasons: it would clutter the board, and it’s wrong for 4×4. Check it: a 4×4 matrix with ones on the anti-diagonal has determinant +1, not −1, because exchanging rows one and four and then rows two and three — two exchanges — produces the identity. The Miami–LA trick is three-by-three only.
The big formula
Now the jump from 3×3 to n×n.
Where does n! come from? This is the moment to listen: the entry from the first row can be chosen n ways; that uses up a column, so the entry from the second row can be chosen n−1 ways; the third, n−2 ways — down to no choice at all in the last row. So n⋅(n−1)⋯1=n! terms: 2, 6, 24, 120, 720, and whatever comes after that.
Sanity check: if A=I, almost every term is zero because almost every entry is zero. The only survivor is the identity permutation, a11a22⋯ann=1, with a plus sign — so detI=1, and property 1 comes back out of the formula. In principle everything comes back out, even detAB=(detA)(detB) — “but like next week we would still be working on it,” so that proof won’t be repeated in 18.06.
Cofactors: the formula, one size smaller
Cofactors break the big formula up differently: they connect an n×n determinant to determinants of size n−1. Take the 3×3 big formula and group it by the first-row entry:
Look at the factor multiplying a11: it is exactly the determinant of the 2×2 matrix left when row 1 and column 1 are erased. Of course it is — once a11 is used, the remaining factors must use the other n−1 rows and n−1 columns, one of each, and that’s precisely the big formula for the smaller determinant. The factor multiplying a12 is minus the determinant of its smaller matrix — the sign gets built in.
The world’s smallest example: for [acbd], expand along row one. The cofactor of a is d (strike row 1, column 1). The cofactor of b is −c — the 1+2 position is odd. So det=ad+b(−c). It worked. Of course it worked.
Tridiagonal ones: a determinant with period six
The reward for cofactors is a genuinely non-trivial family. Let An be the n×ntridiagonal matrix of ones — ones on the diagonal and on the two neighboring diagonals, zeros elsewhere. For n=4:
A4=1100111001110011
Start small. detA1=1. detA2=1111=0. For A3 the answer is −1 — by the big formula, only the diagonal term +1 and the two anti-diagonal-direction terms −1,−1 survive. (Or subtract row three from row two to create zeros first, then expand — determinants reward a little elimination before cofactors.)
Now A4 by cofactors along the first row. The 1 in the corner multiplies the determinant of what’s left when its row and column are struck out — and that leftover matrix isA3. The second entry, a 1 in the (1,2) position, carries a minus sign; strike out its row and column and expand the resulting 3×3 down its first column (only one nonzero entry there — Strang skips the entries multiplied by zero, “no use wasting time”), and what emerges is −detA2. The pattern is general:
detAn=detAn−1−detAn−2
So detA4=−1−0=−1, detA5=−1−(−1)=0, detA6=0−(−1)=1, detA7=1−0=1. The sequence of determinants is
1,0,−1,−1,0,1,1,0,−1,…
and it repeats: these determinants have period six. “It’s pretty fantastic.” So detA61=detA1=1, instantly. A non-trivial tridiagonal determinant, done entirely by cofactors.
Problems
Work these with the big formula and cofactors — choose whichever puts the mess where you can handle it.
Problem 19.1Big formula, all six terms
Use the big formula (all six permutation terms, with their signs) to compute
det210121012
Show solution
The six terms ±a1αa2βa3γ, ordered by permutation of the columns:
(1,2,3), even: +(2)(2)(2)=8
(1,3,2), odd: −(2)(1)(1)=−2
(2,1,3), odd: −(1)(1)(2)=−2
(2,3,1), even: +(1)(1)(0)=0
(3,1,2), even: +(0)(1)(1)=0
(3,2,1), odd: −(0)(2)(0)=0
Sum: 8−2−2=4. So the determinant is 4.
Problem 19.2Survivors and signs
Find the determinant of
A=0300200000050040
by identifying every nonzero term of the big formula and its sign.
Show solution
A term survives only if it takes one nonzero entry from each row and column. Row 1 forces column 2, which forces row 2 to use column 1; row 3 forces column 4, which forces row 4 to use column 3. So there is exactly one survivor:
a12a21a34a43=(2)(3)(4)(5)=120
Its column order is (2,1,4,3). Two exchanges (swap 2 and 1, swap 4 and 3) reach the identity, so the permutation is even: sign +.
detA=+120
Problem 19.3Cofactor expansion
Expand along the first row to compute
det1472583610
writing out each cofactor C11,C12,C13 with its sign.
Show solution
The cofactors (strike out row 1 and the entry’s column; sign (−1)1+j):