Shear a parallelogram, or slide one side along the other, and its area stays the same. Watch elimination turn it into a rectangle.
Sliding a shape keeps its area
An elimination step, then a column step: two shears, and the area meter.
The parallelogram on (2, 1) and (−1, 1), area 3.
Describe this picture
The parallelogram on the columns and , with an area meter reading 3. After a second’s rest it changes in two steps, each a slide of 2.6 s followed by a rest. First the elimination step “row 2 minus half of row 1” shears it vertically into the parallelogram on and : each vertical slice of the shape slides up or down and keeps its length, so the area stays 3. Then the second side slides along the first until the shape is an upright rectangle, 2 wide and 1.5 tall. Each shear slides in a straight line, so the meter reads 3 throughout, and the rectangle’s sides are labelled as the pivots, 2 and 1.5. A transport plays, pauses and steps. After the clip, a Row exchange button swaps the two rows of the matrix. The shape is mirrored, and the meter reads .
Three rules
The determinant as area gave the meaning: the factor by which a matrix scales area. To compute it for a big matrix, use elimination from Elimination, and three rules about rows.
- Subtract a multiple of one row from another: the determinant does not change. The step is multiplication by an elimination matrix, which is a shear with determinant 1. In the picture at the top of the page, it sheared the parallelogram vertically: each vertical slice slid up or down at full length, so the area stayed 3.
- Exchange two rows: the determinant changes sign. That is a mirror. After the clip, press the exchange button and watch the meter turn to .
- Multiply a row by : the determinant is multiplied by . That stretches one direction.
The same three rules hold for columns, because . The second slide in the picture was a column step.
The pivots
Elimination turns into an upper triangle using only rule 1, and perhaps rule 2. A triangular matrix’s determinant is the product of its diagonal, the pivots: in the picture, the rectangle is 2 by 1.5. So
with a minus sign for each row exchange. For , the pivots are 2 and 1.5, and .
The matrix of the elimination page, , had pivots 1, 2 and 5, so . The matrix has pivots 1, and 2, so its determinant is , the box turned inside out from the area page.
With an exchange: has a zero first pivot. Exchange the rows to get , with pivots 3 and 2, product 6. One exchange, so . The formula agrees: .
Cofactors
There is also a formula that needs no elimination. Pick a row . For each entry in it, cross out row and column ; the determinant of what is left is the minor . Give it the sign , a chessboard of signs starting with at the top left; the signed minor is the cofactor. Then
For the matrix above, along row 1:
Any row gives the same answer. The cofactors of are in row 1, in row 2 and in row 3. Along row 2: . Along row 3: .
The inverse and Cramer’s rule
Put the cofactors in a matrix and transpose it. That is the adjugate, . Then
Check: row 1 of times column 1 of the adjugate is , and times column 2 is . So . For a matrix this is the swap-and-change-signs formula of The inverse matrix.
Cramer’s rule solves with determinants alone. Replace column of by to get . Then
For the system , of Two pictures of a linear system, , and
Why programs eliminate
Expanding by cofactors again and again, down to pieces, makes products for an matrix. Elimination needs about steps.
For a matrix, cofactors are fine. For , they need products. At a billion a second, that is about 77 years. Elimination needs about steps.
Two warnings about determinants. They do not add: is not . For the identity, , not 2. And a tiny determinant does not mean a matrix is nearly singular. The matrix has determinant , yet inverting it is perfectly safe: its inverse is . Conditioning measures how close to singular a matrix really is.
Worked example
- By pivots. : pivots 1, 2, 5, so .
- By cofactors. Along row 1: .
- The inverse. .
- With an exchange. .
- Cramer. , gives and .
- Quick ones. Pivots 2, 3, with no exchanges: . Exchange two rows of a matrix with determinant 5: . . A matrix with : .
Where you’ll meet this
Cramer’s rule is a common way to code where two lines in a drawing meet: one solve, written out. Programs that build meshes for 3-D models test which side of a plane a point lies on by the sign of a determinant. Circuit simulators and SciPy never expand cofactors for large systems; they eliminate, as LU factorisation does, and read the determinant from the pivots if they need it.
Reference card
| Quantity | Formula | Notes |
|---|---|---|
| Row step | row minus a multiple of row | determinant unchanged |
| Exchange | swap two rows | sign changes |
| Scale a row | multiply a row by | determinant times |
| Pivots | minus for each exchange | |
| Cofactors | any row | |
| Adjugate | transposed cofactors | |
| Cramer | column replaced by | |
| Cost | cofactors , elimination | eliminate for large |