Lesson 1 of 4
The determinant
One number says how much a transformation scales area and whether it turns the plane over. When that number is zero, the transformation destroys information and nothing can undo it.
Read the determinant of a 2x2 matrix as the signed area of the image of the unit square.
Explain what a negative determinant and a zero determinant do to space.
Show that a zero determinant and lost information are the same event.
Derive from the parallelogram picture, and use it.

In the last module you watched matrices bend a grid. A stretch pulled it wider, a shear slid it sideways, a rotation turned it. One matrix did something more drastic: it flattened the whole plane onto a single line.
Here is a question to hold on to. After a transformation, can you get back to where you started? After a shear, yes: shear back the other way. After the flattening, no. Many different points landed on the same spot, and nothing in the output says which one each came from.
One number decides this, and it has a picture: how much the transformation scales area. That number is the determinant. By the end of this lesson you will compute it by hand and in code, read its sign, and know exactly why zero is the dangerous value.
Area scaling
We start with the picture, because every fact in this lesson comes from it.
A reminder from module 2. A 2x2 matrix sends the basis vector to its first column and to its second column. The unit square is the square with corners , , and : its two sides from the origin are and . So turns the unit square into the parallelogram whose sides from the origin are the two columns.
The widget below answers one question: when a matrix moves the plane, how much bigger or smaller does area get? The faint square grid is the plane before the matrix acts. The blue and coral lines are the same grid after it. The blue arrow is column 1 and the coral arrow is column 2, and you can drag their tips. The white shape is where the unit square lands, and the area readout is its area. The matrix starts at .
Two facts hold for every matrix you try.
- Every grid square turns into a copy of the same parallelogram, moved to a new place. So every grid square has its area multiplied by the same number.
- That number is the area of the parallelogram the unit square becomes.
Together they say that one number describes what does to the area of any shape at all: a circle, a triangle, a blob. The box below proves the first fact, since everything else rests on it.
Go slower: Why every shape is scaled by the same factor
Call the area of the parallelogram that the unit square becomes.
Step 1, a small square anywhere. Take a square of side whose bottom-left corner is at a point . Its corners are , , and , and its area is .
Step 2, push each corner through . Linearity splits each product into pieces. For example . So the image has one corner at and sides and from there. (A linear map sends straight edges to straight edges, so the image is exactly the parallelogram with those corners.)
Step 3, compare with the unit square. The unit square's image has sides and and area . The small square's image has the same two sides, each shrunk by the factor , and slid over to start at . Shrinking both sides by multiplies the area by , and sliding does not change area. So the image has area .
Step 4, take the ratio. Area after divided by area before is . Neither nor is left: every small square, of any size and anywhere, is scaled by the same .
Step 5, any shape. Cover a shape with a fine grid of small squares. Each one is scaled by , so their total area is scaled by . As the grid gets finer the squares fill the shape more and more exactly, so the shape's own area is scaled by too.
That common factor gets a name.
The sign is the subject of the next section; for now, read the determinant as the area factor. Some books write the determinant as . We will not, because in this course bars mean the length of a vector.
Three examples you can check in the widget:
- stretches by 2 and by 3. The unit square becomes a 2 by 3 rectangle, so . A circle of area becomes an ellipse of area .
- The shear keeps and sends to . The parallelogram has base 1 and height 1, so . A shear slides the layers of the plane past each other, like a deck of cards pushed sideways: each layer keeps its length, and the stack keeps its height, so no area is gained or lost.
- A rotation turns every shape without changing its size, so .
A shear slides each layer sideways in proportion to its height. Every card keeps its size and the stack keeps its height, so the area does not change.
Now read an area factor off a picture yourself, without the widget.
A transformation sends to and to . A shape of area 5 goes in. What is the area of the shape that comes out? Use the picture (base times height), not a formula, and enter a whole number.
Type a number: 0.25, -2, 3/4 and sqrt(2) all work. Enter checks.
In short: a matrix scales every area by the same factor, and that factor is the area of the parallelogram built on its two columns. The next section adds a sign to that number.
Negative determinants: the plane flips over
An area is never negative, so why should the determinant be? Because there is one more thing a transformation can do to the plane, which area alone does not record: turn it over.
Orientation. Going from to is a counterclockwise quarter turn. After the transformation, look at the two columns. If the shorter turn from the first column to the second is still counterclockwise, orientation is preserved and the determinant is positive. If that shorter turn is now clockwise, the plane has been turned over, like a page seen from the back, and the determinant is negative. Text drawn on the plane would come out mirror-reversed.
The same widget, now with the determinant switched on, lets you watch the sign change. It starts from the same . Two things are new: the det A readout, which turns coral when the determinant is negative, and a white arc at the origin that turns from to . The widget also prints the formula with the live numbers; a later section derives it.
The two mirrors from the walkthrough, written as matrices: the reflection in the -axis, , keeps and sends to , so the turn from the first column to the second is now clockwise. The area is still 1, and . Swapping the axes with , a reflection across the line , also has determinant .
A flip is harmless for undoing: flip back and you are where you started. So a negative determinant says "turned over", not "damaged". The value that does damage is the one you passed through in step 2.
Zero determinant: information is lost
Why single out zero? Because it is the one value that changes what a matrix can do: a matrix with determinant zero destroys information, and no later step can bring it back.
A collapse, step by step. Take the singular matrix from module 2's gallery, . Its second column is twice its first column , so the parallelogram on the two columns is flat and . Every output is a combination of the columns (module 2), and the second column is twice the first, so
Every output is a multiple of , so the whole plane lands on the line through . Points off that line, such as , are never reached at all.
Now look for inputs that collide. The input goes to . Adding it to any input changes nothing in the output: by linearity, for every number . For example and both land on . Each output point is hit by a whole line of inputs, and nothing in the output says which one it came from. (The widget's Singular preset, with columns and , sends the same direction to zero.)
This is no accident of the example. Zero area and lost information are the same event, seen two ways.
If two inputs collide, the area factor is 0.
- Suppose two different inputs land on the same output: but .
- Subtract the two outputs and use linearity: . So is a nonzero vector that crushes to the origin.
- Take a parallelogram with as one side and any vector off the line of as the other. It has a positive area.
- Its image has sides and . One side has length zero, so the image is flat and has area 0.
- A positive area became 0, and every area is scaled by the same factor, so that factor is 0.
If the area factor is 0, inputs collide.
- Suppose . Then the parallelogram on the two columns has no area, so it is flat: both columns lie on one line through the origin, and one is a multiple of the other.
- Say column 2 is times column 1. Then the input goes to . (If instead column 1 is times column 2, use .) For , and , the vector we found above.
- Either way a nonzero input lands on the origin, and then, exactly as in the example, and land on the same output for every and every number .
You have met this test before. In module 1's lesson on span and basis, solving for the coefficients that combine and into a target meant dividing by , and that number was zero exactly when one vector is a multiple of the other. The next section shows it is the determinant of the matrix with columns and .
A square matrix with determinant zero is called singular. The others are called invertible, because they can be undone, which a later lesson makes precise.
Now read all three cases from pictures alone: for each pair of columns, picture the two arrows and the turn from the first to the second.
Four transformations are described by where they send and . Picture each pair of arrows, and for each pair ask whether the shorter turn from the first arrow to the second is counterclockwise (as from to ) or clockwise. Which transformation flips the plane over?
Choose one answer, then check.
The formula
Reading areas off pictures works for friendly matrices like the ones so far. For any 2x2 matrix, the area has a short formula. Name the entries
Then
In words: the product of the diagonal entries, minus the product of the other two. For , , , and , so : the parallelogram spanned by the columns and has area 5. Written with columns and , the formula is module 1's .
The formula comes straight out of the picture. Draw a rectangular box around the parallelogram, and subtract the pieces of the box that lie outside the parallelogram. The picture shows the pieces for the columns and ; the box below does the subtraction in general.
The box around the parallelogram on (3, 1) and (1, 2), cut into the parallelogram and six leftover pieces. Box minus pieces is the area: 12 − 7 = 5.
Go slower: Where comes from
Draw the parallelogram with corners , , and . Take the case where all four entries are positive and the first column is less steep than the second column , so the first arrow lies below the second and the turn from the first to the second is counterclockwise. Follow along with the numbers , , , from the picture.
Step 1, a box around it. The parallelogram fits inside the rectangle from to . Multiply out its area, one product at a time: With the numbers: the box is .
Step 2, the pieces outside. The part of the box outside the parallelogram splits into six pieces:
- two right triangles with legs and : one under the first column, with corners , , , and one above the top side, with corners , , . Each has area (here );
- two right triangles with legs and : one left of the second column, with corners , , , and one right of the far side, with corners , , . Each has area (here );
- two rectangles with sides and : one in the bottom right corner of the box, from to , and one in the top left, from to . Each has area (here ).
Add them up: . With the numbers: .
Step 3, subtract. The parallelogram is the box minus the pieces: The terms cancel, and so do the terms: And : With the numbers: , and .
Other arrangements of the columns need a slightly different drawing, but the area always comes out as , the size of without its sign. The sign then records the orientation from the section on flips: swap the two columns and the formula becomes , the same size with the opposite sign.
Try the formula on a matrix with a negative entry, where the signs are easy to slip on.
Compute with the formula . Enter a whole number.
Type a number: 0.25, -2, 3/4 and sqrt(2) all work. Enter checks.
To recap the lesson: the determinant is the factor by which a transformation scales every area. Its sign says whether the plane was turned over, zero means information was lost for good, and for a 2x2 matrix it is . The next lesson computes determinants of any size: three rules about columns, a recipe for 3x3 matrices, the method software uses, and the rule for chains of transformations.
Finally, put the lesson's main point in your own words, the way you would explain it to a colleague.
Explain to a colleague, using the picture of the unit square, why a matrix with determinant 0 cannot be undone while a matrix with determinant can. No formulas needed.
Saved in this browser as you type.