topic badge
AustraliaVIC
Level 10

10.14 Transformations on the plane using algorithms

Lesson

Introduction

Points on a number plane that can be represented by a coordinate (x,y) can also be represented by the column matrix \begin{bmatrix} x \\ y \end{bmatrix}.

Multiple points can be represented in the one matrix. The coordinates (3,6) , (-2, 4) and (4,5) can be represented by the following matrix: \begin{bmatrix} &3 &-2 &4 \\ &6 &4 &5 \end{bmatrix}

Transform points

Representing points by column matrices is useful when we want to move all the points in the plane in certain ways. The matrix operations of addition and multiplication give us two kinds of these transformations in the plane. We follow specific algorithms to perform these operations on matrices.

Starting with the point ( x, y) we can slide the point a units in the x-direction and b units in the y-direction by adding the column matrix as shown below.\begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} x + a \\ y + b \end{bmatrix}

This kind of transformation is called a translation.

We can multiply a column matrix, representing a point, by a 2 \times 2 transformation matrix as follows. \begin{bmatrix} a & c \\ b &d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax +cy \\ bx + dy \end{bmatrix}

The algorithm for multiplying a matrix representing 3 points by a 3 \times 2 transformation matrix looks like this: \begin{bmatrix} a & c \\ b &d \end{bmatrix} \times \begin{bmatrix} A &B &C \\ X &Y &Z \end{bmatrix} = \begin{bmatrix} a A + b X &a B+b Y &a C + b z \\ c A + d X &c B + d Y &c C +d Z \end{bmatrix}

Depending on how the transformation matrix is chosen, we can use it to reflect points across any line, dilate vertically and horizontally by specified dilation factors and rotate about the origin.

Reflections of the plane in the x-axis and y-axis respectively are given by the transformation matrices: R_x = \begin{bmatrix} 1 &0 \\ 0 &-1 \end{bmatrix}, \qquad R_y = \begin{bmatrix} -1 &0 \\ 0 &1 \end{bmatrix} which we multiply the matrix of points with to find the coordinates of the reflected points.

The following matrix multiplication will dilate (stretch or squash) the point (x,y) by a factor of a with respect to the x-axis and by a factor of b with respect to the y-axis: \begin{bmatrix} a &0 \\ 0 &b \end{bmatrix} \times \begin{bmatrix} x \\ y \end{bmatrix}

If points in the plane are to be rotated anticlockwise through an angle \theta, the transformation matrix is: T_\theta = \begin{bmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \end{bmatrix} which we multiply the matrix of points with to find the coordinates of the rotated points.

Examples

Example 1

A set of three points are given in the matrix below. \begin{bmatrix} -3 &-1 &-7 \\ -4 &-8 &-2 \end{bmatrix}

They are all translated using the transformation matrix: \begin{bmatrix} 0 &0 &0 \\ 7 &7 &7 \end{bmatrix}

Calculate the coordinates of the newly translated points: \begin{bmatrix} -3 &-1 &-7 \\ -4 &-8 &-2 \end{bmatrix} + \begin{bmatrix} 0 &0 &0 \\ 7 &7 &7 \end{bmatrix} = \begin{bmatrix} ⬚ &⬚ &⬚ \\ ⬚ &⬚ &⬚ \end{bmatrix}

Worked Solution
Create a strategy

Add each pair of corresponding values in the matrices to get the new coordinates.

Apply the idea

Add each pair of the corresponding values:\begin{aligned}\begin{bmatrix} -3 &-1 &-7 \\ -4 &-8 &-2 \end{bmatrix} + \begin{bmatrix} 0 &0 &0 \\ 7 &7 &7 \end{bmatrix} &= \begin{bmatrix} -3+0 &-1+0 &-7+0 \\ -4+7 &-8+7 &-2+7 \end{bmatrix} \\ &= \begin{bmatrix} -3 &-1 &-7 \\ 3 &-1 &5 \end{bmatrix}\end{aligned}

So the coordinates of the newly translated points are: (-3,3), \,(-1,-1),\,(-7,5).

Example 2

Consider the points: A(-2, 1), B(-7, 1), C(-7, 3), D(-2, 3).

a

Plot the four points on the graph below:

-8
-7
-6
-5
-4
-3
-2
-1
x
-4
-3
-2
-1
1
2
3
4
y
Worked Solution
Create a strategy

Plot the coordinates of each point and label them with the letters.

Apply the idea
-8
-7
-6
-5
-4
-3
-2
-1
x
-4
-3
-2
-1
1
2
3
4
y
b

State the coordinates of the four points if we translated each 10 units right.

Worked Solution
Create a strategy

Moving to the right direction means adding the number of units to the x-coordinate. The y-coordinate remains the same.

Apply the idea
\displaystyle A'\displaystyle =\displaystyle (-2+10 , 1)Add 10 to x
\displaystyle =\displaystyle (8, 1)Simplify
\displaystyle B'\displaystyle =\displaystyle (-7+10 , 1)Add 10 to x
\displaystyle =\displaystyle (3, 1)Simplify
\displaystyle C'\displaystyle =\displaystyle (-7+10 , 3)Add 10 to x
\displaystyle =\displaystyle (3, 3)Simplify
\displaystyle D'\displaystyle =\displaystyle (-2+10 , 3)Add 10 to x
\displaystyle =\displaystyle (8, 3)Simplify
c

We can use a simple transformation matrix to find the location of the new points. Complete the values in the transformation matrix below. \begin{bmatrix} -2 &-7 &-7 &-2 \\ 1 &1 &3 &3 \end{bmatrix} + \begin{bmatrix} ⬚ &⬚ &⬚ &⬚ \\ ⬚ &⬚ &⬚ &⬚ \end{bmatrix} = \begin{bmatrix} 8 &3 &3 &8 \\ 1 &1 &3 &3 \end{bmatrix}

Worked Solution
Create a strategy

Fill in the transformation matrix so the top row contains the values we are adding to the x-coordinates and the bottom row contains the values we are adding to the y-coordinates.

Apply the idea

Since we add 10 units to the x-coordinates and 0 unit to the y-coordinates, the transformation matrix is: \begin{bmatrix} 10 &10 &10 &10 \\ 0 &0 &0 &0 \end{bmatrix}

The completed matrix equation is:\begin{bmatrix} -2 &-7 &-7 &-2 \\ 1 &1 &3 &3 \end{bmatrix} + \begin{bmatrix} 10 &10 &10 &10 \\ 0 &0 &0 &0 \end{bmatrix} = \begin{bmatrix} 8 &3 &3 &8 \\ 1 &1 &3 &3 \end{bmatrix}

Example 3

Consider the following:

a

By considering the two points with array: \begin{bmatrix} 1 &0 \\ 0 &1 \end{bmatrix} determine the transformation matrix that reflects points over the x-axis.

Worked Solution
Create a strategy

Reflect the points to see what their coordinates become.

Apply the idea
-2
-1
1
2
x
-2
-1
1
2
y

Plot the points (1,0) and (0,1) from the matrix.

-2
-1
1
2
x
-2
-1
1
2
y

If we reflect them about the x-axis, we see that the coordinates become: (1,0)\to(1,0) and (0,1),\to (0,-1).

The matrix that represents these points is \begin{bmatrix} 1 &0 \\ 0 &-1 \end{bmatrix}.

So the transformation matrix would be: \begin{bmatrix} 1 &0 \\ 0 &-1 \end{bmatrix}

b

Consider the points A, B, C in the graph below.

-9
-8
-7
-6
-5
-4
-3
-2
-1
x
1
2
3
4
5
6
7
8
9
y

Use the transformation matrix from part (a) to reflect the points A, B, C about the x-axis.\begin{bmatrix} 1 &0 \\ 0 &-1 \end{bmatrix} \times \begin{bmatrix} -4 &-9 &-2 \\ 9 &0 &9 \end{bmatrix} = \begin{bmatrix} ⬚ &⬚ &⬚ \\ ⬚ &⬚ &⬚ \end{bmatrix}

Worked Solution
Create a strategy

Use the following algorithm for multiplying two matrices: \begin{bmatrix} a & b \\ c &d \end{bmatrix} \times \begin{bmatrix} A &B &C \\ X &Y &Z \end{bmatrix} = \begin{bmatrix} a A + b X &a B+b Y &a C + b Z \\ c A + d X &c B + d Y &c C +d Z \end{bmatrix}

Apply the idea

\begin{aligned} \begin{bmatrix} 1 & 0 \\ 0 &-1 \end{bmatrix} \times \begin{bmatrix} -4 &-9 &-2 \\ 9 &0 &9 \end{bmatrix} &= \begin{bmatrix} 1 \times -4 + 0 \times 9 &1 \times -9+0 \times 0 &1 \times -2 + 0 \times 9 \\ 0 \times -4 + -1 \times 9 &0 \times -9 + -1 \times 0 &0 \times -2 +-1 \times 9 \end{bmatrix} \\ &= \begin{bmatrix} -4 &-9 &-2 \\-9 &0 &-9 \end{bmatrix} \end{aligned}

The reflected points are A'(-4,-9), \, B'(-9,0),\, C'(-2,-9).

c

By considering the two points with array: \begin{bmatrix} 1 &0 \\ 0 &1 \end{bmatrix} determine the transformation that will rotate points 90\degree anticlockwise.

Worked Solution
Create a strategy

Plot the given points in the matrix, rotate them 90\degree to find the new coordinates to be in the transformation matrix.

Apply the idea
-2
-1
1
2
x
-2
-1
1
2
y

Plot points A(1,0) and B(0,1).

-2
-1
1
2
x
-2
-1
1
2
y

Rotate the points 90\degree anticlockwise.

The new coordinates are A'(0,1) and B'(-1,0).

The matrix that represents these points is \begin{bmatrix} 0 &-1 \\ 1 &0 \end{bmatrix}.

So the transformation matrix would be: \begin{bmatrix} 0 &-1 \\ 1 &0 \end{bmatrix}

Reflect and check

We could have also found this matrix by using the rotation transformation matrix of T_\theta = \begin{bmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \end{bmatrix}, where \theta =90 \degree.

\displaystyle \begin{bmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \end{bmatrix}\displaystyle =\displaystyle \begin{bmatrix} \cos 90\degree &-\sin 90\degree \\ \sin 90\degree &\cos 90\degree \end{bmatrix}Substitute \theta =90 \degree
\displaystyle =\displaystyle \begin{bmatrix} 0 &-1 \\ 1 &0 \end{bmatrix}Evaluate each element
d

In part (b), we found the points A', B' C'. They are plotted in the graph below.

-9
-8
-7
-6
-5
-4
-3
-2
-1
1
2
x
-9
-8
-7
-6
-5
-4
-3
-2
-1
1
2
y

Use the transformation matrix from part (c) to rotate the points A', B', C' drawn above. \begin{bmatrix} 0 &-1 \\ 1 &0 \end{bmatrix} \times \begin{bmatrix} -4 &-9 &-2 \\ -9 &0 &-9 \end{bmatrix} = \begin{bmatrix} ⬚ &⬚ &⬚ \\ ⬚ &⬚ &⬚ \end{bmatrix}

Worked Solution
Create a strategy

Use the following algorithm for multiplying two matrices: \begin{bmatrix} a & b \\ c &d \end{bmatrix} \times \begin{bmatrix} A &B &C \\ X &Y &Z \end{bmatrix} = \begin{bmatrix} a A + b X &a B+b Y &a C + b Z \\ c A + d X &c B + d Y &c C +d Z \end{bmatrix}

Apply the idea

\begin{aligned} \begin{bmatrix} 0 &-1 \\ 1 &0 \end{bmatrix} \times \begin{bmatrix} -4 &-9 &-2 \\ -9 &0 &-9 \end{bmatrix} &= \begin{bmatrix} (0\times -4 + -1\times -9) &(0 \times -9 + -1\times 0) &(0 \times -2 + -1 \times -9) \\ (1\times -4 + 0 \times -9) &(1 \times -9 + 0 \times 0) &(1 \times -2 + 0 \times -9) \end{bmatrix} \\ &= \begin{bmatrix} 9 &0 &9 \\ -4 &-9 &-2 \end{bmatrix} \end{aligned}

Idea summary

Algorithm for multiplying 2 \times 2 matrices: \begin{bmatrix} a & c \\ b &d \end{bmatrix} \begin{bmatrix} x \\ y \end{bmatrix} = \begin{bmatrix} ax +cy \\ bx + dy \end{bmatrix}

Algorithm for multiplying 3 \times 2 matrices: \begin{bmatrix} a & c \\ b &d \end{bmatrix} \times \begin{bmatrix} A &B &C \\ X &Y &Z \end{bmatrix} = \begin{bmatrix} a A + b X &a B+b Y &a C + b z \\ c A + d X &c B + d Y &c C +d Z \end{bmatrix}

We can translate ( x, y) by a units in the x-direction and b units in the y-direction by adding the matrices:\begin{bmatrix} x \\ y \end{bmatrix} + \begin{bmatrix} a \\ b \end{bmatrix} = \begin{bmatrix} x + a \\ y + b \end{bmatrix}

Reflection matrices for reflections in the x-axis and y-axis: R_x = \begin{bmatrix} 1 &0 \\ 0 &-1 \end{bmatrix}, \qquad R_y = \begin{bmatrix} -1 &0 \\ 0 &1 \end{bmatrix}

Dilation matrix by a factor of a in the x-direction and by a factor of b in the y-direction: \begin{bmatrix} a &0 \\ 0 &b \end{bmatrix}

Rotation matrix for rotating points anticlockwise through an angle \theta:T_\theta = \begin{bmatrix} \cos \theta &-\sin \theta \\ \sin \theta &\cos \theta \end{bmatrix}

Outcomes

VCMNA334

Implement algorithms using data structures in a general-purpose programming language

What is Mathspace

About Mathspace