Topic · Linear Algebra

Determinants

A single number that captures everything geometric about a square matrix: how much it stretches volumes, whether it flips orientation, and whether the transformation it encodes can be undone. The determinant is the most compressed summary of a linear map.

What you'll leave with

  • The determinant of a matrix is the signed volume-scaling factor of the linear transformation it represents.
  • For 2×2: $ad - bc$. For 3×3: cofactor expansion with alternating signs.
  • Sign tells you orientation — positive preserves it, negative flips it.
  • $\det = 0$ exactly when the matrix is singular (non-invertible) and the columns are linearly dependent.

1. The geometric meaning

Before the formula, the picture. Take a 2×2 matrix and read its columns as two vectors in the plane:

$$ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}, \quad \mathbf{u} = \begin{pmatrix} a \\ c \end{pmatrix}, \quad \mathbf{v} = \begin{pmatrix} b \\ d \end{pmatrix} $$

Those two vectors span a parallelogram. The determinant of $A$ is the signed area of that parallelogram. Not "related to" the area — literally the area, with a sign attached.

u = (3, 1) v = (1, 2) u + v Area = |det A| det A = ad − bc = 3·2 − 1·1 = 5 x y −1 1 2 3 4 5 6 4 3 2 1 −1

Push this up a dimension and the same idea works. For a 3×3 matrix, the columns are three vectors in space, and they span a parallelepiped — a skewed box. The determinant is its signed volume. Push it up further to $n \times n$, and the determinant is the signed $n$-dimensional volume of the parallelotope spanned by the columns.

Now read the matrix as a linear transformation $T(\mathbf{x}) = A\mathbf{x}$. The columns of $A$ are the images of the standard basis vectors under $T$. The unit square (in 2-D) or unit cube (in 3-D) has area or volume equal to $1$, and after $T$ acts on it, the result has area or volume equal to $|\det A|$. So:

Determinant (geometric definition)

$\det A$ is the signed factor by which the linear transformation $A$ scales $n$-dimensional volume. Apply $A$ to any region of volume $V$; the image has volume $|\det A| \cdot V$.

Why this matters

Every algebraic property of the determinant — the alternating signs, the multiplicativity $\det(AB) = \det A \cdot \det B$, the fact that swapping rows flips its sign — falls out of this single geometric idea. You can derive the formulas by remembering what they're for.

2. Computing the 2×2 determinant

This is the case to know cold. For

$$ A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} $$

the determinant is

$$ \det A = ad - bc. $$

"Diagonal product minus anti-diagonal product." Memorize the shape; the formula reads off the page.

A quick check: the identity matrix should leave area alone, so its determinant should be $1$.

$$ \det \begin{pmatrix} 1 & 0 \\ 0 & 1 \end{pmatrix} = 1 \cdot 1 - 0 \cdot 0 = 1. \checkmark $$

A matrix that doubles every vector should multiply area by $4$ (length doubles in both directions):

$$ \det \begin{pmatrix} 2 & 0 \\ 0 & 2 \end{pmatrix} = 2 \cdot 2 - 0 \cdot 0 = 4. \checkmark $$

And a matrix whose two columns are the same vector — so the "parallelogram" is a degenerate line segment of zero area — must have determinant $0$:

$$ \det \begin{pmatrix} 3 & 3 \\ 5 & 5 \end{pmatrix} = 3 \cdot 5 - 3 \cdot 5 = 0. \checkmark $$

3. Computing the 3×3 determinant

For 3×3, the formula gets longer but the structure is the same: it's the signed volume of the parallelepiped spanned by the three columns. The standard way to compute it is cofactor expansion along the first row.

Write the matrix as

$$ A = \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix}. $$

For each entry in the top row, cross out its row and column, take the determinant of the 2×2 block that remains, multiply by the entry, and attach the alternating sign $+, -, +$:

$$ \det A = 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} $$

Expanding the 2×2 determinants gives the explicit form:

$$ \det A = a(ei - fh) - b(di - fg) + c(dh - eg). $$

That alternating pattern — $+, -, +$ — is the most failure-prone piece. The middle term is subtracted; forget that minus sign and you'll silently get the wrong answer.

Going further

For general $n \times n$, the determinant is defined recursively by cofactor expansion along any row or column (with the same alternating-sign pattern, called the checkerboard of signs). For anything bigger than 3×3, no one computes by hand — row reduction or LU decomposition is far faster. The formula matters; the procedure scales poorly.

4. Sign tells you orientation

The magnitude $|\det A|$ is the volume scaling factor. The sign tells you something separate: whether the transformation preserves or reverses orientation.

"Orientation" is the handedness of your coordinate system. In 2-D it's clockwise vs. counterclockwise — go around the unit square $\mathbf{e}_1 \to \mathbf{e}_2$ and you're going counterclockwise. In 3-D it's right-hand vs. left-hand: curl your right hand's fingers from $\mathbf{e}_1$ to $\mathbf{e}_2$ and your thumb points along $\mathbf{e}_3$.

  • $\det A > 0$: $A$ preserves orientation. Rotations, scalings by positive factors, and shears all fall here.
  • $\det A < 0$: $A$ reverses orientation. Reflections always do this.

The cleanest example: reflection across the $y$-axis sends $(x, y) \mapsto (-x, y)$. Its matrix is

$$ R = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}, \qquad \det R = (-1)(1) - (0)(0) = -1. $$

Area is preserved (the magnitude is $1$), but the plane is flipped — the unit square goes from being traced counterclockwise to clockwise. That sign flip is the determinant telling you a reflection happened.

Compare with a rotation by $90°$:

$$ \det \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} = 0 \cdot 0 - (-1)(1) = +1. $$

Same magnitude, but the positive sign tells you orientation is preserved — as it should be for a rotation.

5. The zero determinant

The most useful single fact about determinants:

A square matrix is invertible if and only if its determinant is nonzero.

The geometric reason is hard to miss once you see it. $\det A = 0$ means $A$ scales volume by zero — it collapses the unit cube to something of lower dimension. In 2-D, the parallelogram flattens into a line segment (or a point). In 3-D, the parallelepiped flattens into a plane (or a line, or a point).

Once you've collapsed a dimension, you can't recover it. Multiple input vectors get mapped to the same output, so no inverse function exists. Algebraically, the columns of $A$ become linearly dependent: one column is a combination of the others, and the matrix is called singular.

Worked check: consider

$$ A = \begin{pmatrix} 1 & 2 \\ 2 & 4 \end{pmatrix}. $$

The second column is just twice the first. We expect a flattened parallelogram, zero area, zero determinant:

$$ \det A = (1)(4) - (2)(2) = 4 - 4 = 0. \checkmark $$

This is the test you'll reach for over and over: to decide whether a matrix can be inverted, whether a linear system $A\mathbf{x} = \mathbf{b}$ has a unique solution, whether a set of vectors is linearly independent — compute the determinant and check whether it's zero.

A determinant near zero isn't quite the same

"Nonzero determinant" is a yes/no condition, but in numerical practice a determinant that's tiny often indicates a matrix that's only barely invertible — a so-called ill-conditioned matrix. The condition number, not the determinant, is the right tool for numerical stability questions.

6. Playground: signed area of the parallelogram

Slide the entries of a $2 \times 2$ matrix and watch the parallelogram its columns span. The fill color tracks the sign of the determinant — orange when orientation is preserved, red when it's flipped, fading to nothing as the matrix becomes singular. The dashed unit square is there for scale.

2.0 1.0 0.0 1.0
det = ad − bc 2.00
preserves orientation (det > 0)
|det| = area of parallelogram = 2.00
2.0
1.0
0.0
1.0
x y
Copied!
Try it

Start from the identity and slowly drag $d$ down through zero. The parallelogram squashes flat at $d = 0$ (where $\det = 0$) and then re-emerges in red — same shape, opposite orientation. The sign of the determinant is exactly the moment the parallelogram passes through degeneracy.

7. Algebraic properties

A handful of identities turn the determinant from a recipe into a tool. Every one of them is a consequence of the geometric definition — they say something specific about how matrix operations change signed volume.

Multiplicativity

For any two square matrices $A$ and $B$ of the same size:

$$ \det(AB) = \det(A) \cdot \det(B). $$

Geometrically obvious: apply $B$ then $A$, and volume scales by $\det B$ then by $\det A$ — the total scaling is the product. A useful corollary: $\det(A^{-1}) = 1/\det(A)$ whenever $A$ is invertible, because $A A^{-1} = I$ has determinant $1$.

Transpose preserves the determinant

$$ \det(A^\top) = \det(A). $$

This is the symmetric flip-side: cofactor expansion gives the same result along any row or any column, so swapping rows for columns leaves the answer alone. One practical use: any property stated for rows automatically holds for columns too.

Row (and column) operations

The three elementary row operations each affect the determinant in a predictable way. These are how row reduction actually computes determinants in practice.

OperationEffect on $\det A$
Swap two rowsMultiplies $\det A$ by $-1$
Multiply a row by scalar $k$Multiplies $\det A$ by $k$
Add a multiple of one row to anotherLeaves $\det A$ unchanged

The third one is the workhorse: shears don't change volume. Combined with the swap rule for sign-tracking, you can reduce any matrix to triangular form, and then the determinant is just the product of the diagonal entries — a stunningly faster procedure than cofactor expansion for anything bigger than 3×3.

Scalar multiple of an entire matrix

Scaling every entry of an $n \times n$ matrix by $k$ scales $n$ separate rows by $k$, so:

$$ \det(kA) = k^n \det(A). $$

The exponent $n$ surprises people who pattern-match to $\det(kA) = k\det(A)$ — it is wrong unless $n = 1$.

Triangular matrices

If $A$ is upper- or lower-triangular (all entries above or below the diagonal are zero), then $\det A$ is just the product of the diagonal entries. The off-diagonal entries contribute nothing — every term in the cofactor expansion that involves them ends up multiplied by zero.

Together these say

Row-reduce $A$ to triangular form $U$, tracking how the determinant changed at each step (swaps flip the sign, row-scaling by $k$ multiplies by $k$, adding multiples of rows does nothing). Then $\det A$ is whatever you've accumulated times the product of $U$'s diagonal entries. This is the $O(n^3)$ algorithm computers actually use — cofactor expansion is $O(n!)$ and unusable for large $n$.

8. Cramer's rule

Cramer's rule is a closed-form solution to a square linear system $A\mathbf{x} = \mathbf{b}$ when $\det A \neq 0$. For each unknown $x_i$:

$$ x_i = \frac{\det A_i}{\det A}, $$

where $A_i$ is the matrix obtained by replacing column $i$ of $A$ with the right-hand side $\mathbf{b}$. Every other column stays the same.

A concrete 2×2 example. Solve

$$ \begin{aligned} 2x + 3y &= 8, \\ x - y &= 1. \end{aligned} $$

The coefficient matrix and its determinant:

$$ A = \begin{pmatrix} 2 & 3 \\ 1 & -1 \end{pmatrix}, \qquad \det A = (2)(-1) - (3)(1) = -5. $$

For $x$, replace column 1 with $(8, 1)$; for $y$, replace column 2 with $(8, 1)$:

$$ x = \frac{\begin{vmatrix} 8 & 3 \\ 1 & -1 \end{vmatrix}}{-5} = \frac{-8 - 3}{-5} = \frac{-11}{-5} = \tfrac{11}{5}, \qquad y = \frac{\begin{vmatrix} 2 & 8 \\ 1 & 1 \end{vmatrix}}{-5} = \frac{2 - 8}{-5} = \tfrac{6}{5}. $$
Beautiful, but slow

Cramer's rule is theoretically elegant and great for proofs, small symbolic systems, and seeing exactly how the solution depends on the data. For numerical work it is terrible — solving an $n \times n$ system requires $n+1$ determinants, each $O(n!)$ by cofactor expansion or $O(n^3)$ by row reduction. Gaussian elimination directly solves the same system in a single $O(n^3)$ pass. Use Cramer for insight, not computation.

9. Common pitfalls

The minus sign in the 3×3 expansion

Cofactor expansion is $a(ei - fh) - b(di - fg) + c(dh - eg)$, not $a(ei - fh) + b(di - fg) + c(dh - eg)$. The middle term carries a negative sign from the alternating $+, -, +$ checkerboard. Forgetting it is the most common single error in a 3×3 calculation. (The Rule of Sarrus diagonal trick exists to dodge this, but it only works for 3×3 — don't carry it to 4×4.)

Determinants are only defined for square matrices

A 2×3 matrix has no determinant — full stop. The geometric picture requires equal numbers of input and output dimensions; otherwise "scaling factor of $n$-D volume" isn't well-defined. If someone writes $\det A$ for a non-square $A$, they mean something else (like a determinant of a related square matrix such as $A^\top A$).

Sign tells you orientation, not magnitude

A determinant of $-7$ does not mean the area shrank by a factor of $-7$ — areas can't be negative. It means the matrix scales area by $7$ and flips orientation. Always read $|\det A|$ for size and the sign of $\det A$ for handedness.

$\det(A + B) \neq \det A + \det B$

The determinant is multiplicative: $\det(AB) = \det A \cdot \det B$. But it is not linear in the usual sense — adding two matrices generally has nothing to do with adding their determinants. Don't pattern-match against linearity here.

10. Worked examples

Five short calculations. Try each before opening the solution; the goal is to see whether your steps match the canonical recipe.

Example 1 · Compute the 2×2 determinant of $\begin{pmatrix} 4 & 3 \\ 6 & 2 \end{pmatrix}$

Apply the formula $ad - bc$ with $a = 4$, $b = 3$, $c = 6$, $d = 2$:

$$ \det A = (4)(2) - (3)(6) = 8 - 18 = -10. $$

The columns span a parallelogram of area $10$, and the negative sign tells you that going from column 1 to column 2 reverses the standard (counterclockwise) orientation.

Example 2 · Compute the 3×3 determinant of $\begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{pmatrix}$

Step 1. Expand along the first row with alternating signs $+, -, +$:

$$ \det A = 1 \begin{vmatrix} 4 & 5 \\ 0 & 6 \end{vmatrix} - 2 \begin{vmatrix} 0 & 5 \\ 1 & 6 \end{vmatrix} + 3 \begin{vmatrix} 0 & 4 \\ 1 & 0 \end{vmatrix} $$

Step 2. Evaluate each 2×2:

$$ \begin{aligned} \begin{vmatrix} 4 & 5 \\ 0 & 6 \end{vmatrix} &= (4)(6) - (5)(0) = 24, \\ \begin{vmatrix} 0 & 5 \\ 1 & 6 \end{vmatrix} &= (0)(6) - (5)(1) = -5, \\ \begin{vmatrix} 0 & 4 \\ 1 & 0 \end{vmatrix} &= (0)(0) - (4)(1) = -4. \end{aligned} $$

Step 3. Combine:

$$ \det A = 1(24) - 2(-5) + 3(-4) = 24 + 10 - 12 = 22. $$
Example 3 · Is $\begin{pmatrix} 2 & -3 \\ -4 & 6 \end{pmatrix}$ invertible?

Step 1. Compute the determinant:

$$ \det A = (2)(6) - (-3)(-4) = 12 - 12 = 0. $$

Step 2. Since $\det A = 0$, the matrix is not invertible.

Geometric reason. The second column $(-3, 6)$ is exactly $-\tfrac{3}{2}$ times the first column $(2, -4)$, so the two column vectors lie on the same line through the origin. The "parallelogram" collapses to a line segment of zero area.

Example 4 · Does $\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}$ describe a reflection?

Step 1. Compute the determinant:

$$ \det A = (1)(-1) - (0)(0) = -1. $$

Step 2. The magnitude is $1$ (area preserved) and the sign is negative (orientation flipped). Both signatures of a reflection.

Step 3. Read the matrix to identify which reflection. The map sends $(x, y) \mapsto (x, -y)$ — points are flipped across the $x$-axis. So yes, it's the reflection across the $x$-axis.

(A determinant of $-1$ is necessary but not sufficient to be a reflection: any orientation-reversing isometry has $\det = -1$, but a non-isometry like $\begin{pmatrix} 2 & 0 \\ 0 & -\tfrac{1}{2} \end{pmatrix}$ also has $\det = -1$ without being a true reflection. Reflections are orthogonal matrices with $\det = -1$.)

Example 5 · Find the area of the parallelogram with vertices $(0,0)$, $(5, 1)$, $(2, 3)$, $(7, 4)$

Step 1. Identify the two edge vectors from the origin:

$$ \mathbf{u} = (5, 1), \qquad \mathbf{v} = (2, 3). $$

(The fourth vertex $(7, 4) = \mathbf{u} + \mathbf{v}$ confirms the parallelogram is non-degenerate.)

Step 2. Stack the vectors as columns of a 2×2 matrix and take the determinant:

$$ \det \begin{pmatrix} 5 & 2 \\ 1 & 3 \end{pmatrix} = (5)(3) - (2)(1) = 15 - 2 = 13. $$

Step 3. Take the absolute value for area:

$$ \text{Area} = |13| = 13. $$

The positive sign also tells you that, traversed in the order $\mathbf{u} \to \mathbf{v}$, the parallelogram is oriented counterclockwise.

Sources & further reading

The determinant is one of the most-written-about objects in undergraduate mathematics. The sources below approach it from different angles — pick by what you need next.

Test your understanding

A quiz that builds from easy to hard. Pick an answer to get instant feedback and a worked explanation. Your progress is saved in this browser — come back anytime to continue.

Question 1 of 1
0 correct