Summary
A determinant gives the signed area or volume scale of a linear map. Its magnitude measures the scale. Its sign records orientation.
Start with a unit square. Send its horizontal edge to and its vertical edge to . What area does the square occupy now? What happens if you exchange the two arrows?
Geometric interpretation
Each column is the image of one basis vector. The two arrows bound the image of the square. Follow their order in the first two panels. Then compare their span in the last panel.
Learning objective
Swapping columns reverses orientation without changing absolute area
Derivation
Does reversing the column order change the floor area?
Original coordinate construction checked against MIT OpenCourseWare 18.06, the Deep Learning linear algebra chapter, and the open Interactive Linear Algebra determinant text.
Work the area
The columns give
The four corners become , , and . The filled region has area .
You can check that area by sliding each vertical slice downward by . The slide preserves every slice’s height and width. The arrows become and . The base is now horizontal: base times height gives .
Change of variables (probability)
Put uniform probability density on the original unit square. The image has times the area, so its density must fall to . The total mass stays .
For this map, and
Thus inside the image and zero outside it.
More generally, let on a region where has a differentiable inverse. Assume its Jacobian is nonsingular there. Then
Here is the inverse map’s Jacobian. The absolute value keeps probability density nonnegative, including when the map reverses orientation.
Normalizing flows use maps whose Jacobian determinants are cheap to compute. For a triangular Jacobian, multiply its diagonal entries. If several regular inverse branches reach the same output, add their density contributions. The single-inverse formula alone does not handle that case.
Change the map
Exchange the columns
New task: keep the filled region but exchange the two basis images.
Picture and change: the second panel exchanges the arrows. The ordered area becomes . Its magnitude remains , so the transformed density remains .
Check: a negative density would expose a missing absolute value.
Use when: tracking orientation or transporting probability mass requires the correct sign convention.
Double every coordinate
New task: replace with .
Picture and change: both edge lengths double. In two dimensions, area grows by . Thus , and the uniform density becomes . In three dimensions, doubling every coordinate multiplies volume by .
Check: doubling only one column multiplies the determinant by two. Doubling the whole matrix multiplies it by in dimensions.
Use when: every coordinate unit changes, rather than one basis image alone.
Properties
For square matrices :
- . Composing maps multiplies their signed volume scales.
- .
- when is invertible.
- .
- , counting multiplicity. Real matrices can have complex eigenvalues.
- For a triangular matrix, .
- For an orthogonal matrix , . Rotations and reflections preserve volume magnitude.
In exact arithmetic, these statements are equivalent:
The last panel uses . Its second column is half its first. The image lies on a line, and . There is no ordinary two-dimensional inverse-density formula for this collapsed map.
Try a different transformation
A reflection is followed by axis scalings of three and two. Find the determinant and the image density of a unit-density square.
Check your answer
The determinant is . The image density is on its support. The reflection changes orientation. The scale magnitudes multiply the area by six.
Computing determinants
| Method | Cost | When |
|---|---|---|
| LU decomposition | General-purpose; standard library default | |
| Triangular: product of diag | When matrix is already triangular | |
| Eigendecomposition: | If you need eigenvalues anyway | |
| Log-determinant for PD matrices | via Cholesky | When you only need (e.g., Gaussian log-likelihood) |
For a general matrix, use a signed log-determinant. Track row-pivot signs and the signs of the LU diagonal entries. Sum for the log-magnitude. For a positive-definite matrix with , compute . An explicit determinant can overflow or underflow.
Common pitfalls
- Using as a proxy for matrix “size.” A nearly singular matrix can have huge entries but tiny .
- Computing for invertibility tests. Numerically unstable; use rank or condition number instead.
- Forgetting the absolute value in change-of-variables formulas. Densities are non-negative; the Jacobian determinant can be negative.