Geometric Transformations
Move a polygon around the coordinate plane with translations, rotations, reflections and dilations. Chain several together and see the single rule and matrix that does the same job.
Drag the blue vertices to reshape the original. Blue: original. Red: final image. Dashed: images after each earlier step. Black ring: centre of rotation or dilation.
Rotate 90° counterclockwise about (0, 0)
(x, y) → (−y, x)
Transformation
(x, y) → (−y, x)
2×2 matrix (linear part)
3×3 homogeneous matrix
The third column of the 3×3 matrix holds the translation, which a 2×2 matrix cannot represent. Determinant 1.
Vertex coordinates
| Original | Step 1 |
|---|---|
| A(1, 1) | A′(−1, 1) |
| B(4, 1) | B′(−1, 4) |
| C(1, 3) | C′(−3, 1) |
The four basic transformations
Translation
Rotation
Reflection
Dilation
A transformation moves every point of the plane by the same rule. The original shape is the pre-image and the result is the image; a vertex A is sent to A′ (read “A prime”), and a second step sends A′ to A″. Translations, rotations and reflections are rigid motions: the image is congruent to the original. A dilation keeps angles but scales lengths, so the image is similar.
Every one of these transformations can be written as a matrix. Rotations, reflections and dilations about the origin are 2×2 matrices. A translation is not linear (it moves the origin), so we use a 3×3 homogeneous matrix that treats the point (x, y) as (x, y, 1). Then composing transformations is just multiplying matrices.
Key formulas
Rotation by θ about the origin
(x, y) → (x cos θ − y sin θ, x sin θ + y cos θ)
- θ
- angle of rotation, counterclockwise positive
About any centre (h, k)
Translate (h, k) to the origin, apply the transformation, translate back: M = T(h, k) · R · T(−h, −k)
Composition
Do M₁ first, then M₂: the combined matrix is M₂ · M₁ (the first step sits on the right).
| Transformation | Coordinate rule | Matrix | Preserves |
|---|---|---|---|
| Translation by ⟨a, b⟩ | (x, y) → (x + a, y + b) | 3×3 only: [1 0 a; 0 1 b; 0 0 1] | Size, shape, orientation |
| Rotation 90° about origin | (x, y) → (−y, x) | [0 −1; 1 0] | Size, shape, orientation |
| Rotation 180° about origin | (x, y) → (−x, −y) | [−1 0; 0 −1] | Size, shape, orientation |
| Reflection over x-axis | (x, y) → (x, −y) | [1 0; 0 −1] | Size, shape (orientation flips) |
| Reflection over y-axis | (x, y) → (−x, y) | [−1 0; 0 1] | Size, shape (orientation flips) |
| Reflection over y = x | (x, y) → (y, x) | [0 1; 1 0] | Size, shape (orientation flips) |
| Dilation by k about origin | (x, y) → (kx, ky) | [k 0; 0 k] | Shape and angles; lengths scale by |k| |
How to use this visualizer
- 1Pick a starting shape, or drag its blue vertices to any grid point.
- 2Choose the type of Step 1 and set its parameters: the shift for a translation, the angle and centre for a rotation, the mirror line for a reflection, or the scale factor and centre for a dilation.
- 3Read the coordinate rule under each step, and compare the vertex table: every original vertex A maps to A′ by that rule.
- 4Click Add step to compose up to four transformations. Dashed outlines show the image after each earlier step; the red shape is the final image.
- 5The combined panel shows one rule and one matrix that do the whole sequence at once. Order matters: a reflection followed by a rotation is usually not the same as the rotation followed by the reflection.
Practice problems
Problem 1: Rotation about the origin
Show solutionHide solution
Rule for 90° counterclockwise: (x, y) → (−y, x)
A(1, 1) → A′(−1, 1)
B(4, 1) → B′(−1, 4)
C(1, 3) → C′(−3, 1)
A′(−1, 1), B′(−1, 4), C′(−3, 1)
Problem 2: Composing two reflections
Show solutionHide solution
Reflect over the x-axis: (x, y) → (x, −y), so P′ = (3, −2)
Reflect over the y-axis: (x, y) → (−x, y), so P″ = (−3, −2)
Matrices: [−1 0; 0 1] · [1 0; 0 −1] = [−1 0; 0 −1]
That is the rule (x, y) → (−x, −y), a rotation of 180° about the origin.
P″ = (−3, −2); equivalent to a 180° rotation about the origin
Discussion
Questions, ideas or a different approach? Join the conversation.