Linear Algebra, Live
Strang §8.1 · Linear transformations

A matrix moves the whole plane

Lesson 5 ended with Q, a matrix that turns or mirrors things without stretching them. Until now we fed a matrix one input x and got one output Ax. Now feed it every point at once. Picture the plane as a sheet of graph paper. The matrix moves every point, so the whole sheet stretches, turns, slants or flips. Its lines stay straight and evenly spaced. To know the whole move, you only need to know where two arrows land: 10 lands on column 1, and 01 lands on column 2.

Lesson 6 · slide 1Transformations
A 10 = column 1     A 01 = column 2
Key ideas
  1. A matrix sends each vector v to a new vector Av. Applied to every point, it moves the whole plane.
  2. Lines stay straight, evenly spaced lines stay evenly spaced, and the origin stays fixed.
  3. Column 1 is where 10 lands. Column 2 is where 01 lands. Those two facts decide everything.
  4. Every area is multiplied by the same number. That number is the determinant, det A (defined below; its sign says whether the plane was flipped).

Think of graph paper

Pin graph paper at the origin. You may stretch, turn, slant or flip it. You may not bend, fold or tear it. Every 2 by 2 matrix does some mix of these. A matrix whose columns lie on one line (dependent columns, lesson 4) can also squash the paper flat onto a line, or onto the origin.

A slant (a shear). The graph paper moves, but its lines stay straight, parallel and evenly spaced.

Why no bending? Because A(cv + dw) = cAv + dAw. This property is what “linear” means. Each entry of Ax is a row times the vector (lesson 1, slide 3), and row·(cv + dw) = c(row·v) + d(row·w). So evenly spaced points on a line stay evenly spaced on a line:

points v + t·w (t = 0, 1, 2, …)  →  Av + t·Aw: again a line, with the same even step Aw

Two landmarks decide everything

Every point is xy = x·10 + y·01. Since A respects combinations,

Axy = x·A10 + y·A01 = x·(column 1) + y·(column 2)

Know where 10 and 01 go, and you know where every point goes. To build a matrix, choose where they land and write those as the columns.

A matrix with columns 21 and −11, the two vectors from lesson 1, slide 1. Watch 10 land on column 1 and 01 land on column 2. The letter F drawn on the paper, and every grid line, follow.

Building a rotation

To turn the plane counterclockwise by θ, move both landmarks around the unit circle. 10 is at 0°, so it lands at θ: cos θsin θ. 01 is at 90°, a quarter turn ahead of 10, so it lands a quarter turn ahead of cos θsin θ. A quarter turn counterclockwise sends any xy to −yx (check: 10 → 01 and 01 → −10). Apply it to cos θsin θ: 01 lands at −sin θcos θ. Those are the columns:

Q = cos θ−sin θsin θcos θ
For a quarter turn, θ = 90°: cos θ = 0 and sin θ = 1, so Q = 0−110. It sends 10 to 01 and 01 to −10.
Check with a picture: turn the arrow 10 a quarter turn counterclockwise and it points straight up, at 01. Turn 01 the same way and it points left, at −10. The formula agrees.
A quarter turn: 10 goes up to 01, and 01 goes left to −10.

A new number: the determinant

When the plane moves, shapes can grow or shrink. Take the little square with corners 00, 10, 01 and 11. Its area is 1. After the move it becomes a slanted box, a parallelogram. The area of that box tells you how much the matrix stretches every area. That stretch factor has a name: the determinant, written det A.

For a 2 by 2 matrix A = abcd, it is ad − bc. You first met this number in lesson 3: the test for whether a 2 by 2 matrix has an inverse. Now you can see what it measures:

  • det A = 3: every area becomes 3 times bigger.
  • det A = 1: areas stay the same, like a turn.
  • det A = 0: the square is squashed flat onto a line, so its area is 0. That is the case of dependent columns (lesson 4).
det = 2·1.5 − 1·0 = 3. The unit square becomes a parallelogram with area 3.
det = 1·1 − 2·0.5 = 0. The columns lie on one line, so the square is squashed flat: its area becomes 0.

A negative determinant means the plane was also flipped over, like turning a page face down. Slide 2 builds such a flip. A rotation has det Q = cos²θ + sin²θ = 1: it turns without stretching. The rest of this lesson (Strang's chapter 5) covers determinants fully.

Keep reading with the full course

Finish lesson 6 and you will be able to: see a matrix as a move of the plane, and build one from where two arrows land.

Still locked here:

  • The rest of this explanation
  • 4 more examples with step-by-step solutions
  • Five extra members-only problems with worked solutions

$20 once, lifetime access. Lessons 1 to 3 stay free.

Examples

Example 1 · Stretch sideways

Triple every x-coordinate, keep y: 10 → 30 and 01 → 01.

Show solutionHide solution
A = 3001    det A = 3
11 → 31. Every area becomes 3 times larger
Exercise Rotate the plane by exactly 90°. Edit the code and press Run.
slide_1.py Loading Python…
1
Output · Ctrl+Enter runs
Press Run to execute this slide's code. Ctrl+Enter works too.

Questions and comments

Stuck on something, or found a mistake? Ask here and I'll answer. You sign in with GitHub.

The full course

From Ax = b to PCA, by running it

Lessons 1 to 3 are free. Finish all eight and you will be able to:

You get: all 8 lessons with Python labs · every worked example and solution · 5 extra problems per lesson · your progress tracked · answers to your questions · every future update.

$20 once · lifetime access
Continue to checkout →

Already a member? Log in to the course