Matrices

Determinant of a 3×3 Matrix

The determinant of a 3×3 matrix with rows (a,b,c)(a,b,c), (d,e,f)(d,e,f), (g,h,i)(g,h,i) is a(ei−fh)−b(di−fg)+c(dh−eg)a(ei-fh)-b(di-fg)+c(dh-eg). It is three 2×2 determinants, each scaled by an entry from the top row, with signs +,−,++,-,+.

det⁡(abcdefghi)=a(ei−fh)−b(di−fg)+c(dh−eg)\det\begin{pmatrix}a&b&c\\d&e&f\\g&h&i\end{pmatrix}=a(ei-fh)-b(di-fg)+c(dh-eg)

Try it with your numbers

Show every step

If the 2×2 version feels shaky, the determinant of a 2×2 matrix takes two minutes to review. Below you get the cofactor method, the Rule of Sarrus and a row-operation method, plus the idea behind them and checks that catch errors before they cost points.

How do you find the determinant of a 3×3 matrix?

Write the matrix as AA with entries aa through ii, reading across the rows. Then:

det⁡A=∣abcdefghi∣=a∣efhi∣−b∣dfgi∣+c∣degh∣\det A=\begin{vmatrix}a&b&c\\d&e&f\\g&h&i\end{vmatrix}=a\begin{vmatrix}e&f\\h&i\end{vmatrix}-b\begin{vmatrix}d&f\\g&i\end{vmatrix}+c\begin{vmatrix}d&e\\g&h\end{vmatrix}

This is called cofactor expansion along row 1. Each 2×2 determinant (a minor) is what remains after you cross out the row and column of the entry in front of it.

  1. Take the first entry of row 1 and cross out its row and column.
  2. Find the 2×2 determinant of what is left and multiply it by that entry.
  3. Repeat for the second and third entries.
  4. Combine with signs +,−,++,-,+ and simplify.

The trap that costs the most points is the middle sign. The minus belongs to the position of bb, not to the number itself. If bb is negative, −b-b becomes positive, and a careless “minus times minus” is where most wrong answers start. Treat every 2×2 product as its own bracket, and apply the habits from order of operations practice before combining anything.

Example 1. Find det⁡A\det A for

A=(2130−14521)A=\begin{pmatrix}2&1&3\\0&-1&4\\5&2&1\end{pmatrix}

det⁡A=2((−1)(1)−(4)(2))−1((0)(1)−(4)(5))+3((0)(2)−(−1)(5))\det A=2\big((-1)(1)-(4)(2)\big)-1\big((0)(1)-(4)(5)\big)+3\big((0)(2)-(-1)(5)\big)

=2(−9)−1(−20)+3(5)=−18+20+15=17=2(-9)-1(-20)+3(5)=-18+20+15=17

The answer is 1717. The same matrix appears again in the Sarrus section, where a different method confirms it.

Quick check

Find the determinant of (120031201)\begin{pmatrix}1&2&0\\0&3&1\\2&0&1\end{pmatrix}.

Why the 3×3 determinant formula works

Think of the three rows as vectors u\mathbf{u}, v\mathbf{v}, w\mathbf{w} in space. The determinant is the signed volume of the box (parallelepiped) they span. In vector language it is u⋅(v×w)\mathbf{u}\cdot(\mathbf{v}\times\mathbf{w}), the scalar triple product.

The cross product of rows 2 and 3 is (ei−fh, fg−di, dh−eg)(ei-fh,\ fg-di,\ dh-eg). Dot it with (a,b,c)(a,b,c) and you get a(ei−fh)+b(fg−di)+c(dh−eg)a(ei-fh)+b(fg-di)+c(dh-eg). The middle component is fg−difg-di, which is the reverse of di−fgdi-fg. That flip is the origin of the mysterious minus sign.

The formula is also forced by three rules. The determinant is linear in each row, it becomes 00 if two rows match, and the identity matrix has determinant 11 (the unit cube has volume 1). Those rules leave exactly one possible formula.

Multiply it out and six terms appear, because a 3×3 matrix has 3!=63!=6 ways to pick one entry from each row and each column:

det⁡A=aei+bfg+cdh−ceg−afh−bdi\det A=aei+bfg+cdh-ceg-afh-bdi

The three “wrap-around” diagonals are positive and the three reversed ones are negative. That pattern is what the next shortcut exploits.

Rule of Sarrus: the shortcut and where it breaks

Tile diagram showing Sarrus finds 8 of 24 determinant terms for a 4×4 matrix
The diagonal trick covers every term of a 3×3 determinant but misses 16 of the 24 terms in a 4×4.

Copy the first two columns to the right of the matrix. Add the products along the three diagonals running down and to the right, then subtract the products along the three diagonals running up and to the right. It produces the same six terms as above, with no 2×2 determinants at all.

Check it on Example 1. The down-right diagonals give 2(−1)(1)+1(4)(5)+3(0)(2)=−2+20+0=182(-1)(1)+1(4)(5)+3(0)(2)=-2+20+0=18. The up-right diagonals give 3(−1)(5)+2(4)(2)+1(0)(1)=−15+16+0=13(-1)(5)+2(4)(2)+1(0)(1)=-15+16+0=1. Then 18−1=1718-1=17, matching the cofactor result.

Sarrus stops at 3×3

A 4×4 determinant has 4!=244!=24 terms, but the diagonal trick finds only 8 of them. Applying it to a 4×4 matrix gives a confident, wrong answer.

Sarrus is fastest when the numbers are small and you want a second opinion. It is slower when entries are fractions or variables, because you hold six triple products in your head at once. In those cases, cofactor expansion on a row with zeros is safer. Using Sarrus on one pass and cofactors on another makes an excellent self-check, since the two methods share no intermediate steps.

Expand along the row or column with the most zeros

Row 1 is not special. Expansion along any row or any column gives the same determinant, as long as you use the right signs. The sign of the entry in row ii, column jj is (−1)i+j(-1)^{i+j}, which makes a checkerboard:

++ −- ++
−- ++ −-
++ −- ++

A zero entry kills its whole term, so choose the line with the most zeros. This is the single biggest time saver for hand calculation, and the step most students skip because row 1 is what the formula shows.

Example 2. Find det⁡B\det B for

B=(302150−204)B=\begin{pmatrix}3&0&2\\1&5&0\\-2&0&4\end{pmatrix}

Column 2 has two zeros. Only the entry 55 survives, in row 2, column 2, where the sign is ++. Crossing out row 2 and column 2 leaves (32−24)\begin{pmatrix}3&2\\-2&4\end{pmatrix}.

det⁡B=5(3⋅4−2⋅(−2))=5(12+4)=80\det B=5\big(3\cdot 4-2\cdot(-2)\big)=5(12+4)=80

A one-term calculation replaced a three-term one.

Try this: Take matrix BB from Example 2 and expand along row 3 instead. The entries are −2,0,4-2,0,4 with signs +,−,++,-,+. You should land on 8080 again.

Determinant of a 3×3 matrix with negatives and fractions

Negatives are manageable if you build the habit of writing a product in brackets before simplifying: −(−3)(2)-(-3)(2) should never be done mentally in one step. Fractions are the bigger source of arithmetic errors, and there is a clean way around them. Factoring a number kk out of one row multiplies the determinant by kk, so you can clear denominators first and correct at the end.

Example 3. Find the determinant of

C=(121023−1406)C=\begin{pmatrix}\tfrac12&1&0\\2&3&-1\\4&0&6\end{pmatrix}

Pull 12\tfrac12 out of row 1, which turns it into (1,2,0)(1,2,0):

det⁡C=12∣12023−1406∣=12[1(18−0)−2(12+4)+0]=12(18−32)=12(−14)=−7\det C=\tfrac12\begin{vmatrix}1&2&0\\2&3&-1\\4&0&6\end{vmatrix}=\tfrac12\Big[1(18-0)-2(12+4)+0\Big]=\tfrac12(18-32)=\tfrac12(-14)=-7

Check by expanding the original directly: 12(18−0)−1(12+4)+0=9−16=−7\tfrac12(18-0)-1(12+4)+0=9-16=-7. Both routes agree.

Entries can also be variables. The determinant then becomes a polynomial in that variable, and setting it equal to zero is a standard question. For example,

∣x101x1011∣=x(x−1)−1(1)=x2−x−1\begin{vmatrix}x&1&0\\1&x&1\\0&1&1\end{vmatrix}=x(x-1)-1(1)=x^2-x-1

Solving x2−x−1=0x^2-x-1=0 gives x=1±52x=\frac{1\pm\sqrt5}{2}. If the quadratic formula feels rusty, the quadratic formula practice problems are a good warm-up.

Row operations: the fastest way to a 3×3 determinant

When the numbers are ugly and no row has zeros, create zeros yourself. Three rules govern what each row operation does to the determinant:

  • Swapping two rows multiplies the determinant by −1-1.
  • Multiplying one row by kk multiplies the determinant by kk.
  • Adding a multiple of one row to another changes nothing.

The third rule is the workhorse. Use it to clear everything below the first entry, then the determinant is the product of the diagonal, provided you track any swaps.

Example 4. Find the determinant of

D=(1232543710)D=\begin{pmatrix}1&2&3\\2&5&4\\3&7&10\end{pmatrix}

Replace R2R_2 with R2−2R1R_2-2R_1 and R3R_3 with R3−3R1R_3-3R_1. Neither changes the determinant:

(12301−2011)\begin{pmatrix}1&2&3\\0&1&-2\\0&1&1\end{pmatrix}

Now replace R3R_3 with R3−R2R_3-R_2 to get (12301−2003)\begin{pmatrix}1&2&3\\0&1&-2\\0&0&3\end{pmatrix}. The determinant is 1⋅1⋅3=31\cdot1\cdot3=3. A direct cofactor check gives 1(50−28)−2(20−12)+3(14−15)=22−16−3=31(50-28)-2(20-12)+3(14-15)=22-16-3=3.

This is also how calculators and software compute determinants, and it is the only practical method once matrices grow past 4×4.

Quick check

A matrix has determinant 55. You swap two rows, then add 33 times row 1 to row 3. What is the new determinant?

What does a 3×3 determinant of zero mean?

Rows of the matrix 1 to 9 showing row 3 equals twice row 2 minus row 1
Row 3 is built from rows 1 and 2, so the box they span is flat and the determinant is 0.

A zero determinant means the matrix is singular. Its rows are linearly dependent, so one row can be built from the others, and the box they span has been flattened to zero volume. Practically, three consequences follow: the matrix has no inverse, a system of equations with this coefficient matrix has no single solution, and the transformation squashes space onto a plane or line.

Here is a case that looks innocent:

∣123456789∣=1(45−48)−2(36−42)+3(32−35)=−3+12−9=0\begin{vmatrix}1&2&3\\4&5&6\\7&8&9\end{vmatrix}=1(45-48)-2(36-42)+3(32-35)=-3+12-9=0

Look at why: row 3 equals 2⋅row 2−row 12\cdot\text{row }2-\text{row }1. Every row is an arithmetic sequence with common difference 11, and rows built from sequences like this always collapse. The arithmetic series formula is built on the same evenly spaced pattern.

Invertibility is the reason this matters. The inverse of a matrix divides by its determinant, just as the inverse of a 2×2 matrix divides by ad−bcad-bc. When the determinant is 00, that division is impossible. A tiny determinant, such as 0.00010.0001, is not singular but is a warning that the matrix is nearly flat and answers will be sensitive to rounding.

Quick check

Does (246123501)\begin{pmatrix}2&4&6\\1&2&3\\5&0&1\end{pmatrix} have an inverse?

How to check a 3×3 determinant before you submit

Three checks take under a minute and catch nearly every mistake. First, compute with two different methods, such as cofactors along a row and Sarrus, or two different rows. Second, test a property: transposing the matrix leaves the determinant unchanged, so a column expansion must match the row expansion. Third, look for a hidden zero: two equal rows, a row that is a multiple of another, or a zero row all force the answer to be 00.

The scaling trap

Multiplying a 3×3 matrix by kk scales all three rows, so det⁡(kA)=k3det⁡A\det(kA)=k^3\det A, not kdet⁡Ak\det A. For det⁡A=17\det A=17, doubling the matrix gives 23⋅17=1362^3\cdot17=136.

Two properties extend the checks. The determinant of a product is the product of determinants, det⁡(AB)=det⁡A⋅det⁡B\det(AB)=\det A\cdot\det B, which is a handy test after matrix multiplication. In contrast, addition does not behave: det⁡(A+B)\det(A+B) is generally not det⁡A+det⁡B\det A+\det B, so do not carry the idea over from adding and subtracting matrices.

Once the checks feel natural, work through the 3×3 determinant practice problems and use the solver above to test each answer with the full steps visible.

Real uses of the 3×3 determinant

The most direct use is geometry. The area of a triangle with vertices (x1,y1)(x_1,y_1), (x2,y2)(x_2,y_2), (x3,y3)(x_3,y_3) is half the absolute value of

∣x1y11x2y21x3y31∣\begin{vmatrix}x_1&y_1&1\\x_2&y_2&1\\x_3&y_3&1\end{vmatrix}

For (0,0)(0,0), (4,0)(4,0), (0,3)(0,3), expanding along row 1 leaves only the last entry: 1(4⋅3−0⋅0)=121(4\cdot3-0\cdot0)=12. The area is 12⋅12=6\tfrac12\cdot12=6, which matches the base-times-height value. If the determinant is 00, the three points are collinear, which is the same fact the slope formula tests by comparing two slopes.

In three dimensions, the same determinant gives the volume of a box or tetrahedron from edge vectors, and it appears in the cross product. In algebra, Cramer’s rule solves a 3×3 system by dividing one determinant by another: each unknown is x=det⁡(Ax)/det⁡(A)x=\det(A_x)/\det(A), where AxA_x is AA with one column replaced by the

Practice problems

0 of 5 solved

  1. Find the determinant of (100230456)\begin{pmatrix}1&0&0\\2&3&0\\4&5&6\end{pmatrix}.

  2. Find the determinant of (213102411)\begin{pmatrix}2&1&3\\1&0&2\\4&1&1\end{pmatrix}.

  3. Find the determinant of (−2314−1025−3)\begin{pmatrix}-2&3&1\\4&-1&0\\2&5&-3\end{pmatrix}.

  4. Solve det⁡(x102x101x)=0\det\begin{pmatrix}x&1&0\\2&x&1\\0&1&x\end{pmatrix}=0 for xx.

  5. A 3×33\times 3 matrix AA has det⁡A=4\det A=4. Find det⁡(−2A)\det(-2A).

Common questions

What is the formula for the determinant of a 3×3 matrix?

For rows (a,b,c)(a,b,c), (d,e,f)(d,e,f), (g,h,i)(g,h,i), the determinant is a(ei−fh)−b(di−fg)+c(dh−eg)a(ei-fh)-b(di-fg)+c(dh-eg). It is the first row entries times their 2×2 minors, with signs plus, minus, plus.

Can a determinant be negative?

Yes. The sign records orientation: swapping two rows flips it. A negative determinant means the matrix reverses orientation, and its absolute value still gives the volume scale factor.

Does the Rule of Sarrus work for 4×4 matrices?

No. Sarrus works only for 3×3 matrices. A 4×4 determinant has 24 terms, but the diagonal pattern produces only 8, so use cofactor expansion or row operations instead.

What does it mean if the determinant of a 3×3 matrix is 0?

The matrix is singular: it has no inverse, its rows (and columns) are linearly dependent, and a system with that coefficient matrix has no unique solution. Geometrically, the three row vectors lie in one plane and enclose zero volume.

Which row should you expand along?

Any row or column gives the same answer. Pick the one with the most zeros, because every zero entry removes a whole 2×2 calculation.

How do you find the determinant of a 3×3 matrix with fractions?

Factor the denominators out of each row first. Pulling a factor kk out of one row multiplies the determinant by kk, so compute the integer matrix and multiply by kk at the end.

Up next