Cheatsheet: The determinant
The core idea
Section titled “The core idea”The determinant of a matrix is the factor by which it scales area (2D) or volume (3D).
new area = det(M) · old areadet(M) = area of the parallelogram the unit square becomesSame factor for every region, because a linear transformation scales space uniformly.
The formula (2x2)
Section titled “The formula (2x2)”M = [ a b ] det(M) = ad - bc [ c d ]Main diagonal product minus off-diagonal product. This is the signed area of the parallelogram spanned by the columns [a, c] and [b, d].
Values worth recognizing
Section titled “Values worth recognizing”| det | Meaning |
|---|---|
1 | Area preserved (rotation, shear, identity) |
> 1 | Areas grow |
between 0 and 1 | Areas shrink, nothing collapses |
0 | Space collapses onto a line or point; columns linearly dependent; not invertible |
< 0 | Orientation flips (reflection); magnitude still gives area scaling |
The determinant is signed: magnitude = size scaling, sign = orientation kept (+) or flipped (-).
Worked examples
Section titled “Worked examples”| Matrix | det = ad - bc | Geometry |
|---|---|---|
[[3,0],[0,2]] | 6 - 0 = 6 | Unit square to 3x2 rectangle |
[[0,-1],[1,0]] | 0 - (-1) = 1 | Rotation, area preserved |
[[2,4],[1,2]] | 4 - 4 = 0 | Columns dependent, collapse to a line |
[[1,0],[0,-1]] | -1 - 0 = -1 | Reflection, area kept, orientation flipped |
[[1,1],[0,1]] | 1 - 0 = 1 | Shear, distorts shape but area preserved |
3D and the product rule
Section titled “3D and the product rule”- 3D: determinant of a 3x3 matrix scales volume; read it as the volume of the parallelepiped the unit cube becomes. 0 = flattened; negative = inside-out.
- Product rule:
det(AB) = det(A) · det(B). Scaling factors compose by multiplying (double then triple = times six).
Why it matters for AI
Section titled “Why it matters for AI”det != 0 means invertible (the transformation can be run backward; no information lost). det = 0 means a dimension was collapsed and cannot be recovered. The absolute determinant is also the volume-rescaling factor when converting between distributions.
Pitfalls to dodge
Section titled “Pitfalls to dodge”- Forgetting it is signed. Negative det = orientation flip, not an error.
- Reading
det = 0as small. Zero means total collapse and not invertible, not “a little bit.” - Mixing the diagonals. It is
ad - bc, main minus off. - Treating det as the full story. It gives size and orientation, not the direction of the stretch.
The one-line version
Section titled “The one-line version”The determinant is one signed number, how much bigger and which way up, and when it hits zero, a dimension is gone for good.