Skip to main content

How to Find the Determinant of a Matrix

Written by Awn · Published · 7 min read

Quick Answer

Here is how to find the determinant of a matrix. For a 2 by 2 matrix, compute ad minus bc. For a 3 by 3, multiply each top-row entry by the 2 by 2 determinant left after crossing out its row and column. Then combine them with signs plus, minus, plus.

What Is the Determinant of a Matrix?

A determinant is one number worked out from a square matrix. It is written det⁡(A)\det(A) or with straight bars. It tells you two useful things: whether the matrix has an inverse (only if the determinant is not zero), and how much the matrix stretches area or volume.

How to Find the Determinant Step by Step

  1. Check that the matrix is square.
  2. For 2×2, use ad−bcad-bc.
  3. For 3×3 or larger, choose the row or column with the most zeros.
  4. Multiply each entry by its smaller determinant.
  5. Apply the plus and minus sign pattern.
  6. Add everything up.

The determinant calculator shows these steps for matrices up to 4×4.

Determinant of a 2x2 Matrix

∣abcd∣=ad−bc\begin{vmatrix}a&b\\c&d\end{vmatrix}=ad-bc

In words: multiply the main diagonal, then subtract the product of the other diagonal.

For ∣4325∣\begin{vmatrix}4&3\\2&5\end{vmatrix}: 4⋅5−3⋅2=20−6=144\cdot 5-3\cdot 2=20-6=14.

How to find the determinant of a 2 by 2 matrix by multiplying the diagonals

Determinant of a 3x3 Matrix

The Cofactor Way

Cross out the row and column of an entry. The 2×2 determinant that is left is its minor. The minor with its sign is the cofactor.

Find ∣123041215∣\begin{vmatrix}1&2&3\\0&4&1\\2&1&5\end{vmatrix} along the top row.

  1. For 1: +1(4⋅5−1⋅1)=19+1(4\cdot 5-1\cdot 1)=19.
  2. For 2: −2(0⋅5−1⋅2)=4-2(0\cdot 5-1\cdot 2)=4.
  3. For 3: +3(0⋅1−4⋅2)=−24+3(0\cdot 1-4\cdot 2)=-24.
  4. Add: 19+4−24=−119+4-24=-1.

How to find the determinant of a 3 by 3 matrix by cofactors, step by step

The Diagonal Way

This shortcut is called the rule of Sarrus. Copy the first two columns to the right of the matrix. Add the products of the three diagonals going down. Subtract the products of the three going up.

For the same matrix: down gives 1⋅4⋅5+2⋅1⋅2+3⋅0⋅1=241\cdot 4\cdot 5+2\cdot 1\cdot 2+3\cdot 0\cdot 1=24. Up gives 2⋅4⋅3+1⋅1⋅1+5⋅0⋅2=252\cdot 4\cdot 3+1\cdot 1\cdot 1+5\cdot 0\cdot 2=25. Then 24−25=−124-25=-1. This works only for 3×3.

How to Find the Determinant of a 4x4 Matrix

Expand into 3×3 determinants, or use row operations. Three facts make row operations work:

Row operationEffect on the determinant
Swap two rowsChanges its sign
Multiply a row by kkMultiplies it by kk
Add a multiple of one row to anotherNo change

Make zeros below the diagonal. Then multiply the diagonal entries.

Which Method Should You Use?

MatrixMethod
2×2ad−bcad-bc
3×3Cofactors or diagonals
Many zerosCofactors along the zeros
4×4 and upRow operations
Triangle of zerosMultiply the diagonal

What the Number Means

Take the 2×2 matrix with rows 4, 34,\,3 and 2, 52,\,5. Draw its rows as two arrows from the origin, one to (4,3)(4,3) and one to (2,5)(2,5). They form two sides of a slanted box called a parallelogram. Its area is 14, the same as the determinant.

So the size of a determinant is an area. For a 3×3 matrix, it is a volume.

  • A determinant of 0 means the box is flat. The arrows lie on one line, so the matrix squashes everything and can't be undone. It has no inverse.
  • A negative determinant means the arrows are in the opposite order. The area is still the positive size of the number.
  • A determinant of 1 means the area does not change.

This picture explains two of the row rules. Doubling a row doubles one side of the box, so the area doubles. Swapping rows changes the order of the arrows, so the sign flips.

Properties That Save Work

FactWhat it lets you do
det⁡(AB)=det⁡(A)det⁡(B)\det(AB)=\det(A)\det(B)Multiply two numbers, not two matrices
det⁡(AT)=det⁡(A)\det(A^T)=\det(A)Use columns in place of rows
det⁡(A−1)=1det⁡(A)\det(A^{-1})=\frac{1}{\det(A)}Skip finding the inverse
det⁡(kA)=kndet⁡(A)\det(kA)=k^n\det(A) for an n×nn\times n matrixTake out a common number

For example, the matrix with rows 4, 34,\,3 and 2, 52,\,5 has determinant 14. If every entry is tripled, the new determinant is 32⋅14=1263^2\cdot 14=126, not 42. Each of the two rows was tripled.

Worked Examples

Example 1: Row Operations

Find ∣121253134∣\begin{vmatrix}1&2&1\\2&5&3\\1&3&4\end{vmatrix}.

  1. Row 2 minus 2 times row 1: 0, 1, 10,\,1,\,1.
  2. Row 3 minus row 1: 0, 1, 30,\,1,\,3.
  3. New row 3 minus new row 2: 0, 0, 20,\,0,\,2.
  4. Multiply the diagonal: 1⋅1⋅2=21\cdot 1\cdot 2=2.

Example 2: A 4×4 With Zeros

Find ∣1002031020100101∣\begin{vmatrix}1&0&0&2\\0&3&1&0\\2&0&1&0\\0&1&0&1\end{vmatrix}.

  1. Expand along the top row. Only 1 and 2 matter. Their signs are plus and minus.
  2. For 1: ∣310010101∣=3\begin{vmatrix}3&1&0\\0&1&0\\1&0&1\end{vmatrix}=3, so this part is 1⋅3=31\cdot 3=3.
  3. For 2: ∣031201010∣=2\begin{vmatrix}0&3&1\\2&0&1\\0&1&0\end{vmatrix}=2, so this part is −2⋅2=−4-2\cdot 2=-4.
  4. Add: 3−4=−13-4=-1.

Example 3: Using a Column With Zeros

Find ∣201304567∣\begin{vmatrix}2&0&1\\3&0&4\\5&6&7\end{vmatrix}.

  1. The middle column has two zeros, so expand along it. Only the 6 counts.
  2. The 6 is in row 3, column 2. Since 3+2=53+2=5 is odd, its sign is minus.
  3. Cross out its row and column: ∣2134∣=8−3=5\begin{vmatrix}2&1\\3&4\end{vmatrix}=8-3=5.
  4. The answer is −6⋅5=−30-6\cdot 5=-30.

Expanding along the top row would also work, but it needs more multiplying.

Example 4: Finding an Unknown

For which kk is ∣k346∣=0\begin{vmatrix}k&3\\4&6\end{vmatrix}=0?

  1. The determinant is 6k−126k-12.
  2. Set it equal to zero: 6k=126k=12, so k=2k=2.

With k=2k=2, the first row is 2, 32,\,3 and the second is 4, 64,\,6. The second is double the first, which is why the determinant is zero.

How to Remember the Sign Pattern

Signs form a checkerboard that starts with plus in the top left corner:

∣+−+−+−+−+∣\begin{vmatrix}+&-&+\\-&+&-\\+&-&+\end{vmatrix}

For any entry, add its row number and its column number. If the sum is even, the sign is plus. If it is odd, the sign is minus. This works for every size.

The pattern sign is separate from the sign of the entry. If the entry is −4-4 and the pattern sign is minus, the two make +4+4.

Example 5: A Row Built From Other Rows

Find ∣123456579∣\begin{vmatrix}1&2&3\\4&5&6\\5&7&9\end{vmatrix}.

Row 3 is row 1 plus row 2. Subtract both from row 3 and it becomes all zeros, so the determinant is 0. Looking for a pattern like this before you start can save a page of work.

Common Mistakes

Missing the Minus in the Middle

In a 3×3 expansion along the top row, the second part is always subtracted, whatever the entry's own sign is.

Using the Diagonal Shortcut on a 4×4 Matrix

The rule of Sarrus fails for anything other than 3×3.

Confusing Straight Bars With Square Brackets

Straight bars mean the determinant, which is one number. Square brackets mean the matrix itself, which is a table.

Trying a Matrix That Is Not Square

A 2×3 matrix has no determinant. The number of rows and columns must match.

Practice Problems

  1. Find ∣7231∣\begin{vmatrix}7&2\\3&1\end{vmatrix}.
  2. Find ∣6−34−2∣\begin{vmatrix}6&-3\\4&-2\end{vmatrix}.
  3. Find ∣200530174∣\begin{vmatrix}2&0&0\\5&3&0\\1&7&4\end{vmatrix}.
  4. Find ∣121302114∣\begin{vmatrix}1&2&1\\3&0&2\\1&1&4\end{vmatrix}.
  5. Find ∣012345678∣\begin{vmatrix}0&1&2\\3&4&5\\6&7&8\end{vmatrix}.
Show the answers
  1. 11
  2. 00
  3. 2424
  4. −19-19
  5. 00

Check Your Answer With the Determinant Calculator

Expand along a different row. You should get the same number. Then compare with the matrix determinant calculator. To see what determinants are for, read how to solve systems of equations. Further reading: Determinant in Wolfram MathWorld and Cramer's Rule in OpenStax.

FAQ

What Is the Formula for a Determinant?

For 2×2 it is ad−bcad-bc. For 3×3 it is a(ei−fh)−b(di−fg)+c(dh−eg)a(ei-fh)-b(di-fg)+c(dh-eg). Larger ones repeat the same idea.

What Is a Minor and a Cofactor?

A minor is the determinant left after you cross out one row and one column. A cofactor is the minor with its plus or minus sign.

Is the Determinant of a 1x1 Matrix Just the Number?

Yes. The determinant of [5][5] is 5, and the determinant of [−5][-5] is −5-5.

How Do You Know If a Determinant Is Zero?

It is zero if one row is all zeros, if two rows are equal, or if one row can be built from the others.

Does the Order of Rows Matter?

Yes. Each swap of two rows changes the sign of the determinant.

What Are the Three Main Uses of Determinants?

They test whether a matrix has an inverse, they solve linear systems with Cramer's rule, and they measure area and volume.


Next step: do one 3×3 both ways, with cofactors and with diagonals. If the two agree, you know how to find the determinant with confidence.

Try the Calculator

Related Pages