A transformation can be reversed only if nothing was lost on the way, and one number computed from a square matrix says whether anything was.
The previous lesson composed transformations and found that the projection flattens the plane onto a line, after which no transformation can recover which height a point came from. This lesson turns that observation into a test, and the test has a geometric meaning: how much the transformation multiplies area.
What area does under a transformation
Start with the unit square, whose corners are , , and , and whose area is one. A linear map sends and to the columns of its matrix, and sends the fourth corner to the sum of those columns, since it preserves addition. So the unit square becomes the parallelogram spanned by the two columns.
Every other region follows, because a linear map treats the whole plane uniformly. Any shape can be approximated by small squares from a fine grid, each square becomes a small parallelogram of the same shape and size as every other, and areas add. So a single number, the area of the image of the unit square, gives the factor by which every area is multiplied. That number is the determinant.
Compute it for the matrix with columns and , taking all four entries positive for the picture. Enclose the parallelogram in the rectangle from to , of area , and remove what is not the parallelogram: two triangles of area , two triangles of area , and two rectangles of area . That leaves
after cancelling. So the determinant of a two by two matrix is
where, in the column notation of this course, . For that is : the unit square becomes a parallelogram of area five, and a circle of area becomes an ellipse of area .
Check the catalogue from two lessons ago against this. A shear has determinant , and a shear does preserve area, since it slides layers sideways without changing their height or width. A rotation has determinant , as a rigid motion must. A scaling has determinant , which is the area of the rectangle it makes. And the projection has determinant , because the image parallelogram is flat.
Example. Find the determinant of and say what it means.
Here , , , , so . The transformation multiplies every area by ten. A triangle of area becomes one of area .
Now you. Find the determinant of .
Answer
. The second column is exactly twice the first, so both basis vectors land on the same line and the unit square is flattened onto it, with no area left.
The sign
The formula can come out negative, and area cannot, so the determinant is a signed area. The sign records orientation.
Going anticlockwise, comes before . If the images keep that arrangement, the determinant is positive; if the images are swapped in sense, so that the shorter turn from the first column to the second is now clockwise, the determinant is negative and the map has flipped the plane over. Reflection in the line has matrix and determinant : area is preserved in size, as reflection should, and the sign reports the flip. Rotations, which do not flip, have determinant .
Orientation is not a curiosity. It is the difference between a left hand and a right hand, between a mould and the object it casts, and in three dimensions it is what distinguishes the two mirror forms of a chiral molecule.
The multiplication rule
Because the determinant is a scale factor, and scale factors multiply when transformations are composed, the following holds for all square and of the same size:
Doing then multiplies area by and then by , so the total factor is the product, and the signs behave too, since two flips restore the original orientation. Proving this from the entry formula is an unpleasant expansion; proving it from what the determinant means is one sentence.
Check it once with numbers. With , determinant , and , determinant , the product has columns and , so .
Two consequences follow at once. If has an inverse then , so , and in particular an invertible matrix cannot have determinant zero. And if either factor has determinant zero then so does the product, which is the algebraic shadow of the fact that once something has been flattened, nothing later can unflatten it.
Zero means collapse
Everything now points at one criterion. The determinant is zero exactly when the image of the unit square has no area, which happens exactly when the two columns lie on a single line, which is exactly when the columns are linearly dependent. Chaining that to the previous lessons gives a list of statements about a square matrix that are all true together or all false together: the determinant is non-zero; the columns are independent; the columns span the whole space; has exactly one solution for every ; only for ; the transformation is reversible; the matrix has an inverse.
A matrix satisfying them is called invertible or non-singular, and one failing them singular. The word chosen by the third lesson, dependent, and the word chosen by this one, singular, are the same condition seen from two directions.
The failure is worth picturing rather than filing. When the map squashes the plane onto a line or onto the origin, so many different inputs share an output, and no rule can send that output back to the right input, because the information identifying it is gone. Non-invertibility is not a defect of technique.
Three dimensions and beyond
In the same definition applies to volume: the unit cube becomes the parallelepiped spanned by the three columns, and the determinant is its signed volume. The diagonal matrix stretches by , and along the axes, giving a box of volume , which is its determinant.
For a general three by three the value is computed by cofactor expansion, which peels off one row at a time. Writing the rows as and so on,
Each bracket is the two by two determinant left after deleting the row and column of the leading entry, and the signs alternate. The pattern continues in higher dimensions, an by determinant being a combination of determinants of size .
Take the coefficient matrix of the very first lesson's system, whose rows are , and . Expanding along the first row: , which is . Non-zero, so that system had exactly one solution, which is what elimination found.
The recursive method is a trap at scale: it costs about operations, which the first lesson already priced at seventy-seven years for . The practical route is elimination, since adding a multiple of one row to another leaves the determinant unchanged, swapping two rows flips its sign, and the determinant of a triangular matrix is the product of its diagonal entries. Reducing to triangular form therefore delivers the determinant for the usual operations.
Example. Compute the determinant of the matrix with rows , and .
Expanding along the first row: , which is . The matrix is invertible, and it scales volume by a factor of one while, as it happens, distorting shape considerably.
Now you. Compute the determinant of the matrix with rows , and .
Answer
. Non-zero, so the matrix is invertible and it triples volume.
The inverse
The inverse of a square matrix is the matrix with , and it represents the transformation that undoes . For the two by two case it can be derived rather than quoted.
Its first column is the vector with , since the inverse must send back where it came from. With that is the system and . Eliminating gives and . The second column solves , giving and . So
The determinant appears in the denominator, which is the algebra refusing to divide by zero exactly when the geometry says the map cannot be undone.
For , with , , , and determinant , the inverse is . Checking: the first column of is , as required.
Beyond two by two there is no formula worth using, and the method is Gauss-Jordan elimination: write the matrix beside the identity, and apply row operations until the left side is the identity, at which point the right side is the inverse. Each operation is applied to both halves, so whatever sequence of operations turns into turns into . For the matrix with rows , and the result is the matrix with rows , and , and multiplying the two gives the identity exactly, the determinant being so that no fractions appear.
Inverses reverse under products, , which is only common sense: to undo putting on socks and then shoes, take off the shoes first. The proof is one line, , using associativity.
Example. Invert and use it to solve .
The inverse is from above. Then . Check against the original: .
Now you. Invert .
Answer
Here , , , , so and . Check the first column of : .
Honest limits
Three warnings, all of which are routinely ignored to the cost of whoever ignores them.
Do not solve a system by computing an inverse. Gauss-Jordan costs roughly three times what plain elimination costs, and multiplying the inverse by afterwards adds more error than solving directly. The expression is a statement about what the solution is, not an instruction for finding it, and numerical libraries that appear to be inverting are usually factorising instead.
Do not use the determinant as a test for singularity in floating point. Scale a perfectly well-behaved by matrix by and its determinant is multiplied by , which underflows to zero on a computer while the matrix remains as invertible as it ever was. Nearness to singularity is measured by the condition number instead, which compares the largest stretching factor with the smallest, and which the lesson on orthogonality returns to.
Do not expect Cramer's rule to be useful. It gives each unknown as a ratio of determinants, which is elegant and, computed naively, costs per unknown. It is a proof device, not an algorithm.
Two lessons ago a projection destroyed information, and this lesson gave the destruction a number: the determinant is zero. What it did not say is what exactly gets destroyed, or how much. A matrix can collapse three dimensions to two, or to one, or to a point, and all four cases have determinant zero. Measuring the survivors is the business of the next lesson.