An affine transformation is any transformation that preserves:
- collinearity (i.e., all points lying on a line initially still lie on a line after transformation) and
- ratios of distances
That’s the textbook line. Here’s the truth behind it: an affine transformation is a linear transformation that’s allowed to move the origin. Stretch, rotate, shear, flip, and then slide the whole picture somewhere else.
The core idea, in plain words
A linear map must send the origin to the origin. That’s too strict for everyday geometry: simply sliding a drawing two centimetres to the right isn’t linear, because the origin moves. So we allow one extra term:
where is a matrix (the linear part) and is a fixed vector (the shift, or translation).
That’s it. And the two promises at the top of the page follow:
- Lines stay lines (collinearity): the points go to , another line.
- Ratios along a line survive: the midpoint of a segment goes to the midpoint of the image segment. Parallel lines stay parallel.
What is not promised: lengths and angles. A shear turns squares into slanted parallelograms. (When lengths are kept too, it’s called an isometry, the rigid motions, as on the Topology page.)
An everyday analogy: a projector on a wall
Put a slide in an old overhead projector. Adjust the zoom, rotate the slide, tilt the image sideways as a shear, and slide the whole thing across the wall. Straight lines on the slide stay straight on the wall, parallel lines stay parallel, and the middle of a line stays in the middle. That’s affine. What an affine map can’t do is the keystone effect you get when the projector points up at an angle, where parallel lines start to converge. That’s a projective map, one level further out.
A worked example: rotate about a point other than the origin
Rotate the plane 90° anticlockwise about the point . The trick: slide to the origin, rotate, slide back.
The rotation matrix is . So
, so and
Check: . The centre stays put. ✔ And : the point one step to the right of the centre swings to one step above it. ✔
Here’s a beautiful trick computer graphics uses every frame. Write a point as , with an extra 1 on the end. Then the affine map becomes one matrix:
Translation, which wasn’t linear, has become linear one dimension up. Chaining moves is now just multiplying matrices.
A picture in words: graph paper on a sliding rubber sheet
Draw a square grid on a rubber sheet pinned to a table. A linear map stretches and turns the sheet with the pin held fixed. An affine map lets you also pull the pin out and slide the whole sheet. Either way the grid stays a grid of identical parallelograms, every square becomes the same slanted shape, and the area of every one is scaled by .
graph LR I["Isometries: keep distances"] --> A["Affine: keep lines and ratios"] L["Linear: keep the origin too"] --> A A --> P["Projective: keep lines only"] P --> H["Homeomorphisms: keep only nearness"]
Common misconceptions
- " is linear." It’s affine. Its graph is a straight line, but and .
- “Affine maps keep shapes.” They keep lines and ratios along lines, not angles or lengths. Circles become ellipses.
- “Affine maps keep all ratios of distances.” Only ratios along the same line (or parallel lines). Under a stretch in one direction, two equal segments pointing different ways can end up different lengths.
- “Composition of affine maps is messy.” It’s another affine map: . The invertible ones form a Group.
How it connects
- Down to Linear Operators and Matrices and Vector Spaces: affine = linear + shift.
- Sideways to Topology, which keeps even less (only nearness), and to Group Actions: the affine group acts on the plane.
- Up to Inner Product Spaces, where the affine maps with orthogonal are the rigid motions.
- Out to Math on Computers: every game, map app and photo editor runs on and affine matrices.
The truth revealed: geometry without a fixed origin is still linear algebra. You just have to look one dimension higher.
