Remember, a determinant measures how a matrix scales area or volume. Now let's see how to actually compute that number for any matrix.
1
Diagonal and Triangular Matrices
Let's start with the determinants of a diagonal matrix and an upper-triangular matrix:
det200030002anddet200130312
In the diagonal matrix on the left, all entries off the main diagonal are zero, so the three edges of the 3D box line up right along the axes. In the upper-triangular matrix on the right, all entries below the main diagonal are still zero, while nonzero numbers sit above it.
length2×width3×height2=volume12
base2×3×height2=volume12
Diagonal and Triangular Matrices
det200030002=?
Because the entries above the main diagonal only shear the box sideways without changing its base or height, the volume is still just the product of the numbers on the main diagonal:
det200130312=main diagonal2×3×2=12
Changing the three entries above the main diagonal shears the horizontal layers of the 3D box sideways, while the base area, height, main diagonal entries, and volume of 12 all stay the same.
In an upper-triangular matrix, the numbers above the diagonal just slant and slide the box's layers sideways, so its volume still equals the diagonal numbers multiplied together.
2
Computing a Determinant by Elimination
Now take a matrix that does not have zeros in the bottom-left corner:
det24−2152370
Here all three edges of the box slant across one another, so multiplying the diagonal entries right away (2×5×0=0) does not give the volume. Instead, we use row operations to turn the entries in the bottom-left corner into a triangle of zeros, keeping track of how each step changes the determinant:
Rj←Rj+kRi:determinant is unchanged (a shear)Swap Ri and Rj:determinant flips sign (×(−1))Ri←kRi:determinant is multiplied by k(so a common factor kcan be pulled out of one row)
Computing a Determinant by Elimination
det24−2152370=?
Text solution
Zero out the entries below the first pivotSubtract 2R1 from R2 and add R1 to R3 to turn the 4 and −2 below the top-left 2 into zeros without changing the determinant.
det24−2152370=det200133313
Zero out the entry below the second pivotSubtract the new R2 from R3 so that all entries below the main diagonal are zero.
=det200130312
Multiply the main diagonal pivotsBecause we only added multiples of one row to another, the determinant is the product of the pivots along the diagonal.
=2×3×2=12
So the signed volume of the original slanted box is 12, the same as the upper-triangular box it reduces to.
3
Elimination with Row Swaps and Factoring
What if a 0 is sitting in the pivot spot we need, or a pivot would force us to work with fractions? Let's find
det012325639
Because the top-left entry is 0, we cannot multiply Row 1 by anything to eliminate the 1 and 2 below it, so we have to swap rows first.
Elimination with Row Swaps and Factoring
det012325639=?
Text solution
Swap rows to put a nonzero pivot in the top-left cornerSwap R1 and R2 to put 1 in the first pivot spot, and put a minus sign in front of the determinant.
det012325639=−det102235369
Zero out the bottom of the first columnSubtract 2R1 from R3 to eliminate the 2 below the first pivot.
=−det100231363
Factor a common multiple out of the second rowPull the common factor of 3 out of R2 and put it in front with the minus sign, so the middle pivot becomes 1 instead of giving us fractions.
=−3det100211323
Zero out the entry below the second pivot and multiply the diagonalSubtract R2 from R3 to finish the triangle of zeros, then multiply the −3 in front by the diagonal pivots.
=−3det100210321=−3×(1×1×1)=−3
4
Why Cofactor Expansion Works
Elimination is fast for numbers, but when a matrix contains a variable like x or λ, dividing by a pivot gets messy. We also want a direct way to break a 3×3 determinant down into the 2×2 determinants
det[acbd]=ad−bc
that we already know. Take our first 3×3 determinant again:
det24−2152370
When the other rows stay the same, a determinant splits across a sum in one row. Writing the top row as [2,1,3]=[2,0,0]+[0,1,0]+[0,0,3] splits this 3×3 determinant into three simpler pieces, each with a single nonzero entry in the top row.
Why Cofactor Expansion Works
det24−2152370=?
from det[acbd]=ad−bc
Text solution
Split across the top row by crossing out each entry's row and columnMultiply each top-row entry by its signed 2×2 determinant, where the +,−,+ signs come from the column swaps needed to move each entry to the top-left corner.
det24−2152370=2cofactor of 2(+det[5270])+1cofactor of 1(−det[4−270])+3cofactor of 3(+det[4−252])
Compute each 2×2 determinant using ad−bcFind the three 2×2 determinants and add the pieces together.
=2(5(0)−7(2))−1(4(0)−7(−2))+3(4(2)−5(−2))
=2(−14)−1(14)+3(18)=−28−14+54=12
Moving any entry into the top-left pivot spot by swapping neighboring rows and columns flips the sign between + and − with each swap. The 2×2 block left in the bottom-right corner is the exact same 2×2 matrix you get by crossing out that entry's row and column.
Swapping any entry step by step into the top-left corner flips the sign on each swap and leaves the exact 2×2 block you get by crossing out its row and column.
Each step right or down from the top-left corner takes one more row or column swap to reach the top-left pivot spot, which gives the checkerboard of signs:
+−+−+−+−+
5
Expanding Along Any Row or Column Using Zeros
Because any row or column can be swapped to the front, we can expand along whichever row or column makes the arithmetic easiest. In our matrix
det24−2152370
the bottom row [−2,2,0] already has a 0 in it, and we can even use a column operation first to get two zeros in that row before expanding.
Expanding Along Any Row or Column Using Zeros
det24−2152370=?
checkerboard +−+−+−+−+
Expanding right along the original bottom row [−2,2,0] with checkerboard signs +,−,+ already skips the third 2×2 determinant:
Combining one column operation with cofactor expansion cuts the work down to a single 2×2 determinant:
Text solution
Create a second zero in the bottom rowAdd Column 1 to Column 2 (C2←C2+C1), which leaves the determinant unchanged and cancels the 2 at the bottom of Column 2.
det24−2152370=det24−2390370
Expand along the bottom rowBecause the two zeros multiply their cofactors by 0, only the −2 in the bottom-left corner (checkerboard sign +) is left.
=+(−2)det[3937]+0+0
Compute the single 2×2 determinantMultiply −2 by ad−bc.
=−2(3(7)−3(9))=−2(21−27)=−2(−6)=12
Expanding along any row or column of the matrix gives the exact same determinant, and any zero entry in the row or column you pick multiplies its 2×2 determinant by 0, so you don't have to compute it.
Expanding along any row or column always gives the same determinant, and every zero lets you skip one smaller determinant.
6
Computing a 4×4 Determinant
In a 4×4 matrix, crossing out one row and column leaves a 3×3 determinant, which then breaks down into 2×2 determinants. Suppose we want to find
det1020214−203113250
Expanding across a row with no zeros would give us four 3×3 determinants, which means twelve 2×2 determinants by hand! Instead, we look for the row or column with the most zeros and use elimination to turn the rest of its entries into zeros before expanding.
Computing a 4×4 Determinant
det1020214−203113250=?
Text solution
Zero out the remaining entry in Column 1Column 1 already has two zeros; subtract 2R1 from R3 to turn the 2 in Row 3 into a third zero.
Expand down Column 1 to drop to a single 3×3 determinantCircle the 1 in the top-left corner (checkerboard sign +) and cross out Row 1 and Column 1; the three zeros below it drop out.
=+1det10−23112−10
Expand the 3×3 determinant along its middle rowPick Row 2, [0,1,−1], because it already has a zero, and use the 3×3 middle-row checkerboard signs −,+,−.
=−0det[3120]+1det[1−220]−(−1)det[1−231]
Compute the remaining 2×2 determinantsFind the two nonzero 2×2 determinants using ad−bc and add them up.
=0+1(1(0)−2(−2))+1(1(1)−3(−2))=4+7=11
Once you drop from a 4×4 determinant to a 3×3 determinant, start a fresh 3×3 checkerboard with + in the new top-left corner. Also, write out −(−1) whenever a negative entry lands on a − spot so you don't miss the double negative.
Key concepts
When you need the determinant of a matrix, look at where the zeros are before doing any algebra. If all entries on one side of the main diagonal are already zero, you don't need elimination or cofactor expansion at all. The off-diagonal entries only shear the box, so multiply right down the main diagonal:
det200130312=2×3×2=12
For a matrix of numbers with few zeros, row elimination is fastest: use Rj←Rj+kRi to turn the bottom-left corner into a triangle of zeros without changing the determinant. If a 0 is in a pivot spot, swap two rows and flip the sign in front (×(−1)); if a row has a common factor k, pull k out in front of the determinant (×k) to avoid fractions in the remaining steps:
When a matrix contains variables like x, or already has zeros in a row or column, use cofactor expansion along the row or column with the most zeros. Multiply each entry in that row or column by its sign from the checkerboard (starting with + in the top-left corner and alternating with each step right or down) and by the smaller determinant left when its row and column are crossed out:
+−+−+−+−+anddet[acbd]=ad−bc
For a 4×4 matrix (or a 3×3 with only one zero), combine both methods. Pick the row or column that already has the most zeros, use Rj←Rj+kRi or Cj←Cj+kCi to turn all but one of its nonzero entries into zeros, and then expand along it so only one smaller determinant is left.
7
Practice
1
Find the determinant of the matrix 300−4−20754.
Watch the negative sign on −2, since dropping it gives 24.
Check the entries below the main diagonal before doing any row operations or expansion.
All entries below the main diagonal are already 0, so the matrix is upper-triangular and the determinant is the product of the entries on the main diagonal (watch the negative sign on −2, since dropping it gives 24, and the numbers −4,7,5 above the diagonal only shear the box and do not change the determinant):
det300−4−20754=3×(−2)×4=−24
2
Use row elimination to find the determinant of 24−2−114351.
Be careful with the double negative in the bottom-right entry: 4−(−1)=5, whereas writing 4−1=3 gives a wrong determinant of 18.
Use the 2 in the top-left corner to zero out the 4 and −2 below it first.
Subtract 2R1 from R2 to get [0,3,−1], and add R1 to R3 to get [0,3,4]:
det24−2−114351=det200−1333−14
Then subtract R2 from R3 to get [0,0,5] (be careful with the double negative in the bottom-right entry: 4−(−1)=5, whereas writing 4−1=3 gives a wrong determinant of 18). Because we didn't swap or scale any rows, multiplying the diagonal pivots gives:
=det200−1303−15=2×3×5=30
3
Use row elimination to find the determinant of 0134−2−4−837.
Swap R1 and R2 to put 1 in the first pivot spot, multiplying the determinant by −1 (forgetting to flip the sign on this swap gives +8 at the end).Dividing R2 by 4 without putting the factor of 4 in front gives −2.
A 0 is sitting in the first pivot spot, so swap rows to move a 1 there first, and keep track of the sign change.
Swap R1 and R2 to put 1 in the first pivot spot, multiplying the determinant by −1 (forgetting to flip the sign on this swap gives +8 at the end), then subtract 3R1 from R3 to get [0,2,−2]:
Factor 4 out of R2,[0,4,−8], to get [0,1,−2] and put −4 in front of the determinant (dividing R2 by 4 without putting the factor of 4 in front gives −2), then subtract 2R2 from R3 to get [0,0,2]. Multiplying the −4 in front by the diagonal gives:
=−4det100−2103−22=−4×(1×1×2)=−8
4
Use cofactor expansion along the row or column with the most zeros to find the determinant of 30−1402−2−53.
Forgetting the checkerboard minus sign leaves −5 in front and gives −50.
Expand along Row 2, and check the checkerboard sign for the third spot in that row before multiplying by −5.
Expand along Row 2, [0,0,−5], where the checkerboard signs are −,+,−. The first two terms are 0, and the third term combines the checkerboard − with −5 (forgetting the checkerboard minus sign leaves −5 in front and gives −50):
Use cofactor expansion to find the determinant of x202x3011 in terms of x, and find the values of x for which the determinant equals 0.
Expand along Row 1, where the 0 at the end drops out, to write the determinant as a quadratic in x.
Expanding along Row 1 with checkerboard signs +,−,+ (remember the minus sign on the middle term, since writing +2 instead of −2 gives x2−3x+4, which does not factor):
Combine row or column operations with cofactor expansion to find the determinant of 210−1123131−120102.
At the 1 in Row 2, Column 4, the 4×4 checkerboard sign is + (Row 2 goes −,+,−,+; using − here flips the final answer to −24).Watch the checkerboard minus on the middle −3, since missing it turns −6 into +6 and gives 36.
Column 4 already has two zeros, so use the 1 in Row 2, Column 4 to eliminate the 2 at the bottom of Column 4 before expanding.
Subtract 2R2 from R4 so Row 4 becomes [−3,−3,0,0] and Column 4 has three zeros:
Expanding down Column 4 at the 1 in Row 2, Column 4, where the 4×4 checkerboard sign is + (Row 2 goes −,+,−,+; using − here flips the final answer to −24), leaves:
=+1det20−313−33−10
Expanding that 3×3 determinant along Row 3, [−3,−3,0], with 3×3 checkerboard signs +,−,+ (watch the checkerboard minus on the middle −3, since missing it turns −6 into +6 and gives 36):