Linear Algebra, Interactive EditionXYZ Homework Edition

⇩ Download ▾

4.2 Cofactor Expansion in Three Dimensions

The last section defined ad−bcad - bc for a 2×22 \times 2 matrix and read it three ways: as an area, as an orientation, and as a test for invertibility. All three readings survive in higher dimensions, but the formula does not — there is no two-term expression for a 3×33 \times 3 determinant. What there is instead is a rule that reduces the new case to the old one, applied three times.

Take

M = ( 2 1 0 1 3 1 0 1 2 ) M = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & 2 \end{pmatrix}

The minor of an entry is the determinant of what remains when you delete that entry's row and column — a 2×22 \times 2 determinant, which you can already do. Deleting the first row and first column of MM leaves (3112)\begin{pmatrix} 3 & 1 \\ 1 & 2 \end{pmatrix}, whose determinant is 3(2)−1(1)=53(2) - 1(1) = 5. That 55 is the minor of the entry 22 in the corner. The cofactor of an entry is its minor with a sign attached, (−1)i+j(-1)^{i+j} for the entry in row ii and column jj — so the cofactor of that corner 22 is +5+5, and the word in this section's title just means "expansion in terms of those signed minors".

Cofactor expansion says: walk along any one row or column, multiply each entry by its minor, and add the results with alternating signs. Along the first row of MM the entries are 22, 11 and 00, so

det M = 2 · 5 − 1 · 2 + 0 · 1 = 8 \det M = 2 \cdot 5 - 1 \cdot 2 + 0 \cdot 1 = 8

where the three minors come from deleting the first row together with each column in turn.

55
The first minor ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The first minor, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

Delete the first row and first column of MM and take the determinant of the 2×22 \times 2 block left behind: 3(2)−1(1)=53(2) - 1(1) = 5. Every cofactor expansion is built from determinants this small, which is what makes the rule usable by hand.

22
The second minor ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The second minor, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

Delete the first row and the second column and the remaining block is (1102)\begin{pmatrix} 1 & 1 \\ 0 & 2 \end{pmatrix}, of determinant 22. This is the term that carries the minus sign, which is a property of its position — second along the row — and has nothing to do with its entries.

88
The whole determinant ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The whole determinant, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The full 3×33 \times 3 determinant, computed by a computer algebra system: 88, matching the expansion 2(5)−1(2)+0(1)2(5) - 1(2) + 0(1) done by hand above.

The signs, and choosing where to walk

The alternating signs follow a fixed checkerboard, starting with a plus in the top-left corner:

( + − + − + − + − + ) \begin{pmatrix} + & - & + \\ - & + & - \\ + & - & + \end{pmatrix}

The sign attached to a term depends only on where the entry sits, never on the entry itself — a common early error is to let a negative entry flip a sign twice.

Because every row and every column gives the same answer, you get to choose, and the choice is worth making. Expanding MM along its bottom row, whose entries are 00, 11 and 22 with signs ++, −-, ++:

det M = 0 · 1 − 1 · 2 + 2 · 5 = 8 \det M = 0 \cdot 1 - 1 \cdot 2 + 2 \cdot 5 = 8

the same 88. The three products even match, 1010, −2-2, 00 in a different order, but only because MM reads the same backwards: the bottom row's minors come from different 2×22 \times 2 blocks than the top row's, and for most matrices they would be different numbers. Nor did this walk save any work. The top row (2,1,0)(2, 1, 0) and the bottom row (0,1,2)(0, 1, 2) each contain one zero, and a zero entry multiplies its minor away, so each walk really needs just two minors (the displays write out 0·10 \cdot 1 only for completeness). A line with more zeros saves more, as the worked example below shows with a row holding two. Hence the practical rule: expand along the row or column with the most zeros.

Watching it vanish

Fix the top-left 2×22 \times 2 block and put the bottom-right entry on a slider:

M g = ( 2 1 0 1 3 1 0 1 g ) M_g = \begin{pmatrix} 2 & 1 & 0 \\ 1 & 3 & 1 \\ 0 & 1 & g \end{pmatrix}

Expanding along the bottom row again gives 0·1−1·2+g·50 \cdot 1 - 1 \cdot 2 + g \cdot 5, so detMg=5g−2\det M_g = 5g - 2: a straight line in gg, hitting zero at g=0.4g = 0.4 and recovering the value 88 at g=2g = 2.

−2+5·g-2 + 5 \cdot g
The whole family at once ✓ Computed · mojocas 0.1.0 ✓ Agrees with the text The whole family at once, computed exactly by mojocas 0.1.0, and confirmed to agree with the result stated in the text.

The determinant computed symbolically in gg. It is linear, because gg appears in exactly one entry and a cofactor expansion uses each entry at most once — determinants are linear in any single row or column, though emphatically not in the matrix as a whole.

A semi-transparent patch of a plane floating in space, spanned by a red segment from the origin to (2, 1, 0) and a blue segment from the origin to (1, 3, 1). A green segment rises from the origin to (0, 1, g), where a slider sets g, and an amber segment joins the green segment's tip to a white dot at (0, 1, 0.4) lying in the plane of the patch. Dragging the slider down to 0.4 closes that gap, laying the green segment flat into the plane; there the determinant of the three columns is zero, and above or below it the determinant is the signed amount five g minus two.Explore in 3D (opens in a new tab)

A semi-transparent patch of a plane floating in space, spanned by a red segment from the origin to (2, 1, 0) and a blue segment from the origin to (1, 3, 1). A green segment rises from the origin to (0, 1, g), where a slider sets g, and an amber segment joins the green segment's tip to a white dot at (0, 1, 0.4) lying in the plane of the patch. Dragging the slider down to 0.4 closes that gap, laying the green segment flat into the plane; there the determinant of the three columns is zero, and above or below it the determinant is the signed amount five g minus two.

A patch of the plane spanned by the first two columns, (2,1,0)(2, 1, 0) in red and (1,3,1)(1, 3, 1) in blue. The green segment from the origin is the third column (0,1,g)(0, 1, g), with gg on a slider, and the amber segment measures the gap between its tip and the white dot at (0,1,0.4)(0, 1, 0.4) — where that column would have to sit to lie flat in the same plane.

Explore the figure

  1. At the default g=2g = 2 the green segment stands well clear of the blue-and-red sheet, and detMg=5(2)−2=8\det M_g = 5(2) - 2 = 8, the determinant you computed by hand.
  2. Drag gg down and watch two things at once: the amber gap shrinking, and the value 5g−25g - 2 heading for zero. They arrive together — the geometry and the arithmetic are reporting the same event.
  3. At g=0.4g = 0.4 the gap closes and the green segment lies in the sheet. The three columns are now dependent: as the algebra confirms, (0,1,0.4)=−0.2(2,1,0)+0.4(1,3,1)(0, 1, 0.4) = -0.2\,(2, 1, 0) + 0.4\,(1, 3, 1).
  4. Keep going to g=−1g = -1. The green segment has swung out below the sheet and detMg=5(−1)−2=−7\det M_g = 5(-1) - 2 = -7. As in the last section, passing through dependence is the only way for the sign to change. (Avoid stopping at exactly g=0g = 0 to judge this: there the third column is (0,1,0)(0, 1, 0), which lies along the yy-axis and is hard to pick out against it.)

An original work of XYZ Homework, built around interactive XYZ 3D figures. Chapters 1–6 follow the topic sequence of Interactive Linear Algebra (Margalit & Rabinoff, Georgia Tech, GNU FDL). Chapter 0's scope (its topics, their order, and the idea each figure shows) follows the Vectors chapter of Ximera's Linear Algebra: An Interactive Introduction. The prose, worked examples and figures were written for this book, which is not affiliated with or endorsed by the authors of either work. License: CC-BY-NC-SA-4.0.

These eBooks are a prerelease and are not yet certified conformant with WCAG 2.1 AA or any other accessibility standard. Every page is built against an automated accessibility gate, and our target for the published editions is WCAG 2.2 Level AA. If something is unusable, please tell us.