How to Find the Determinant of a Matrix (2x2 and 3x3)

The determinant is one number that tells you how much a matrix stretches area or volume, and whether it flips things inside out. Here's how to compute it for 2x2 and 3x3 matrices, and why the formula isn't as arbitrary as it looks.

By Petrus Sheya

August 10, 2026 · 5 min read

You've got a matrix. Someone asks for its determinant. You can probably remember the formula, ad minus bc, but what does that number actually tell you? Why does a whole branch of linear algebra care about it so much?

Here's the short version: a matrix takes shapes and stretches them. The determinant is the one number that tells you how much bigger (or smaller, or flipped) those shapes get. Once you see it that way, the formulas stop feeling like something to memorize.


A matrix is a machine that grabs a square and stretches it

Picture the unit square: the little square with corners at (0,0)(0,0), (1,0)(1,0), (1,1)(1,1), and (0,1)(0,1). Now feed it into a matrix. The matrix grabs that square by its two edge vectors and drags them somewhere else, turning the square into a parallelogram.

Sometimes the parallelogram is bigger than the original square. Sometimes it's smaller. Sometimes the matrix even flips it over, like a photo mirrored left to right. The determinant is the readout on that stretching machine: it tells you the area multiplier, and its sign tells you whether a flip happened.

That's the whole idea for a 2x2 matrix. Everything else is just working out how to calculate that multiplier from the numbers in the grid.


The determinant of a 2x2 matrix is just signed area

Take a matrix with columns v1v_1 and v2v_2. Those two columns are exactly the two vectors that used to be the square's edges. Once you feed the square through the matrix, its edges become v1v_1 and v2v_2, and the square itself becomes the parallelogram they span.

A=[abcd],v1=[ac],v2=[bd]A = \begin{bmatrix} a & b \\ c & d \end{bmatrix}, \quad v_1 = \begin{bmatrix} a \\ c \end{bmatrix}, \quad v_2 = \begin{bmatrix} b \\ d \end{bmatrix}

The area of that parallelogram, with a sign attached, is the determinant.

Drag the teal vector. The gold vector stays put. Watch the parallelogram they form.

v1v2

det = v1.x · v2.y − v1.y · v2.x = 4×31×1 = 11

Area of parallelogram11
Orientationunflipped

Drag the teal vector around. Notice that when it swings past the gold one, the parallelogram flips color. That's the sign changing. Notice also that when the two vectors line up, the parallelogram collapses into a flat line and the area drops to zero. A determinant of zero means the matrix squashed the square down to nothing. Hold onto that idea, it comes back later.


The "ad minus bc" trick isn't arbitrary

So how do you turn two vectors into a signed area without dragging out a protractor? There's a clean formula for it.

det(A)=adbc\det(A) = ad - bc

You take the product of the main diagonal, then subtract the product of the other diagonal. It looks like a memorized rule, but it's really just the shoelace formula for a parallelogram's area, simplified down to two terms because a parallelogram only has four corners.

Hover ad or bc below to see which diagonal it comes from. Slide a to see the whole thing move.

52-13[]det = (5 × 3) − (2 × -1) = 15-2 = 17
ad (main diagonal)15
bc (other diagonal)-2
det = ad − bc17

Hover "ad" and you'll see the diagonal it comes from light up gold. Hover "bc" and the other diagonal lights up teal. Slide aa back and forth and watch how directly it moves the final answer, since aa only ever shows up in that one multiplication. Once you can see the two diagonals, the formula writes itself.


3x3 determinants look scary. They're the same idea, expanded.

A 3x3 matrix doesn't have a two-diagonal shortcut. But the underlying question is identical: if this matrix grabs the unit cube by its three edge vectors, how much does the cube's volume change?

The standard way to compute it is called cofactor expansion. Pick a row, usually the top one. For each entry in that row, cross out its row and column. What's left is a 2x2 minor, and you already know how to find its determinant.

det(M)=a(eifh)b(difg)+c(dheg)\det(M) = a(ei - fh) - b(di - fg) + c(dh - eg)

for

M=[abcdefghi]M = \begin{bmatrix} a & b & c \\ d & e & f \\ g & h & i \end{bmatrix}

Notice the alternating signs: plus, minus, plus. That's not decoration, it's a checkerboard pattern that keeps the signed-area logic consistent as you expand into a third dimension.

Click a top-row entry, or hit play, to watch its sign, its minor, and its term appear.

M (expand along top row)2-1304152-2minor (delete row 1, col 1)

Term 1 of 3

Sign for this position+
det(M)-85

Click each entry along the top row, or hit play and let it run. Watch which four numbers get boxed off as the minor each time, and notice the sign flips right in the middle, on the bb term. Three small 2x2 determinants, each multiplied by a number and a sign, added together. That's the entire method.


Zero determinant means the matrix flattened space

Here's the payoff, and it's the same idea from the 2x2 case scaled up. For a 3x3 matrix, the determinant is the signed volume of the parallelepiped, the tilted box, formed by its three column vectors.

det(v1,v2,v3)=v1(v2×v3)\det(v_1, v_2, v_3) = v_1 \cdot (v_2 \times v_3)

Slide the rose vector's height. Watch the box flatten into a pancake right as det hits zero.

v1v2v3
det(v1, v2, v3)18
Volume18

Slide the height of the rose vector down toward zero. Watch the box lose its third dimension and flatten into a plain parallelogram sitting on the floor. Right at that moment, the determinant hits exactly zero too.

That's not a coincidence. A box with zero height has zero volume. And a matrix whose determinant is zero is a matrix that's flattened 3D space down into a plane, a line, or a point, throwing away a dimension in the process. That's why a zero determinant means the matrix can't be undone: once you've flattened something, there's no way to un-flatten it and recover what was lost. Mathematicians call a matrix like that singular.


The short version

The determinant of a matrix is the signed factor by which it scales area (in 2D) or volume (in 3D). For a 2x2 matrix, you get it from adbcad - bc, the product of one diagonal minus the product of the other. For a 3x3 matrix, you expand along a row, multiplying each entry by a signed 2x2 minor and adding the results. A positive determinant means the shape stayed right-side up while it grew or shrank. A negative one means it got flipped. And a determinant of exactly zero means the matrix squeezed everything into a lower dimension, with no way back.

None of it is arbitrary. It's area and volume, tracked carefully, one dimension at a time.


All visualizations are interactive React components running entirely in your browser. The animated stepper uses requestAnimationFrame for timing. No libraries beyond React.