MatrixStep

Guides6 min

How to Compute a 3×3 Determinant: Cofactor Expansion and the Rule of Sarrus

A 3×3 determinant can be broken into three 2×2 determinants by cofactor expansion. This guide computes the same determinant three ways: cofactor expansion, the rule of Sarrus, and row reduction.

What is a determinant?

The determinant assigns a single number to a square matrix. Geometrically it tells how much the matrix scales area (2×2) or volume (3×3). If the determinant is 0, the matrix has no inverse.

Keep the 2×2 determinant in mind; it is used over and over in the 3×3 computation.

det [[a, b], [c, d]] = ad − bc

The cofactor expansion rule

Pick a row (or column). Multiply each entry of that row by its minor and add the results with alternating signs. The minor Mᵢⱼ of the entry aᵢⱼ is the determinant of the matrix left after deleting row i and column j.

The signs follow a checkerboard pattern. The top-left is +, and the sign flips with every step.

+−+−+−+−+

Expanding along row 1 gives:

det(A) = a₁₁M₁₁ − a₁₂M₁₂ + a₁₃M₁₃

Example: expanding along row 1

A =2−10132014

The entries of row 1 are 2, −1, 0. First find the minor for each.

M₁₁ =32143·4 − 2·1 = 10
M₁₂ =12041·4 − 2·0 = 4
M₁₃ =13011·1 − 3·0 = 1

Now attach the signs and add.

det(A) = 2·10 − (−1)·4 + 0·1 = 24

The third entry of row 1 is 0, so the third term is 0 without computing its minor. Expanding along a row or column with many zeros saves work.

Any row or column gives the same answer

Column 1 has a zero at the bottom. Expanding along column 1 makes a₃₁M₃₁ vanish, leaving two terms with signs +, −, +.

det(A) = 2·10 − 1·M₂₁ + 0·M₃₁, M₂₁ = (−1)·4 − 0·1 = −4
det(A) = 2·10 − 1·(−4) = 24

Same value as the row-1 expansion. Every row and column gives the same result, so choose whichever is easiest.

The rule of Sarrus

This shortcut works only for 3×3 matrices. Add the products of the three diagonals running down to the right, and subtract the products of the three diagonals running down to the left.

Down-right: 2·3·4 + (−1)·2·0 + 0·1·1 = 24
Down-left: 0·3·0 + 2·2·1 + (−1)·1·4 = 0
det(A) = 24 − 0 = 24

Sarrus does not extend to 4×4 or larger. Cofactor expansion works for any size, so it is worth knowing both.

Row reduction

For 4×4 and larger, row-reducing to an upper triangular matrix is usually the most practical method. Once everything below the diagonal is 0, the determinant is the product of the diagonal entries. Here is the same matrix again.

  1. 01
    Row-reduce to an upper triangular matrix.
    2−10132014
  2. 02
    Clear the entries below the pivot in column 1. This does not change the determinant.
    R₂ ← R₂ − (1/2)R₁
    2−100722014
  3. 03
    Clear the entries below the pivot in column 2. This does not change the determinant.
    R₃ ← R₃ − (2/7)R₂
    2−10072200247

The diagonal product is 2 · 7/2 · 24/7 = 24. No rows were swapped, so the sign is unchanged. All three methods agree.

Properties of the determinant

Common mistakes

FAQ

What does a negative determinant mean?

The transformation reverses orientation. The absolute value still tells how much area or volume is scaled.

Do rectangular matrices have a determinant?

No. The determinant is defined only for square matrices.

I have the determinant. How do I get the inverse?

See the Gauss-Jordan elimination guide for a step-by-step method.

Related guides