Linear Algebra · Theory · M2
M2-T6 — Determinants and Geometric Interpretation
One number tells you how much a transformation stretches area, whether it flips orientation, and whether it can be undone.
A robot Jacobian that loses its determinant is an arm at a singular pose, and a calibration with a negative determinant is a mirrored sensor. The determinant is the single number behind both observations. This lesson derives it, interprets it geometrically, and shows its limits as a measure of numerical health.
Learning objectives
After this lesson, you should be able to:
- Compute the determinant of a 2 × 2 matrix and interpret its size and sign geometrically.
- Derive det = ad − bc from the area of the parallelogram spanned by the columns.
- State and use det(AB) = det(A) det(B) and the link between det = 0 and non-invertibility.
- Recognise why the determinant is a poor measure of how close a matrix is to singular.
Introduction and motivation
Some transformations squash the plane flat: afterwards two different inputs are indistinguishable, and no matrix can undo the damage. A robot arm stretched straight out is like this: from that pose, certain hand motions cannot be produced by any joint motion. The determinant detects it with one number. It also detects mirrored frames, which are a notorious source of sign errors in sensor calibration.
The intuition
Take the unit square and push it through a matrix. It becomes a parallelogram. The determinant is the area of that parallelogram, with a sign: positive if the square was not flipped over (the rotation sense is preserved), negative if it was mirrored. And because every shape is stretched by the same factor, the determinant is the area scale factor for every region, not just the unit square.
If the determinant is zero, the parallelogram has no area: the two columns lie along one line and the plane has been squashed onto that line. Information has been destroyed, and the transformation cannot be reversed.
Interactive figure. The unit square and an F-shaped outline are transformed by a two by two matrix. The readout gives the determinant, the area scale factor, the orientation (kept, flipped or collapsed) and whether the matrix is invertible. This figure needs JavaScript to be interactive.
Geometric and physical interpretation
Geometric view. |det| is the factor by which areas scale (volumes in 3D); the sign records whether orientation (the left-to-right sense of a pair of axes) is kept or reversed. A rotation has det +1: it moves shapes without changing area or orientation. A reflection has det −1. A projection onto a line has det 0. Physical view. Imagine a robot map stretched when it is re-drawn at a different scale: every region's area changes by the same factor, and that factor is the determinant. A camera with a mirror in the optical path flips the image, and the determinant of its coordinate transform is −1.
The mathematics
- det A
- the determinant of the square matrix A (also written |A|).
- a, b, c, d
- the entries of a 2 × 2 matrix [[a, b], [c, d]].
- u, v
- the columns of A, viewed as arrows.
The 2 × 2 determinant
det [ a b ] = a·d − b·c
[ c d ]What it means. It is the signed area of the parallelogram spanned by the columns (a, c) and (b, d). Positive if the second column is a left turn from the first, negative if a right turn, zero if they are parallel.
Larger matrices
det A = (volume of the parallelepiped spanned by the columns, with sign) 3 × 3: det [u v w] = u · (v × w)
What it means. For three columns, the determinant is the signed volume of the box they span, which equals the dot product of one column with the cross product of the other two.
Rules
det(A B) = det(A) · det(B) det(Aᵀ) = det(A) det(A⁻¹) = 1 / det(A)
What it means. Scale factors multiply when transformations are composed. A matrix is invertible exactly when det A ≠ 0.
|det| is the area (or volume) scale factor, the sign is orientation, and det = 0 means the transformation squashes space and cannot be undone.
Step-by-step derivation: ad − bc is the signed area
The columns are u = (a, c) and v = (b, d). The unit square becomes the parallelogram spanned by u and v. The Cross Product lesson showed that the area of the parallelogram on two arrows is the absolute value of their 2D cross product, and that its sign says whether v is to the left (positive) or right (negative) of u.
- The 2D cross product is
u × v = ux vy − uy vx. - Substituting
ux = a, uy = c, vx = b, vy = dgivesu × v = a d − c b. - That is exactly
ad − bc. Sodet A = u × v: signed area of the image of the unit square. Positive when the unit-square orientation is kept, becausee₂is a left turn frome₁and a matrix that keeps the sense maps the pair(Ae₁, Ae₂)to another left turn.
Why the area scale applies to every region. A linear map takes a small square of side ε to a parallelogram of area |det|·ε². Any region is made of many small squares, so the total area scales by the same factor |det|.
det(AB) = det(A) det(B). Applying B multiplies areas by |det B| and then applying A multiplies them by |det A|, so the product multiplies by |det A||det B|, and the signs (orientation flips) multiply as well. As an algebraic check for 2 × 2 matrices, take A = [[2, 1], [1, 3]] and B = [[1, 2], [0, 1]]: det A = 5, det B = 1, AB = [[2, 5], [1, 5]] and det(AB) = 10 − 5 = 5 = 5·1. ✓
Zero determinant means no inverse. If det = 0 the columns are parallel and the image is a line (or a point). Two different inputs along the squashed direction map to the same output, so no function, linear or not, can recover the input from the output.
A worked example: area, flips and the squashed plane
- Area scale.
M = [[2, 1], [1, 3]]hasdet M = 2·3 − 1·1 = 5. The unit square becomes a parallelogram of area 5, and any region has its area multiplied by 5. The sign is positive, so orientation is kept. - Rotation.
R(90°) = [[0, −1], [1, 0]]hasdet = 0·0 − (−1)(1) = 1: area and orientation preserved. - Reflection.
[[1, 0], [0, −1]]hasdet = −1: area preserved, orientation flipped. - Collapse.
[[1, 2], [2, 4]]hasdet = 1·4 − 2·2 = 0: the second column is twice the first, every output lies on the line through (1, 2), and the matrix has no inverse. - Volume.
diag(1, 2, 3)hasdet = 6: a unit cube becomes a 1 × 2 × 3 box of volume 6. - A deceptive small determinant.
0.01 Iin 2D hasdet = 10⁻⁴and is perfectly well conditioned (it just shrinks everything). The determinant alone does not say how close to singular a matrix is.
Robotics application
Singular robot poses. In Module 8 the Jacobian of a planar two-link arm has determinant l₁ l₂ sin θ₂. It is zero exactly when the elbow is fully straight (θ₂ = 0) or folded back (θ₂ = π): there the hand cannot move along the arm, which is the geometric meaning of a singularity.
Mirrored frames. A coordinate transform with det = −1 contains a reflection: a left-handed frame, or a sensor whose axes were wired in a mirrored order. A rotation matrix must have det = +1; checking the determinant of a calibration matrix catches this class of error immediately. See the SLAM lessons on rotation matrices, quaternions and poses.
Map re-scaling and resampling. When a grid map is warped, the determinant of the local transformation gives the area change, which is needed to keep occupancy probabilities consistent.
Probability. The multivariate Gaussian of Module 9 contains det Σ: the volume of the uncertainty ellipsoid, and the reason a covariance with zero determinant describes certainty in some direction.
Engineering implications and limitations
Practical rules
- Do not use the determinant to test invertibility in floating point. “det == 0” is never exactly true after rounding, and a tiny determinant may just reflect small units. Use the singular values or the condition number (Module 6).
- Scale changes the determinant. Converting metres to millimetres multiplies a 3 × 3 determinant by 10⁹ without changing how invertible the matrix is, which is why it is a poor health indicator.
- Large matrices overflow. The determinant of a 100 × 100 matrix can overflow or underflow; use the logarithm of the determinant (from a factorisation) when you need it, for example in Gaussian likelihoods.
- Use the sign deliberately. Checking
det(R) > 0andR Rᵀ ≈ Itogether verifies that a matrix is a proper rotation. - Singularities are neighbourhoods, not points. A Jacobian whose determinant is small, not just zero, already behaves badly; plan for a margin.
Limits
The determinant exists only for square matrices. For a rectangular Jacobian (a redundant arm), the analogue is based on the singular values and is the subject of Module 6 and Module 8.
Common misconceptions
“A small determinant means a nearly singular matrix.”
Only relative to the scale. 0.01·I has determinant 10⁻⁴ and is perfectly healthy; a matrix with columns (1, 0) and (1, 10⁻¹²) has determinant 10⁻¹² and is nearly singular. The condition number is the right test.
“The determinant is the sum of the diagonal.”
That is the trace. The determinant for 2 × 2 is ad − bc, which mixes the diagonal and off-diagonal entries.
“A negative determinant means a negative area.”
Area is never negative. The sign records orientation: a negative determinant means the plane has been flipped over, like a mirror image.
“det(A + B) = det A + det B.”
The determinant is multiplicative for products, not additive for sums. Compare [[1, 0], [0, 1]] + [[1, 0], [0, 1]] = [[2, 0], [0, 2]] (det 4) with 1 + 1 = 2.
Engineering takeaways
- det [[a, b], [c, d]] = ad − bc is the signed area of the parallelogram spanned by the columns.
- |det| is the area (volume) scale factor of the transformation for every region; the sign records whether orientation is flipped.
- det(AB) = det(A) det(B): scale factors multiply under composition.
- det = 0 means the transformation squashes space onto a lower dimension and cannot be inverted.
- The determinant is not a reliable numerical health check: use singular values and the condition number instead.
References and further reading
Primary papers and authoritative documentation.
- MIT 18.06SC Linear Algebra (OCW): lectures on determinants and their properties
- 3Blue1Brown, Essence of Linear Algebra: the determinant as an area scale factor
- Immersive Linear Algebra: chapter 7, Determinants
- Modern Robotics (Lynch and Park), free preprint: chapter 5: singularities of the Jacobian
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
A transformation has the matrix [[3, 1], [2, 4]]. By what factor does it scale areas, and is the orientation preserved? What is the area of the image of a triangle of area 2?
Explanation
det = 3·4 − 1·2 = 10. Areas are scaled by 10, and since the determinant is positive the orientation is preserved. A triangle of area 2 becomes a region of area 20.
Question 2
The matrix [[1, 2], [2, 4]] sends the point (2, −1) to the origin. What is its determinant, what does that say about inverting it, and what two different inputs give the same output?
Explanation
det = 1·4 − 2·2 = 0, so the matrix is singular and cannot be inverted. It sends (2, −1) to 2·(1, 2) + (−1)·(2, 4) = (0, 0), and also sends the origin to the origin: two different inputs (2, −1) and (0, 0) give the same output (0, 0), so an inverse would have to return two answers for one input, which is impossible.
Question 3
A calibration routine returns a 3 × 3 sensor-to-robot matrix that looks like a rotation but has a determinant of −1. What is probably wrong with the sensor frame, and how would you fix it?
Explanation
A determinant of −1 means the matrix contains a reflection: one axis of the sensor frame is mirrored (a left-handed frame, or an axis whose sign was wired or defined backwards). Fix it by finding the axis whose sign is wrong in the sensor definition or driver and flipping it, and verify afterwards that det = +1 and R Rᵀ = I.
What’s next
A non-zero determinant means a transformation can be undone. The final lesson of this module builds the undoing matrix, the inverse, and shows why you should rarely compute it in practice.
Related content
Nothing below is required to finish this lesson.
- BeforeM2-T5: Composition of Transformations
Combine two transformations into one matrix product and predict the effect of changing the order.
- LabM2-L1: Matrix Transformation Playground
Move a robot outline with matrices: build the matrix that maps one shape onto another, and catch the order-of-composition and singular-matrix traps.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.