ViewWiki

The world, a little closer

Vectors and transformations.

Every shape a computer draws is moved by a matrix. Push two arrows and the whole grid follows, and one number says how much every area changes.

Explore the scene Interactive article

01 / The experiment

Move two arrows, move the whole plane.

Push Stretch down to flatten and then flip the grid, add some Shear and Turn, then slide Apply the transformation from Before to After to watch the grid move.

Still of the Vectors and transformations 3D scene, which explores: How can four numbers move every point of a flat plane at once?
Interactive scene

Loading the interactive version…

The explanation below is available while the scene loads.

The matrix is a turn times a stretch-and-shear: M = R(turn) · [[stretch, shear], [0, 1]]. Every grid line, arrow and corner is computed from it exactly, and det M equals the stretch.Three sliders cannot set four numbers freely. They reach every kind of flat linear map (turns, stretches, shears, flips and flattenings) but not every possible matrix.

02 / Three matrices

Lean, flatten, flip.

The same grid, unit square and letter F under three matrices. The dashed F is where it started.

Slanted type01

Shear

Each row slides sideways by its height. Squares lean into slanted boxes, but each box keeps the same area.

Matrix
[1 1; 0 1]
det M
1
Area
Unchanged
Orientation
Kept
A shadow02

Flatten

Every point drops straight onto the x axis, like a shadow at noon. Many points land on one spot, so nothing can undo it.

Matrix
[1 0; 0 0]
det M
0
Area
Squashed to 0
Orientation
Lost
A mirror03

Flip

Left and right swap, as in a mirror. Areas stay the same size, but the F now reads backwards: the determinant is negative.

Matrix
[−1 0; 0 1]
det M
−1
Area
Unchanged
Orientation
Reversed
The big idea

A matrix's columns are where the two unit arrows land, and the whole grid follows them. Its determinant is the factor by which every area changes, negative when the plane is flipped.

det M = ad − bc

A grid that moves

Picture the squared grid of graph paper printed on a sheet of rubber. Grab it and pull: the squares stretch. Push the top edge sideways while holding the bottom still: the squares lean over into slanted boxes. Turn the sheet: everything rotates together. Through all of this the lines stay straight, the lines that were parallel stay parallel, and the spacing along each line stays even.

A move with those properties, which also keeps the centre point fixed, is called a linear transformation. In the Scene the engraved grid on the slate is the plane before the move, and the glowing rods are the same grid after it.

Where the two arrows land

Because straight, evenly spaced lines stay straight and evenly spaced, the whole move is settled by where two arrows end up: î, one step along the x axis (pink), and ĵ, one step up the y axis (blue). Any point is “so many î and so many ĵ”, so after the move it is the same number of the new î plus the same number of the new ĵ.

Write the new î as a column of two numbers, and the new ĵ as a second column beside it. That 2 × 2 table is the matrix of the move. The card on the board prints it live: its left column is where î went and its right column is where ĵ went. Multiplying a point’s coordinates by the matrix just carries out “so many of each column”.

Stretch, shear and turn

The Scene builds its matrix from three plain moves, done in this order:

  • Stretch pulls î along the x axis. A value of 2 doubles it, a value between 0 and 1 shrinks it, 0 squashes it to nothing and a negative value turns it round to point the other way.
  • Shear slides each row of the grid sideways in proportion to its height, so ĵ leans over while the floor stays put.
  • Turn rotates everything about the centre.

Doing one move after another is itself a single linear move, and its matrix is the product of the separate matrices. The card shows that product as four numbers.

The determinant: how much area changes

Look at the amber tile on the board. It is the image of the unit square, the square between î and ĵ, and it becomes a parallelogram. Every other square of the grid becomes an identical copy of it, so every area in the plane is scaled by the same factor. That factor is the determinant. For a matrix with top row a, b and bottom row c, d it is ad − bc.

A turn and a shear never change area: the leaning boxes are as big as the squares they came from. So in this Scene the determinant is exactly the Stretch value.

  • Bigger than 1: areas grow.
  • Between 0 and 1: areas shrink.
  • Zero: the plane is squashed onto a single line, and no move can undo it, because many points have landed on the same spot.
  • Negative: the plane has been flipped, like a picture seen in a mirror. The size of the number is still the area factor; the minus sign says the orientation has reversed. The letter F reads backwards, and the Scene turns the acrylic F over so its violet back faces you.

Try it: slide Stretch to −1-1⁠ and see the F come back violet side up, reading backwards. Then set it to 00⁠ and slide Apply the transformation from Before to After: the grid folds down onto one line as the determinant reaches 0.

Back to the experiment

Sliding Apply the transformation from Before to After grows the turn by angle and the stretch and shear steadily, so you can watch a flip pass through the flattened state on its way: the area shrinks to zero and comes back out the other side.

Where matrices turn up

Determinants were studied before matrices were, by Seki Takakazu in Japan and Gottfried Leibniz in Europe in the late 1600s, as a way of solving several equations at once. James Joseph Sylvester coined the word “matrix” in 1850, and Arthur Cayley worked out how to multiply them in 1858.

Today a graphics card multiplies matrices all the time: every corner of every shape in a video game is moved, turned and projected onto the screen by them, in three dimensions with slightly larger tables. The same arithmetic straightens photos, fits robot arms to their targets and runs inside the models that recognise images.

What this model leaves out

The board is flat, so it shows only 2 × 2 matrices; space needs 3 × 3, and a computer adds a fourth row and column so that sliding shapes along can be a matrix too. A real linear move never shifts the centre point, so sliding is left out here. The three sliders reach every kind of move and every area factor from −2 to 2, but not every possible matrix. The grid is drawn only out to the edges of the slate, though the real plane goes on forever. The F’s violet back is a visual device: a flip in the plane does not literally lift the plane off the board.

Reuse with credit to ViewWiki and a link to this page.

04 / Learn this in a course

Practise it, step by step.

These 2 lessons teach the topic with checked questions, in course order.

  1. Matrices that move the plane Mathematics · Vectors and transformations
  2. The determinant Mathematics · Vectors and transformations