Linear AlgebraDeterminants3 of 6
Determinants · 3

Computing Determinants: Cofactors and Elimination

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:

det⁡[200030002]anddet⁡[213031002]\displaystyle \det \begin{bmatrix} \pivot{2} & 0 & 0 \\ 0 & \pivot{3} & 0 \\ 0 & 0 & \pivot{2} \end{bmatrix} \quad \text{and} \quad \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 0 & \pivot{3} & 1 \\ 0 & 0 & \pivot{2} \end{bmatrix}

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.

2⏟length×3⏟width×2⏟height=12⏟volume\underbrace{\htmlClass{lc-blue}{2}}_{\text{\small length}} \times \underbrace{\htmlClass{lc-blue}{3}}_{\text{\small width}} \times \underbrace{\htmlClass{lc-blue}{2}}_{\text{\small height}} = \underbrace{12}_{\text{\small volume}}
2×3⏟base×2⏟height=12⏟volume\underbrace{\htmlClass{lc-blue}{2} \times \htmlClass{lc-blue}{3}}_{\text{\small base}} \times \underbrace{\htmlClass{lc-blue}{2}}_{\text{\small height}} = \underbrace{12}_{\text{\small volume}}
Diagonal and Triangular Matrices
det⁡[200030002]=  ?\displaystyle \det \begin{bmatrix} \pivot{2} & 0 & 0 \\ 0 & \pivot{3} & 0 \\ 0 & 0 & \pivot{2} \end{bmatrix} = \;?

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:

det⁡[213031002]=2×3×2⏟main diagonal=12\displaystyle \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 0 & \pivot{3} & 1 \\ 0 & 0 & \pivot{2} \end{bmatrix} = \underbrace{\pivot{2} \times \pivot{3} \times \pivot{2}}_{\text{main diagonal}} = 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 1212 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:

det⁡[213457−220]\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix}

Here all three edges of the box slant across one another, so multiplying the diagonal entries right away (2×5×0=02 \times 5 \times 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)\displaystyle \begin{aligned} &\operation{R_j \leftarrow R_j + kR_i} : \\ &\quad \text{determinant is unchanged (a shear)} \\[6pt] &\text{Swap } \operation{R_i} \text{ and } \operation{R_j} : \\ &\quad \text{determinant flips sign } (\front{\times (-1)}) \\[6pt] &\operation{R_i \leftarrow} \front{k}\operation{R_i} : \\ &\quad \text{determinant is multiplied by } \front{k} \\ &\quad \text{(so a common factor } \front{k} \\ &\quad \text{can be pulled out of one row)} \end{aligned}
Computing a Determinant by Elimination
det⁡[213457−220]=  ?\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} = \;?
Text solution
Zero out the entries below the first pivotSubtract 2R1\operation{2R_1} from R2\operation{R_2} and add R1\operation{R_1} to R3\operation{R_3} to turn the 44 and −2-2 below the top-left 2\pivot{2} into zeros without changing the determinant.
det⁡[213457−220]=det⁡[213031033]\displaystyle \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} = \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 0 & 3 & 1 \\ 0 & 3 & 3 \end{bmatrix}
Zero out the entry below the second pivotSubtract the new R2\operation{R_2} from R3\operation{R_3} so that all entries below the main diagonal are zero.
=det⁡[213031002]\displaystyle = \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 0 & \pivot{3} & 1 \\ 0 & 0 & \pivot{2} \end{bmatrix}
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\displaystyle = \pivot{2} \times \pivot{3} \times \pivot{2} =12\displaystyle = 12

So the signed volume of the original slanted box is 1212, the same as the upper-triangular box it reduces to.

3

Elimination with Row Swaps and Factoring

What if a 00 is sitting in the pivot spot we need, or a pivot would force us to work with fractions? Let's find

det⁡[036123259]\displaystyle \det \begin{bmatrix} 0 & 3 & 6 \\ 1 & 2 & 3 \\ 2 & 5 & 9 \end{bmatrix}

Because the top-left entry is 00, we cannot multiply Row 1 by anything to eliminate the 11 and 22 below it, so we have to swap rows first.

Elimination with Row Swaps and Factoring
det⁡[036123259]=  ?\displaystyle \det \begin{bmatrix} 0 & 3 & 6 \\ 1 & 2 & 3 \\ 2 & 5 & 9 \end{bmatrix} = \;?
Text solution
Swap rows to put a nonzero pivot in the top-left cornerSwap R1\operation{R_1} and R2\operation{R_2} to put 1\pivot{1} in the first pivot spot, and put a minus sign in front of the determinant.
det⁡[036123259]=−det⁡[123036259]\displaystyle \det \begin{bmatrix} 0 & 3 & 6 \\ 1 & 2 & 3 \\ 2 & 5 & 9 \end{bmatrix} = \front{-}\det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & 3 & 6 \\ 2 & 5 & 9 \end{bmatrix}
Zero out the bottom of the first columnSubtract 2R1\operation{2R_1} from R3\operation{R_3} to eliminate the 22 below the first pivot.
=−det⁡[123036013]\displaystyle = \front{-}\det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & 3 & 6 \\ 0 & 1 & 3 \end{bmatrix}
Factor a common multiple out of the second rowPull the common factor of 3\front{3} out of R2\operation{R_2} and put it in front with the minus sign, so the middle pivot becomes 1\pivot{1} instead of giving us fractions.
=−3det⁡[123012013]\displaystyle = \front{-3} \det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & \pivot{1} & 2 \\ 0 & 1 & 3 \end{bmatrix}
Zero out the entry below the second pivot and multiply the diagonalSubtract R2\operation{R_2} from R3\operation{R_3} to finish the triangle of zeros, then multiply the −3\front{-3} in front by the diagonal pivots.
=−3det⁡[123012001]=−3×(1×1×1)=−3\displaystyle \begin{aligned} &= \front{-3} \det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & \pivot{1} & 2 \\ 0 & 0 & \pivot{1} \end{bmatrix} \\ &= \front{-3} \times (\pivot{1} \times \pivot{1} \times \pivot{1}) = -3 \end{aligned}
4

Why Cofactor Expansion Works

Elimination is fast for numbers, but when a matrix contains a variable like xx or λ\lambda, dividing by a pivot gets messy. We also want a direct way to break a 3×33 \times 3 determinant down into the 2×22 \times 2 determinants

det⁡[abcd]=ad−bc\displaystyle \det \begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc

that we already know. Take our first 3×33 \times 3 determinant again:

det⁡[213457−220]\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix}

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][\pivot{2}, \pivot{1}, \pivot{3}] = [\pivot{2}, 0, 0] + [0, \pivot{1}, 0] + [0, 0, \pivot{3}] splits this 3×33 \times 3 determinant into three simpler pieces, each with a single nonzero entry in the top row.

Why Cofactor Expansion Works
det⁡[213457−220]=  ?\displaystyle \det \begin{bmatrix} \pivot{2} & \pivot{1} & \pivot{3} \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} = \;?
from det⁡[abcd]=ad−bc\displaystyle \text{from } \det \begin{bmatrix} a & b \\ c & d \end{bmatrix} = 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×22 \times 2 determinant, where the +,−,+\front{+}, \front{-}, \front{+} signs come from the column swaps needed to move each entry to the top-left corner.
det⁡[213457−220]=2(+det⁡[5720])⏟cofactor of 2+1(−det⁡[47−20])⏟cofactor of 1+3(+det⁡[45−22])⏟cofactor of 3\displaystyle \begin{aligned} &\det \begin{bmatrix} \pivot{2} & \pivot{1} & \pivot{3} \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} \\ &\quad = \pivot{2} \underbrace{\left(\front{+}\det \begin{bmatrix} 5 & 7 \\ 2 & 0 \end{bmatrix}\right)}_{\text{cofactor of } \pivot{2}} \\ &\qquad + \pivot{1} \underbrace{\left(\front{-}\det \begin{bmatrix} 4 & 7 \\ -2 & 0 \end{bmatrix}\right)}_{\text{cofactor of } \pivot{1}} \\ &\qquad + \pivot{3} \underbrace{\left(\front{+}\det \begin{bmatrix} 4 & 5 \\ -2 & 2 \end{bmatrix}\right)}_{\text{cofactor of } \pivot{3}} \end{aligned}
Compute each 2×22 \times 2 determinant using ad−bcad - bcFind the three 2×22 \times 2 determinants and add the pieces together.
=2(5(0)−7(2))−1(4(0)−7(−2))+3(4(2)−5(−2))\displaystyle \begin{aligned} &= \pivot{2}(5(0) - 7(2)) \\ &\quad \front{-} \pivot{1}(4(0) - 7(-2)) \\ &\quad \front{+} \pivot{3}(4(2) - 5(-2)) \end{aligned}
=2(−14)−1(14)+3(18)\displaystyle = \pivot{2}(-14) \front{-} \pivot{1}(14) \front{+} \pivot{3}(18) =−28−14+54\displaystyle = -28 - 14 + 54 =12\displaystyle = 12

Moving any entry into the top-left pivot spot by swapping neighboring rows and columns flips the sign between +\front{+} and −\front{-} with each swap. The 2×22 \times 2 block left in the bottom-right corner is the exact same 2×22 \times 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:

[+−+−+−+−+]\displaystyle \begin{bmatrix} \front{+} & \front{-} & \front{+} \\ \front{-} & \front{+} & \front{-} \\ \front{+} & \front{-} & \front{+} \end{bmatrix}
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

det⁡[213457−220]\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix}

the bottom row [−2,2,0][-2, 2, 0] already has a 00 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
det⁡[213457−220]=  ?\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} = \;?
checkerboard [+−+−+−+−+]\displaystyle \text{checkerboard }\begin{bmatrix} \front{+} & \front{-} & \front{+} \\ \front{-} & \front{+} & \front{-} \\ \front{+} & \front{-} & \front{+} \end{bmatrix}

Expanding right along the original bottom row [−2,2,0][-2, 2, 0] with checkerboard signs +,−,+\front{+}, \front{-}, \front{+} already skips the third 2×22 \times 2 determinant:

+(−2)det⁡[1357]−2det⁡[2347]+0=−2(−8)−2(2)+0=16−4=12\displaystyle \begin{aligned} &\front{+}\pivot{(-2)} \det \begin{bmatrix} 1 & 3 \\ 5 & 7 \end{bmatrix} \front{-} \pivot{2} \det \begin{bmatrix} 2 & 3 \\ 4 & 7 \end{bmatrix} + 0 \\ &\quad = \pivot{-2}(-8) \front{-} \pivot{2}(2) + 0 \\ &\quad = 16 - 4 = 12 \end{aligned}

Combining one column operation with cofactor expansion cuts the work down to a single 2×22 \times 2 determinant:

Text solution
Create a second zero in the bottom rowAdd Column 1 to Column 2 (C2←C2+C1\operation{C_2 \leftarrow C_2 + C_1}), which leaves the determinant unchanged and cancels the 22 at the bottom of Column 2.
det⁡[213457−220]=det⁡[233497−200]\displaystyle \det \begin{bmatrix} 2 & 1 & 3 \\ 4 & 5 & 7 \\ -2 & 2 & 0 \end{bmatrix} = \det \begin{bmatrix} 2 & 3 & 3 \\ 4 & 9 & 7 \\ -2 & 0 & 0 \end{bmatrix}
Expand along the bottom rowBecause the two zeros multiply their cofactors by 00, only the −2\pivot{-2} in the bottom-left corner (checkerboard sign +\front{+}) is left.
=+(−2)det⁡[3397]+0+0\displaystyle = \front{+}\pivot{(-2)} \det \begin{bmatrix} 3 & 3 \\ 9 & 7 \end{bmatrix} + 0 + 0
Compute the single 2×22 \times 2 determinantMultiply −2\pivot{-2} by ad−bcad - bc.
=−2(3(7)−3(9))\displaystyle = \pivot{-2}(3(7) - 3(9)) =−2(21−27)\displaystyle = \pivot{-2}(21 - 27) =−2(−6)\displaystyle = \pivot{-2}(-6) =12\displaystyle = 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×22 \times 2 determinant by 00, 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×44 \times 4 Determinant

In a 4×44 \times 4 matrix, crossing out one row and column leaves a 3×33 \times 3 determinant, which then breaks down into 2×22 \times 2 determinants. Suppose we want to find

det⁡[1203013224150−210]\displaystyle \det \begin{bmatrix} 1 & 2 & 0 & 3 \\ 0 & 1 & 3 & 2 \\ 2 & 4 & 1 & 5 \\ 0 & -2 & 1 & 0 \end{bmatrix}

Expanding across a row with no zeros would give us four 3×33 \times 3 determinants, which means twelve 2×22 \times 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
det⁡[1203013224150−210]=  ?\displaystyle \det \begin{bmatrix} 1 & 2 & 0 & 3 \\ 0 & 1 & 3 & 2 \\ 2 & 4 & 1 & 5 \\ 0 & -2 & 1 & 0 \end{bmatrix} = \;?
Text solution
Zero out the remaining entry in Column 1Column 1 already has two zeros; subtract 2R1\operation{2R_1} from R3\operation{R_3} to turn the 22 in Row 3 into a third zero.
det⁡[1203013224150−210]=det⁡[12030132001−10−210]\displaystyle \det \begin{bmatrix} \pivot{1} & 2 & 0 & 3 \\ 0 & 1 & 3 & 2 \\ 2 & 4 & 1 & 5 \\ 0 & -2 & 1 & 0 \end{bmatrix} = \det \begin{bmatrix} \pivot{1} & 2 & 0 & 3 \\ 0 & 1 & 3 & 2 \\ 0 & 0 & 1 & -1 \\ 0 & -2 & 1 & 0 \end{bmatrix}
Expand down Column 1 to drop to a single 3×33 \times 3 determinantCircle the 1\pivot{1} in the top-left corner (checkerboard sign +\front{+}) and cross out Row 1 and Column 1; the three zeros below it drop out.
=+1det⁡[13201−1−210]\displaystyle = \front{+}\pivot{1} \det \begin{bmatrix} 1 & 3 & 2 \\ 0 & 1 & -1 \\ -2 & 1 & 0 \end{bmatrix}
Expand the 3×33 \times 3 determinant along its middle rowPick Row 2, [0,1,−1][0, 1, -1], because it already has a zero, and use the 3×33 \times 3 middle-row checkerboard signs −,+,−\front{-}, \front{+}, \front{-}.
=−0det⁡[3210]+1det⁡[12−20]−(−1)det⁡[13−21]\displaystyle \begin{aligned} &= \front{-}\pivot{0} \det \begin{bmatrix} 3 & 2 \\ 1 & 0 \end{bmatrix} \\ &\quad \front{+} \pivot{1} \det \begin{bmatrix} 1 & 2 \\ -2 & 0 \end{bmatrix} \\ &\quad \front{-} \pivot{(-1)} \det \begin{bmatrix} 1 & 3 \\ -2 & 1 \end{bmatrix} \end{aligned}
Compute the remaining 2×22 \times 2 determinantsFind the two nonzero 2×22 \times 2 determinants using ad−bcad - bc and add them up.
=0+1(1(0)−2(−2))+1(1(1)−3(−2))=4+7=11\displaystyle \begin{aligned} &= 0 \front{+} \pivot{1}(1(0) - 2(-2)) \\ &\quad + 1(1(1) - 3(-2)) \\ &= 4 + 7 = 11 \end{aligned}

Once you drop from a 4×44 \times 4 determinant to a 3×33 \times 3 determinant, start a fresh 3×33 \times 3 checkerboard with +\front{+} in the new top-left corner. Also, write out −(−1)\front{-}\pivot{(-1)} whenever a negative entry lands on a −\front{-} 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:

det⁡[213031002]=2×3×2=12\displaystyle \det \begin{bmatrix} \pivot{2} & 1 & 3 \\ 0 & \pivot{3} & 1 \\ 0 & 0 & \pivot{2} \end{bmatrix} = \pivot{2} \times \pivot{3} \times \pivot{2} = 12

For a matrix of numbers with few zeros, row elimination is fastest: use Rj←Rj+kRi\operation{R_j \leftarrow R_j + kR_i} to turn the bottom-left corner into a triangle of zeros without changing the determinant. If a 00 is in a pivot spot, swap two rows and flip the sign in front (×(−1)\front{\times (-1)}); if a row has a common factor k\front{k}, pull k\front{k} out in front of the determinant (×k\front{\times k}) to avoid fractions in the remaining steps:

det⁡[036123259]=−det⁡[123036259]=−3det⁡[123012001]=−3(1×1×1)=−3\displaystyle \begin{aligned} \det \begin{bmatrix} 0 & 3 & 6 \\ 1 & 2 & 3 \\ 2 & 5 & 9 \end{bmatrix} &= \front{-}\det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & 3 & 6 \\ 2 & 5 & 9 \end{bmatrix} \\ &= \front{-3} \det \begin{bmatrix} \pivot{1} & 2 & 3 \\ 0 & \pivot{1} & 2 \\ 0 & 0 & \pivot{1} \end{bmatrix} \\ &= \front{-3}(\pivot{1} \times \pivot{1} \times \pivot{1}) = -3 \end{aligned}

When a matrix contains variables like xx, 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 +\front{+} 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⁡[abcd]=ad−bc\displaystyle \begin{gathered} \begin{bmatrix} \front{+} & \front{-} & \front{+} \\ \front{-} & \front{+} & \front{-} \\ \front{+} & \front{-} & \front{+} \end{bmatrix} \\ \text{and} \quad \det \begin{bmatrix} a & b \\ c & d \end{bmatrix} = ad - bc \end{gathered}

For a 4×44 \times 4 matrix (or a 3×33 \times 3 with only one zero), combine both methods. Pick the row or column that already has the most zeros, use Rj←Rj+kRi\operation{R_j \leftarrow R_j + kR_i} or Cj←Cj+kCi\operation{C_j \leftarrow C_j + kC_i} 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 [3−470−25004]\begin{bmatrix} 3 & -4 & 7 \\ 0 & -2 & 5 \\ 0 & 0 & 4 \end{bmatrix}.

Check the entries below the main diagonal before doing any row operations or expansion.

All entries below the main diagonal are already 00, 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\pivot{-2}, since dropping it gives 2424, and the numbers −4,7,5-4, 7, 5 above the diagonal only shear the box and do not change the determinant):
det⁡[3−470−25004]=3×(−2)×4=−24\displaystyle \det \begin{bmatrix} \pivot{3} & -4 & 7 \\ 0 & \pivot{-2} & 5 \\ 0 & 0 & \pivot{4} \end{bmatrix} = \pivot{3} \times \pivot{(-2)} \times \pivot{4} = -24
2

Use row elimination to find the determinant of [2−13415−241]\begin{bmatrix} 2 & -1 & 3 \\ 4 & 1 & 5 \\ -2 & 4 & 1 \end{bmatrix}.

Use the 2\pivot{2} in the top-left corner to zero out the 44 and −2-2 below it first.

Subtract 2R1\operation{2R_1} from R2\operation{R_2} to get [0,3,−1][0, 3, -1], and add R1\operation{R_1} to R3\operation{R_3} to get [0,3,4][0, 3, 4]:
det⁡[2−13415−241]=det⁡[2−1303−1034]\displaystyle \det \begin{bmatrix} \pivot{2} & -1 & 3 \\ 4 & 1 & 5 \\ -2 & 4 & 1 \end{bmatrix} = \det \begin{bmatrix} \pivot{2} & -1 & 3 \\ 0 & 3 & -1 \\ 0 & 3 & 4 \end{bmatrix}
Then subtract R2\operation{R_2} from R3\operation{R_3} to get [0,0,5][0, 0, 5] (be careful with the double negative in the bottom-right entry: 4−(−1)=54 - (-1) = 5, whereas writing 4−1=34 - 1 = 3 gives a wrong determinant of 1818). Because we didn't swap or scale any rows, multiplying the diagonal pivots gives:
=det⁡[2−1303−1005]=2×3×5=30\displaystyle = \det \begin{bmatrix} \pivot{2} & -1 & 3 \\ 0 & \pivot{3} & -1 \\ 0 & 0 & \pivot{5} \end{bmatrix} = \pivot{2} \times \pivot{3} \times \pivot{5} = 30
3

Use row elimination to find the determinant of [04−81−233−47]\begin{bmatrix} 0 & 4 & -8 \\ 1 & -2 & 3 \\ 3 & -4 & 7 \end{bmatrix}.

A 00 is sitting in the first pivot spot, so swap rows to move a 1\pivot{1} there first, and keep track of the sign change.

Swap R1\operation{R_1} and R2\operation{R_2} to put 1\pivot{1} in the first pivot spot, multiplying the determinant by −1\front{-1} (forgetting to flip the sign on this swap gives +8+8 at the end), then subtract 3R1\operation{3R_1} from R3\operation{R_3} to get [0,2,−2][0, 2, -2]:
det⁡[04−81−233−47]=−det⁡[1−2304−83−47]=−det⁡[1−2304−802−2]\displaystyle \begin{aligned} &\det \begin{bmatrix} 0 & 4 & -8 \\ 1 & -2 & 3 \\ 3 & -4 & 7 \end{bmatrix} \\ &\quad = \front{-}\det \begin{bmatrix} \pivot{1} & -2 & 3 \\ 0 & 4 & -8 \\ 3 & -4 & 7 \end{bmatrix} \\ &\quad = \front{-}\det \begin{bmatrix} \pivot{1} & -2 & 3 \\ 0 & 4 & -8 \\ 0 & 2 & -2 \end{bmatrix} \end{aligned}
Factor 4\front{4} out of R2\operation{R_2}, [0,4,−8][0, 4, -8], to get [0,1,−2][0, 1, -2] and put −4\front{-4} in front of the determinant (dividing R2\operation{R_2} by 4\front{4} without putting the factor of 4\front{4} in front gives −2-2), then subtract 2R2\operation{2R_2} from R3\operation{R_3} to get [0,0,2][0, 0, 2]. Multiplying the −4\front{-4} in front by the diagonal gives:
=−4det⁡[1−2301−2002]=−4×(1×1×2)=−8\displaystyle \begin{aligned} &= \front{-4} \det \begin{bmatrix} \pivot{1} & -2 & 3 \\ 0 & \pivot{1} & -2 \\ 0 & 0 & \pivot{2} \end{bmatrix} \\ &= \front{-4} \times (\pivot{1} \times \pivot{1} \times \pivot{2}) = -8 \end{aligned}
4

Use cofactor expansion along the row or column with the most zeros to find the determinant of [34−200−5−123]\begin{bmatrix} 3 & 4 & -2 \\ 0 & 0 & -5 \\ -1 & 2 & 3 \end{bmatrix}.

Expand along Row 2, and check the checkerboard sign for the third spot in that row before multiplying by −5\pivot{-5}.

Expand along Row 2, [0,0,−5][0, 0, -5], where the checkerboard signs are −,+,−\front{-}, \front{+}, \front{-}. The first two terms are 00, and the third term combines the checkerboard −\front{-} with −5\pivot{-5} (forgetting the checkerboard minus sign leaves −5\pivot{-5} in front and gives −50-50):
det⁡[34−200−5−123]=−(−5)det⁡[34−12]=5(3(2)−4(−1))=5×10=50\displaystyle \begin{aligned} &\det \begin{bmatrix} 3 & 4 & -2 \\ 0 & 0 & -5 \\ -1 & 2 & 3 \end{bmatrix} \\ &\quad = \front{-}\pivot{(-5)} \det \begin{bmatrix} 3 & 4 \\ -1 & 2 \end{bmatrix} \\ &\quad = 5(3(2) - 4(-1)) \\ &\quad = 5 \times 10 = 50 \end{aligned}
5

Use cofactor expansion to find the determinant of [x202x1031]\begin{bmatrix} x & 2 & 0 \\ 2 & x & 1 \\ 0 & 3 & 1 \end{bmatrix} in terms of xx, and find the values of xx for which the determinant equals 00.

Expand along Row 1, where the 00 at the end drops out, to write the determinant as a quadratic in xx.

Expanding along Row 1 with checkerboard signs +,−,+\front{+}, \front{-}, \front{+} (remember the minus sign on the middle term, since writing +2\front{+}\pivot{2} instead of −2\front{-}\pivot{2} gives x2−3x+4x^2 - 3x + 4, which does not factor):
det⁡[x202x1031]=+xdet⁡[x131]−2det⁡[2101]+0=x(x−3)−2(2)=x2−3x−4\displaystyle \begin{aligned} &\det \begin{bmatrix} x & 2 & 0 \\ 2 & x & 1 \\ 0 & 3 & 1 \end{bmatrix} \\ &\quad = \front{+}\pivot{x} \det \begin{bmatrix} x & 1 \\ 3 & 1 \end{bmatrix} \\ &\qquad \front{-} \pivot{2} \det \begin{bmatrix} 2 & 1 \\ 0 & 1 \end{bmatrix} + 0 \\ &\quad = \pivot{x}(x - 3) \front{-} \pivot{2}(2) \\ &\quad = x^2 - 3x - 4 \end{aligned}
Setting x2−3x−4=(x−4)(x+1)=0x^2 - 3x - 4 = (x - 4)(x + 1) = 0 gives x=4x = 4 or x=−1x = -1.
6

Combine row or column operations with cofactor expansion to find the determinant of [2130121103−10−1122]\begin{bmatrix} 2 & 1 & 3 & 0 \\ 1 & 2 & 1 & 1 \\ 0 & 3 & -1 & 0 \\ -1 & 1 & 2 & 2 \end{bmatrix}.

Column 4 already has two zeros, so use the 1\pivot{1} in Row 2, Column 4 to eliminate the 22 at the bottom of Column 4 before expanding.

Subtract 2R2\operation{2R_2} from R4\operation{R_4} so Row 4 becomes [−3,−3,0,0][-3, -3, 0, 0] and Column 4 has three zeros:
det⁡[2130121103−10−1122]=det⁡[2130121103−10−3−300]\displaystyle \det \begin{bmatrix} 2 & 1 & 3 & 0 \\ 1 & 2 & 1 & \pivot{1} \\ 0 & 3 & -1 & 0 \\ -1 & 1 & 2 & 2 \end{bmatrix} = \det \begin{bmatrix} 2 & 1 & 3 & 0 \\ 1 & 2 & 1 & \pivot{1} \\ 0 & 3 & -1 & 0 \\ -3 & -3 & 0 & 0 \end{bmatrix}
Expanding down Column 4 at the 1\pivot{1} in Row 2, Column 4, where the 4×44 \times 4 checkerboard sign is +\front{+} (Row 2 goes −,+,−,+\front{-}, \front{+}, \front{-}, \front{+}; using −\front{-} here flips the final answer to −24-24), leaves:
=+1det⁡[21303−1−3−30]\displaystyle = \front{+}\pivot{1} \det \begin{bmatrix} 2 & 1 & 3 \\ 0 & 3 & -1 \\ -3 & -3 & 0 \end{bmatrix}
Expanding that 3×33 \times 3 determinant along Row 3, [−3,−3,0][-3, -3, 0], with 3×33 \times 3 checkerboard signs +,−,+\front{+}, \front{-}, \front{+} (watch the checkerboard minus on the middle −3\pivot{-3}, since missing it turns −6-6 into +6+6 and gives 3636):
=−3(−1−9)−(−3)(−2−0)+0\displaystyle = \pivot{-3}(-1 - 9) \front{-} \pivot{(-3)}(-2 - 0) + 0 =30−6\displaystyle = 30 - 6 =24\displaystyle = 24