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.

Beginner
Shape:
−8−8−6−6−4−4−2−222446688A′B′C′ABC

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)

0−110

3×3 homogeneous matrix

0−10100001

The third column of the 3×3 matrix holds the translation, which a 2×2 matrix cannot represent. Determinant 1.

Vertex coordinates

OriginalStep 1
A(1, 1)A′(−1, 1)
B(4, 1)B′(−1, 4)
C(1, 3)C′(−3, 1)

The four basic transformations

Translation

Slides every point the same distance in the same direction. Nothing turns or flips.

Rotation

Turns every point through the same angle about a fixed centre. Counterclockwise is positive.

Reflection

Flips the shape over a mirror line. Each point and its image are the same distance from the line.

Dilation

Enlarges or shrinks from a centre by a scale factor k. The image is similar, not congruent, unless k = 1.

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).

TransformationCoordinate ruleMatrixPreserves
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

  1. 1
    Pick a starting shape, or drag its blue vertices to any grid point.
  2. 2
    Choose 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.
  3. 3
    Read the coordinate rule under each step, and compare the vertex table: every original vertex A maps to A′ by that rule.
  4. 4
    Click Add step to compose up to four transformations. Dashed outlines show the image after each earlier step; the red shape is the final image.
  5. 5
    The 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

Triangle ABC has A(1, 1), B(4, 1) and C(1, 3). Find the image after a rotation of 90° counterclockwise about the origin.
Show 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

Point P(3, 2) is reflected over the x-axis and then over the y-axis. Find the final image, and the single transformation that does the same thing.
Show 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.