Determinant

Every square matrix has a single number attached to it called its determinant, written det(A)\det(A) or A|A|. The picture to keep in mind is geometric: a square matrix acts on space as a linear transformation xAx\mathbf{x} \mapsto A\mathbf{x} — stretching, rotating, shearing, or flipping it — and the determinant is the factor by which areas (or volumes) get scaled under that transformation.

A few things follow immediately from that picture:

  • If det(A)=3\det(A) = 3, every shape comes out three times bigger after applying AA.
  • The sign records orientation: positive means AA preserves it, negative means AA flips it (like a mirror reflection).
  • det(A)=0\det(A) = 0 is the degenerate case — AA squashes space down into a lower-dimensional shadow with no volume left, which is exactly when AA has no inverse. So "det(A)0\det(A) \neq 0" is the standard test for invertibility.

For the small cases that come up most often — 2×22 \times 2 and 3×33 \times 3 — that scale factor has a clean closed-form formula.

2×2 Determinant

A 2×22 \times 2 matrix has two columns, each a vector in the plane. Together they span a parallelogram, and the determinant is just the signed area of that parallelogram.

The determinant of a 2×22 \times 2 matrix A=(abcd)A = \begin{pmatrix} a & b \\ c & d \end{pmatrix} is:

det(A)=abcd=adbc\det(A) = \begin{vmatrix} a & b \\ c & d \end{vmatrix} = ad - bc

The recipe to remember: multiply along the main diagonal (ada \cdot d, top-left to bottom-right), then subtract the product along the anti-diagonal (bcb \cdot c, top-right to bottom-left).

det(3142)=3214=64=2\det \begin{pmatrix} 3 & 1 \\ 4 & 2 \end{pmatrix} = 3 \cdot 2 - 1 \cdot 4 = 6 - 4 = 2

So this matrix scales areas by a factor of 22 and preserves orientation.

3×3 Determinant

The story is the same, one dimension up. A 3×33 \times 3 matrix has three columns — three vectors in space — and they span a parallelepiped (a slanted box). The determinant is the signed volume of that box.

The determinant of a 3×33 \times 3 matrix A=(a11a12a13a21a22a23a31a32a33)A = \begin{pmatrix} a_{11} & a_{12} & a_{13} \\ a_{21} & a_{22} & a_{23} \\ a_{31} & a_{32} & a_{33} \end{pmatrix}, expanded along the first row, is:

det(A)=a11a22a23a32a33a12a21a23a31a33+a13a21a22a31a32\det(A) = a_{11} \begin{vmatrix} a_{22} & a_{23} \\ a_{32} & a_{33} \end{vmatrix} - a_{12} \begin{vmatrix} a_{21} & a_{23} \\ a_{31} & a_{33} \end{vmatrix} + a_{13} \begin{vmatrix} a_{21} & a_{22} \\ a_{31} & a_{32} \end{vmatrix}

Evaluating each of the three 2×22 \times 2 determinants gives the closed form

det(A)=a11(a22a33a23a32)a12(a21a33a23a31)+a13(a21a32a22a31)\det(A) = a_{11}(a_{22} a_{33} - a_{23} a_{32}) - a_{12}(a_{21} a_{33} - a_{23} a_{31}) + a_{13}(a_{21} a_{32} - a_{22} a_{31})

The “cross out the row and column” leftover block has a name: its determinant is the minor of the entry, and the signed minor (with the checkerboard sign attached) is the cofactor. The alternating +,,++, -, + pattern is the same one that shows up in the cross-product determinant mnemonic.

Nothing forces you to walk the first row — expanding along any row or column gives the same answer, as long as you use the right sign pattern: the checkerboard (1)i+j(-1)^{i+j} at position (i,j)(i, j). Picking a row or column with zeros saves effort, since those terms drop out before you ever compute the corresponding minor.

For A=(123045106)A = \begin{pmatrix} 1 & 2 & 3 \\ 0 & 4 & 5 \\ 1 & 0 & 6 \end{pmatrix}, expanding along the first row:

det(A)=1(4650)2(0651)+3(0041)\det(A) = 1 \cdot (4 \cdot 6 - 5 \cdot 0) - 2 \cdot (0 \cdot 6 - 5 \cdot 1) + 3 \cdot (0 \cdot 0 - 4 \cdot 1)=1242(5)+3(4)=24+1012=22= 1 \cdot 24 - 2 \cdot (-5) + 3 \cdot (-4) = 24 + 10 - 12 = 22

Sarrus’ rule is a popular shortcut for 3×33 \times 3 matrices specifically — it does not generalize to larger sizes. Write the matrix and copy its first two columns to the right of it:

a11a12a13a11a12a21a22a23a21a22a31a32a33a31a32\begin{array}{ccc|cc} a_{11} & a_{12} & a_{13} & a_{11} & a_{12} \\ a_{21} & a_{22} & a_{23} & a_{21} & a_{22} \\ a_{31} & a_{32} & a_{33} & a_{31} & a_{32} \end{array}

Add the products along the three “downward” diagonals (top-left to bottom-right), then subtract the products along the three “upward” diagonals (bottom-left to top-right):

A=(a11a22a33+a12a23a31+a13a21a32)(a31a22a13+a32a23a11+a33a21a12)|A| = (a_{11} a_{22} a_{33} + a_{12} a_{23} a_{31} + a_{13} a_{21} a_{32}) - (a_{31} a_{22} a_{13} + a_{32} a_{23} a_{11} + a_{33} a_{21} a_{12})

Multiplying out the cofactor expansion above and rearranging gives exactly these six terms — Sarrus’ rule just bundles the bookkeeping into a memorable visual.

Determinant from Eigenvalues

Beyond the closed-form formulas above, the determinant has a second face that holds for every square matrix: it equals the product of the matrix’s eigenvalues. The 2×22 \times 2 case shows why concretely, and the same argument lifts to any size.

Expanding det(AλI)\det(A - \lambda I) for a 2×22 \times 2 matrix gives the characteristic polynomial

det(AλI)=(aλ)(dλ)bc=λ2(a+d)λ+(adbc)\det(A - \lambda I) = (a - \lambda)(d - \lambda) - bc = \lambda^2 - (a + d)\lambda + (ad - bc)

Its roots are the eigenvalues λ1,λ2\lambda_1, \lambda_2, so the same polynomial must also factor as:

(λλ1)(λλ2)=λ2(λ1+λ2)λ+λ1λ2(\lambda - \lambda_1)(\lambda - \lambda_2) = \lambda^2 - (\lambda_1 + \lambda_2)\lambda + \lambda_1 \lambda_2

Matching coefficients (Vieta’s formulas) reads off two classical identities at once:

λ1λ2=adbc=det(A),λ1+λ2=a+d=tr(A)\lambda_1 \lambda_2 = ad - bc = \det(A), \qquad \lambda_1 + \lambda_2 = a + d = \operatorname{tr}(A)

For an n×nn \times n matrix the picture is the same: det(A)\det(A) is the product of all nn eigenvalues, and tr(A)\operatorname{tr}(A) is their sum.

Key Properties

For square matrices A,BRn×nA, B \in \mathbb{R}^{n \times n} and a scalar λR\lambda \in \mathbb{R}:

  • Multiplicativity: det(AB)=det(A)det(B)\det(AB) = \det(A) \det(B) — composing two transformations multiplies their volume scale factors, exactly as you’d expect.
  • Transpose invariance: det(A)=det(A)\det(A^\top) = \det(A) — so cofactor expansion along any row or column gives the same result.
  • Scaling: det(λA)=λndet(A)\det(\lambda A) = \lambda^n \det(A) for an n×nn \times n matrix — every column gets stretched by λ\lambda, and there are nn of them, so the volume picks up a factor of λn\lambda^n.
  • Invertibility: AA is invertible if and only if det(A)0\det(A) \neq 0 — a transformation that crushes volume to zero cannot be undone.
  • Diagonal and triangular matrices: the determinant of a diagonal matrix — and more generally any upper- or lower-triangular matrix — is the product of its diagonal entries: det(D)=d1d2dn\det(D) = d_1 d_2 \cdots d_n. In particular, det(In)=1\det(I_n) = 1, which makes sense: the identity transformation leaves every shape exactly as it found it.