a
b
c
d
x
y
z
AC
i
Randomize
Formula for the determinant of a 3×3 matrix
Write the rows of the matrix as (a, b, c), (d, e, f) and (g, h, i). Expanding along the first row gives
det(A) = a·(e·i − f·h) − b·(d·i − f·g) + c·(d·h − e·g)
Each bracket is the determinant of the 2×2 matrix that remains after you delete the row and the column of the entry in front of it. The signs alternate plus, minus, plus. Multiplying everything out gives six products of three entries each, three with a plus sign and three with a minus sign. The Sarrus rule is a way of reading those six products straight off the diagonals.
Worked example
Take the matrix with rows (2, −1, 3), (0, 4, 1) and (5, 2, −2) and expand along the first row.
The minor of 2 is 4·(−2) − 1·2 = −10. The minor of −1 is 0·(−2) − 1·5 = −5. The minor of 3 is 0·2 − 4·5 = −20.
Now apply the alternating signs: det(A) = 2·(−10) − (−1)·(−5) + 3·(−20) = −20 − 5 − 60 = −85.
Which method to use for a 3×3 matrix
Cofactor expansion works along any row or column, so pick the one with the most zeros. In the example the second row starts with a zero, and expanding along it would need only two minors instead of three.
The Sarrus rule is the quickest by hand when the entries are small integers, but it works only for 3×3 matrices. Row reduction to triangular form is the better habit if you will go on to 4×4 and larger matrices, because the other two methods grow much faster.
The calculator above is set to 3×3. It uses expansion along a row or column by default, and you can switch the method to Sarrus, triangular form or Bareiss in the method menu.