Chapter 6The determinant
"The purpose of computation is insight, not numbers."
— Richard Hamming
One thing that turns out to be surprisingly useful for understanding a given transformation is to measure exactly how much a given transformation stretches and squishes things. More specifically, to measure the factor by which the area of a given region increases or decreases.
For example, the matrix scales by a factor of , and scales by a factor of . How can we tell the factor by which space gets stretched? Focus your attention on the square whose bottom sits on , and whose left side sits on . After the transformation, this turns into a rectangle.
Since this region started with area , and ended up with area , we can say the linear transformation has scaled its area by a factor of .
So even though this transformation smooshes things about, it seems to leave areas unchanged. Actually, though, if you know how much the area of that one unit square changes, it tells you how the area of any region in space changes. For starters, notice that whatever happens to one square in the grid happens to any other square in the grid, no matter the size of that other square. This is because grid lines remain parallel and evenly spaced.
Then, any shape that’s not a grid square can be approximated by grid squares, with arbitrarily good approximations if you use small enough grid squares. So since the areas of all those tiny grid squares are being scaled by a certain amount, the area of the blob as a whole will be scaled by that amount.
This special scaling factor, the factor by which a linear transformation changes areas, is called the “determinant” of that transformation.
I’ll show how to compute the determinant of transformation using its matrix later on in this video, but understanding what it represents is much more important than the computation.
For example, the determinant of a transformation would be if that transformation increases the area of a region by a factor of 3.
The determinant of a transformation is if it squishes down all areas by a factor of 1/2.
What is the determinant of the following transformation?
The determinant of a 2D transformation is if it squishes all of space onto a line, or even onto a single point, since the area of every region would then become 0.
That last one is especially important; checking if the determinant of a given matrix is will give a way of computing whether or not the transformation associated with a matrix squishes everything into a smaller dimension. You’ll see in the next few chapters why this is a useful thing to think about. For now I just want to lay down the visual intuition, which in and of itself is a beautiful thing to think about.
Actually, what I’ve said so far is not quite right. The full concept of the determinant allows for negative values, but what does the idea of scaling an area by a negative amount mean?
This has to do with the idea of orientation. For example, notice how normally is to the left of .
However, after this transformation now is on the right of .
If you thought of 2D space as a sheet of paper, a transformation like that one seems to turn over that sheet to the other side. Any transformations that do this are said to “invert the orientation of space”. Whenever this happens, the determinant will be negative. The absolute value of the determinant still tells you the factor by which areas have been scaled.
What does the determinant of the matrix tell us about the space?
Since , we know this transformation flips space and doubles the area.
Why would the idea of negative area be a natural way to describe orientation flipping? Well, think about the series of transformations you get by slowly letting get closer and closer to . As gets closer, all of the areas in space are getting squished more and more, meaning the determinant approaches . Once lines up with , the determinant is . Then if continues the way it was going, doesn’t it feel kind of natural for the determinant to keep decreasing into negative numbers?
In Three Dimensions
Okay, so that’s the understanding of the determinant in two-dimensions, what do you think it should mean for three dimensions? It also tells you how much the transformation scales things, but this time, it tells you how much volumes get scaled.
Just as in two dimensions, where this is easiest to think about by focusing on one particular square with area , and watching only what happens to it. In three dimensions it helps to focus your attention on the specific cube whose edges are resting on the basis vectors , and .
After the transformation, that cube might get warped into a slanty cube. That shape has the best name ever: parallelepiped. A name made even more delightful when your professor has a thick Russian accent.
Since this cube starts with a volume of , and the determinant gives the factor by which any volume is scaled, you can think of the determinant as simply being the volume of the parallelepiped that this cube turns into.
A determinant of zero would mean that all of space is squished onto something with zero volume, meaning a flat plane, a line, or in the most extreme case into a single point at the origin.
The above unit cube transforms into a flat parallelepiped, also known as a parallelogram.
Those who watched chapter 2 will recognize this as meaning the columns of the matrix are linearly dependent.
Describe why the columns of this matrix are linearly dependent.
Any one of these columns can be written as a linear combination of the other two. For example:
Negative determinants in 3D
What about negative determinants in three dimensions, what would that mean?
One way to describe orientation in three-dimensions is with the right-hand rule: Point the forefinger of your right hand in the direction of , stick out your middle finger in the direction of , and notice how when you point up your thumb, it is in the direction of .
If you can still do this after the transformation, orientation has not changed, and the determinant is positive. Otherwise, if after the transformation it only makes sense to do that with your left hand, orientation has been flipped, and the determinant is negative.
What is the sign of the determinant for the following transformation?
How do you actually compute one of these determinants?
This is the formula for a matrix:
Here’s part of an intuition for this formula. Let’s say the terms and were zero. Then the term tells you how much is stretched in the -direction, and the term tells you how much is stretched in the -direction. So if the other terms were zero, it should make sense that gives the area of the rectangle that our favorite unit square turns into, like the example from earlier.
Even if only one of or are zero, you’ll have a parallelogram with base and height , so the area will still be .
Loosely speaking, if both and are nonzero, the term tells you how much this rectangle is stretched or squished in the diagonal direction. It shows how much is changed in the -direction, and how much is changed in the -direction. Here is a more precise justification of this term shown as a helpful diagram.
If you feel like computing determinants by hand is something you need to know, then the only way to get it down is to just practice it with a few matrices, there’s not much I can say or show you that will drill in the computation.
This is all triply true for the three dimensional determinant. There is a formula, and if you feel like that’s something you need to know how to do, you should just practice on a few matrices, or, you know, go watch Sal Khan work through a few.
Honestly, I don’t think those computations fall into the essence of linear algebra, but I definitely think that understanding what the determinant represents falls within that essence.
Here’s a kind of fun question to think about: If you multiply two matrices together, the determinant of the resulting matrix is the same as the product of the determinants of the original two matrices.
If you tried to justify this numerically, it would be a horrible mess. But can you explain why in just one sentence?
The determinant shows how much area scales after the matrix's linear transformation.
Since applying two matrices sequentially leads to a new linear transformation, it doesn't matter if we first apply which scales space by and then apply which scales space by or if we apply both of them which scales space by .