Determinants
Motivation
A linear map either stretches, rotates, and skews space in a reversible way, or it collapses some directions to zero. The determinant is a single number — extracted from the entries of a square matrix — that captures both effects at once (Strang 2016). Its magnitude tells us how much \(n\)-dimensional volume is scaled by the map; its sign tells us whether orientation is preserved or flipped; and its vanishing tells us the map is not invertible.
Although determinants are computationally expensive to evaluate and are rarely used directly in numerical work, they play a central role in theory: in eigenvalue equations, in change-of-variables formulas, in Cramer’s rule, and as the cleanest test for singularity in symbolic computations.
Definition
The determinant \(\det(A)\) of a square matrix \(A \in \mathbb{R}^{n \times n}\) is the unique function on \(n \times n\) matrices satisfying three properties:
- Multilinear in the rows. \(\det\) is linear in each row separately, holding the others fixed.
- Alternating. Swapping two rows flips the sign: \(\det\) becomes \(-\det\).
- Normalized. \(\det(I) = 1\).
These three axioms determine the determinant uniquely on \(\mathbb{R}^{n \times n}\). They can equivalently be stated for columns instead of rows — the determinant is the same either way.
For practical purposes, the determinant is the signed \(n\)-volume of the parallelepiped spanned by the rows (or columns) of \(A\).
Determinants of small matrices
For \(1 \times 1\), \(2 \times 2\), and \(3 \times 3\) matrices:
\[ \det \begin{pmatrix} a \end{pmatrix} = a, \]
\[ \det \begin{pmatrix} a & b \\ c & d \end{pmatrix} = ad - bc, \]
\[ \det \begin{pmatrix} a & b & c \\ d & e & f \\ g & h & i \end{pmatrix} = a(ei - fh) - b(di - fg) + c(dh - eg). \]
The \(2 \times 2\) formula computes the signed area of the parallelogram with sides \((a, c)\) and \((b, d)\). The \(3 \times 3\) formula computes the signed volume of the parallelepiped with edges given by the columns.
Computing Determinants
Cofactor expansion. Along the first row,
\[ \det(A) = \sum_{j=1}^n (-1)^{1+j} \, a_{1j} \, \det(A_{1j}), \]
where \(A_{1j}\) is the \((n-1) \times (n-1)\) matrix obtained by deleting row \(1\) and column \(j\). The factor \((-1)^{1+j}\) alternates the signs in a checkerboard pattern. Cofactor expansion works along any row or column.
For \(n \times n\) matrices this approach requires \(\Theta(n!)\) operations — useful for small \(n\) or theoretical work, but unusable for large matrices.
Triangular shortcut. If \(A\) is upper or lower triangular, the determinant is the product of the diagonal entries. The off-diagonal terms in the alternating sum cancel.
Row reduction. Reduce \(A\) to row echelon form \(U\) using only row operations of three kinds, tracking how each affects the determinant:
| Row operation | Effect on \(\det\) |
|---|---|
| Swap two rows | multiply by \(-1\) |
| Multiply a row by \(c\) | multiply by \(c\) |
| Add a multiple of one row to another | no change |
After reduction, \(U\) is triangular, so \(\det(U)\) is the product of its diagonal entries, and \(\det(A)\) is recovered by undoing the recorded scalings. This is \(\Theta(n^3)\) and is how determinants are actually computed in practice.
Worked example
\[ A = \begin{pmatrix} 2 & 1 & 1 \\ 4 & 3 & 1 \\ -2 & 1 & 4 \end{pmatrix}. \]
Row-reduce:
\[ \xrightarrow{R_2 - 2R_1,\; R_3 + R_1} \begin{pmatrix} 2 & 1 & 1 \\ 0 & 1 & -1 \\ 0 & 2 & 5 \end{pmatrix} \xrightarrow{R_3 - 2R_2} \begin{pmatrix} 2 & 1 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 7 \end{pmatrix}. \]
No row swaps or scalings, so \(\det(A) = 2 \cdot 1 \cdot 7 = 14\).
Key Properties
Invertibility. \(A\) is invertible if and only if \(\det(A) \neq 0\). This is the most consequential property of the determinant.
Multiplicativity. For any \(A, B \in \mathbb{R}^{n \times n}\),
\[ \det(AB) = \det(A) \, \det(B). \]
A surprising and powerful identity — neither side is obvious from the entry-level definition. It says volume scaling composes multiplicatively: applying \(A\) then \(B\) scales volume by \(\det(A) \det(B)\).
Inverse. If \(A\) is invertible, \(\det(A^{-1}) = 1 / \det(A)\).
Transpose. \(\det(A^\top) = \det(A)\).
Scalar multiplication. \(\det(cA) = c^n \det(A)\) for an \(n \times n\) matrix. The factor \(c^n\) — not \(c\) — reflects that scaling every dimension by \(c\) scales \(n\)-volume by \(c^n\).
Eigenvalues. \(\det(A) = \prod_{i=1}^n \lambda_i\), the product of the eigenvalues (with multiplicity). This is one of the entries on the list of equivalents in the invertible matrix theorem: \(A\) is invertible iff all eigenvalues are nonzero iff \(\det(A) \neq 0\).
Trace and determinant of a \(2 \times 2\). For a \(2 \times 2\) matrix, \(\det(A) = \lambda_1 \lambda_2\) and \(\operatorname{tr}(A) = \lambda_1 + \lambda_2\). The eigenvalues are the roots of \(\lambda^2 - \operatorname{tr}(A) \lambda + \det(A) = 0\).
Geometric Interpretation
The determinant measures the signed volume scaling of the linear map \(A : \mathbb{R}^n \to \mathbb{R}^n\).
- Magnitude. \(|\det(A)|\) is the factor by which \(A\) scales every \(n\)-dimensional volume. The image of the unit cube under \(A\) is a parallelepiped with volume \(|\det(A)|\).
- Sign. \(\det(A) > 0\) means \(A\) preserves orientation (right-handed coordinate systems stay right-handed). \(\det(A) < 0\) means \(A\) flips orientation (a reflection).
- Zero. \(\det(A) = 0\) means \(A\) flattens the unit cube into a degenerate slab of dimension less than \(n\) — the image has zero \(n\)-volume. This is exactly the failure of invertibility.
Two dimensions
A \(2 \times 2\) matrix \(A = \begin{pmatrix} a & b \\ c & d \end{pmatrix}\) maps the unit square to the parallelogram with edges \((a, c)\) and \((b, d)\). The signed area of that parallelogram is \(ad - bc = \det(A)\). Positive area means the corners go around in the same orientation as the original square; negative means they reverse.
Three dimensions
A \(3 \times 3\) matrix maps the unit cube to a parallelepiped whose signed volume is the determinant. Reflections through a coordinate plane have \(\det = -1\).
Computational Notes
In symbolic and theoretical work — eigenvalue equations, integration by substitution, polynomial identities — the determinant is indispensable. In numerical work it is mostly avoided:
- Cost. Cofactor expansion is \(\Theta(n!)\). Even the efficient row-reduction approach takes \(\Theta(n^3)\) — the same as the much more useful \(LU\) factorization, which provides \(\det(A)\) as a byproduct.
- Numerical scale. Determinants of large matrices can be astronomically large or small (a \(1000 \times 1000\) matrix with entries near \(10\) has \(|\det| \sim 10^{1000}\)), so they overflow ordinary floating point.
- Invertibility tests. Checking \(\det(A) \neq 0\) is a poor proxy for “well-conditioned.” The condition number \(\kappa(A) = \sigma_1 / \sigma_n\) is a better numerical diagnostic — a matrix can have \(\det(A)\) near \(1\) and still be effectively singular.
When the determinant is genuinely needed numerically (e.g., for normalization constants in probability density functions), the standard trick is to compute \(\log |\det(A)|\) from the diagonal entries of an \(LU\) factorization, avoiding overflow entirely.
Use Cases
Change of variables in integration. Substituting \(\mathbf{u} = A\mathbf{x}\) in a multivariable integral introduces a \(|\det(A)|\) factor. The same idea underlies the Jacobian determinant in nonlinear changes of variables.
Characteristic polynomial. The eigenvalues of \(A\) are the roots of \(\det(\lambda I - A) = 0\).
Cramer’s rule (Cramer 1750). Solves \(A\mathbf{x} = \mathbf{b}\) via a ratio of determinants. Elegant and exact, but \(\Theta(n^4)\) — never used in practice.
Orientation and chirality. In computer graphics, robotics, and physics, the sign of a determinant distinguishes left-handed from right-handed coordinate frames.
Probability density transformations. The density of \(Y = A\mathbf{X}\) scales by \(1 / |\det(A)|\) relative to the density of \(\mathbf{X}\). This is foundational to normalizing flows and many likelihood derivations.