Source codeVideos

Command Palette

Search for a command to run...

Geometric Transformation

Composite Transformation Matrix

Composition of Transformations Using Matrices

In geometry, a transformation is an operation that moves or changes the shape of an object. When multiple transformations are applied sequentially to an object, this is called a composition of transformations.

We can use matrices to represent many geometric transformations and also to find the result of the composition of these transformations.

We will focus on transformations that can be represented by 2×22 \times 2 matrices. For example, reflection across the X-axis can be represented by the matrix (1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}. If the point (x,y)(x,y) is reflected across the X-axis, its image can be found by multiplying this matrix by the position vector of the point: (1001)(xy)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix}.

Here are some basic transformations along with their matrices that are often used in the composition of transformations:

  1. Reflection across the X-axis: (1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}
  2. Reflection across the Y-axis: (1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}
  3. Reflection across the line y=xy=x: (0110)\begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
  4. Reflection across the line y=xy=-x: (0110)\begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}
  5. Reflection across the origin O(0,0)O(0,0) (equivalent to a 180180^\circ rotation): (1001)\begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}
  6. Rotation about the origin (0,0)(0,0) by an angle θ\theta: (cosθsinθsinθcosθ)\begin{pmatrix} \cos \theta & -\sin \theta \\ \sin \theta & \cos \theta \end{pmatrix}
  7. Dilation about the origin (0,0)(0,0) with a scale factor kk: (k00k)\begin{pmatrix} k & 0 \\ 0 & k \end{pmatrix}

Operating Composition of Transformations Using Matrices

Composition of transformations means performing several transformations in sequence. If transformation T1T_1 is followed by transformation T2T_2, we denote it as T2T1T_2 \circ T_1. This means T1T_1 is applied first, then its result is transformed by T2T_2.

Suppose the matrix corresponding to T1T_1 is M1M_1, and the matrix corresponding to T2T_2 is M2M_2. To find the image of point P(x,y)P(x,y) under the composition T2T1T_2 \circ T_1, there are two equivalent methods:

  1. Applying Transformations Sequentially to the Point:

    • Calculate the image P(x,y)P'(x',y') of P(x,y)P(x,y) under T1T_1: (xy)=M1(xy)\begin{pmatrix} x' \\ y' \end{pmatrix} = M_1 \begin{pmatrix} x \\ y \end{pmatrix}.
    • Then, calculate the image P(x,y)P''(x'',y'') of P(x,y)P'(x',y') under T2T_2: (xy)=M2(xy)\begin{pmatrix} x'' \\ y'' \end{pmatrix} = M_2 \begin{pmatrix} x' \\ y' \end{pmatrix}.

    If we substitute step (a) into (b), we get: (xy)=M2(M1(xy))\begin{pmatrix} x'' \\ y'' \end{pmatrix} = M_2 \left( M_1 \begin{pmatrix} x \\ y \end{pmatrix} \right).

  2. Finding the Composite Matrix First:

    • Determine the matrix MM that represents the composite transformation T2T1T_2 \circ T_1. This matrix is the product M2M1M_2 M_1.

      Note the order: the matrix of the second transformation (M2M_2) is multiplied from the left by the matrix of the first transformation (M1M_1).

    • Calculate the image P(x,y)P''(x'',y'') of P(x,y)P(x,y) using the composite matrix MM: (xy)=M(xy)=(M2M1)(xy)\begin{pmatrix} x'' \\ y'' \end{pmatrix} = M \begin{pmatrix} x \\ y \end{pmatrix} = (M_2 M_1) \begin{pmatrix} x \\ y \end{pmatrix}.

Both methods yield the same final image due to the associative property of matrix multiplication, i.e., M2(M1P)=(M2M1)PM_2 (M_1 P) = (M_2 M_1) P, where PP is the column vector (xy)\begin{pmatrix} x \\ y \end{pmatrix}.

Illustrative Example:

Suppose T1T_1 is a reflection across the Y-axis, and T2T_2 is a rotation about the origin OO by 12π\frac{1}{2}\pi radians (9090^\circ). We want to find the image of point P(x,y)P(x,y) under T2T1T_2 \circ T_1.

The matrix for T1T_1 (reflection across Y-axis) is M1=(1001)M_1 = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}.

The matrix for T2T_2 (rotation 9090^\circ) is M2=(cos90sin90sin90cos90)=(0110)M_2 = \begin{pmatrix} \cos 90^\circ & -\sin 90^\circ \\ \sin 90^\circ & \cos 90^\circ \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}.

Method 1: Sequential Transformation on the Point

  • Image of P(x,y)P(x,y) under T1T_1:

    (xy)=M1(xy)=(1001)(xy)=(xy)\begin{pmatrix} x' \\ y' \end{pmatrix} = M_1 \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} -x \\ y \end{pmatrix}

    So P(x,y)P'(-x,y).

  • Image of P(x,y)P'(-x,y) under T2T_2:

    (xy)=M2(xy)=(0110)(xy)=((0)(x)+(1)(y)(1)(x)+(0)(y))=(yx)\begin{pmatrix} x'' \\ y'' \end{pmatrix} = M_2 \begin{pmatrix} x' \\ y' \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} -x \\ y \end{pmatrix} = \begin{pmatrix} (0)(-x)+(-1)(y) \\ (1)(-x)+(0)(y) \end{pmatrix} = \begin{pmatrix} -y \\ -x \end{pmatrix}
  • The final image is P(y,x)P''(-y,-x).

Method 2: Composite Matrix First

  • Composite matrix M=M2M1M = M_2 M_1:

    M=(0110)(1001)=((0)(1)+(1)(0)(0)(0)+(1)(1)(1)(1)+(0)(0)(1)(0)+(0)(1))=(0110)M = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} (0)(-1)+(-1)(0) & (0)(0)+(-1)(1) \\ (1)(-1)+(0)(0) & (1)(0)+(0)(1) \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}
  • Image of P(x,y)P(x,y) under MM:

    (xy)=M(xy)=(0110)(xy)=((0)(x)+(1)(y)(1)(x)+(0)(y))=(yx)\begin{pmatrix} x'' \\ y'' \end{pmatrix} = M \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} x \\ y \end{pmatrix} = \begin{pmatrix} (0)(x)+(-1)(y) \\ (-1)(x)+(0)(y) \end{pmatrix} = \begin{pmatrix} -y \\ -x \end{pmatrix}
  • The final image is P(y,x)P''(-y,-x).

Both methods give the same result. Using the composite matrix (M2M1M_2 M_1) is often more efficient if we need to transform many points with the same composition.

Composite Matrix Rule

Suppose the matrices related to transformations T1T_1 and T2T_2 are M1=(pqrs)M_1 = \begin{pmatrix} p & q \\ r & s \end{pmatrix} and M2=(tuvw)M_2 = \begin{pmatrix} t & u \\ v & w \end{pmatrix} respectively.

Then, the matrix related to the composition of transformations T2T1T_2 \circ T_1 (Transformation T1T_1 followed by T2T_2) is M2M1=(tuvw)(pqrs)M_2 M_1 = \begin{pmatrix} t & u \\ v & w \end{pmatrix} \begin{pmatrix} p & q \\ r & s \end{pmatrix}.

Remember that the order of matrix multiplication is important. The matrix for the transformation performed first (M1M_1) is written on the right.

Application Examples

Composition of Two Reflections

Determine the image of the point (2,5)(2,5) reflected across the X-axis and then reflected across the Y-axis.

Alternative Solution:

Let T1T_1 be the reflection across the X-axis, and T2T_2 be the reflection across the Y-axis.

The matrix for T1T_1 (M1M_1) is (1001)\begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}.

The matrix for T2T_2 (M2M_2) is (1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}.

The composition of transformations T2T1T_2 \circ T_1 has the matrix M=M2M1M = M_2 M_1.

M=(1001)(1001)=((1)(1)+(0)(0)(1)(0)+(0)(1)(0)(1)+(1)(0)(0)(0)+(1)(1))=(1001)M = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} (-1)(1)+(0)(0) & (-1)(0)+(0)(-1) \\ (0)(1)+(1)(0) & (0)(0)+(1)(-1) \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}

The image of the point (2,5)(2,5) is:

(xy)=M(25)=(1001)(25)=((1)(2)+(0)(5)(0)(2)+(1)(5))=(25)\begin{pmatrix} x' \\ y' \end{pmatrix} = M \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} (-1)(2)+(0)(5) \\ (0)(2)+(-1)(5) \end{pmatrix} = \begin{pmatrix} -2 \\ -5 \end{pmatrix}

So, the image of the point is (2,5)(-2,-5).

Composition of Reflection and Rotation

Determine the image of the point (2,3)(-2,3) transformed by the composition of a reflection across the Y-axis followed by a 180180^\circ rotation about the origin.

Alternative Solution:

Let T1T_1 be the reflection across the Y-axis, and T2T_2 be the 180180^\circ rotation about the origin.

The matrix for T1T_1 (M1M_1) is (1001)\begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}.

The matrix for T2T_2 (M2M_2) is (cos180sin180sin180cos180)=(1001)\begin{pmatrix} \cos 180^\circ & -\sin 180^\circ \\ \sin 180^\circ & \cos 180^\circ \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}.

The composition of transformations T2T1T_2 \circ T_1 has the matrix M=M2M1M = M_2 M_1.

M=(1001)(1001)=((1)(1)+(0)(0)(1)(0)+(0)(1)(0)(1)+(1)(0)(0)(0)+(1)(1))=(1001)M = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} (-1)(-1)+(0)(0) & (-1)(0)+(0)(1) \\ (0)(-1)+(-1)(0) & (0)(0)+(-1)(1) \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

The image of the point (2,3)(-2,3) is:

(xy)=M(23)=(1001)(23)=((1)(2)+(0)(3)(0)(2)+(1)(3))=(23)\begin{pmatrix} x' \\ y' \end{pmatrix} = M \begin{pmatrix} -2 \\ 3 \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} -2 \\ 3 \end{pmatrix} = \begin{pmatrix} (1)(-2)+(0)(3) \\ (0)(-2)+(-1)(3) \end{pmatrix} = \begin{pmatrix} -2 \\ -3 \end{pmatrix}

So, the image of the point is (2,3)(-2,-3).

Composition of Three Transformations

Suppose you want to perform three transformations on a point P(2,5)P(2,5), namely reflection across the X-axis, rotation 9090^\circ about the origin, and a half turn (180180^\circ rotation about the origin). Determine its image!

Alternative Solution:

Let:

  • T1T_1: Reflection across the X-axis.

    Matrix M1=(1001)M_1 = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

  • T2T_2: Rotation 9090^\circ about the origin.

    Matrix M2=(cos90sin90sin90cos90)=(0110)M_2 = \begin{pmatrix} \cos 90^\circ & -\sin 90^\circ \\ \sin 90^\circ & \cos 90^\circ \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}

  • T3T_3: Half turn (180180^\circ rotation about the origin).

    Matrix M3=(cos180sin180sin180cos180)=(1001)M_3 = \begin{pmatrix} \cos 180^\circ & -\sin 180^\circ \\ \sin 180^\circ & \cos 180^\circ \end{pmatrix} = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}

The composition of transformations is T3T2T1T_3 \circ T_2 \circ T_1. Its matrix is M=M3M2M1M = M_3 M_2 M_1.

M2M1=(0110)(1001)=((0)(1)+(1)(0)(0)(0)+(1)(1)(1)(1)+(0)(0)(1)(0)+(0)(1))=(0110)M_2 M_1 = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} (0)(1)+(-1)(0) & (0)(0)+(-1)(-1) \\ (1)(1)+(0)(0) & (1)(0)+(0)(-1) \end{pmatrix} = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}
M=M3(M2M1)=(1001)(0110)=((1)(0)+(0)(1)(1)(1)+(0)(0)(0)(0)+(1)(1)(0)(1)+(1)(0))=(0110)M = M_3 (M_2 M_1) = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} = \begin{pmatrix} (-1)(0)+(0)(1) & (-1)(1)+(0)(0) \\ (0)(0)+(-1)(1) & (0)(1)+(-1)(0) \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix}

The image of P(2,5)P(2,5) is:

(xy)=M(25)=(0110)(25)=((0)(2)+(1)(5)(1)(2)+(0)(5))=(52)\begin{pmatrix} x' \\ y' \end{pmatrix} = M \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ -1 & 0 \end{pmatrix} \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} (0)(2)+(-1)(5) \\ (-1)(2)+(0)(5) \end{pmatrix} = \begin{pmatrix} -5 \\ -2 \end{pmatrix}

So, the image of the point is (5,2)(-5,-2).

Exercise

Suppose we want to perform three transformations on a point P(2,5)P(2,5), namely reflection across the Y-axis, rotation 180180^\circ about the origin, and reflection across the line y=xy=x. Determine its image!

Answer Key

Let:

  • T1T_1: Reflection across the Y-axis.

    Matrix M1=(1001)M_1 = \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix}.

  • T2T_2: Rotation 180180^\circ about the origin.

    Matrix M2=(1001)M_2 = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix}.

  • T3T_3: Reflection across the line y=xy=x .

    Matrix M3=(0110)M_3 = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix}

The composition of transformations is T3T2T1T_3 \circ T_2 \circ T_1. Its matrix is M=M3M2M1M = M_3 M_2 M_1.

Step 1: Calculate M2M1M_2 M_1.

M2M1=(1001)(1001)=((1)(1)+(0)(0)(1)(0)+(0)(1)(0)(1)+(1)(0)(0)(0)+(1)(1))=(1001)M_2 M_1 = \begin{pmatrix} -1 & 0 \\ 0 & -1 \end{pmatrix} \begin{pmatrix} -1 & 0 \\ 0 & 1 \end{pmatrix} = \begin{pmatrix} (-1)(-1)+(0)(0) & (-1)(0)+(0)(1) \\ (0)(-1)+(-1)(0) & (0)(0)+(-1)(1) \end{pmatrix} = \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix}

Step 2: Calculate M=M3(M2M1)M = M_3 (M_2 M_1).

M=(0110)(1001)=((0)(1)+(1)(0)(0)(0)+(1)(1)(1)(1)+(0)(0)(1)(0)+(0)(1))=(0110)M = \begin{pmatrix} 0 & 1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 1 & 0 \\ 0 & -1 \end{pmatrix} = \begin{pmatrix} (0)(1)+(1)(0) & (0)(0)+(1)(-1) \\ (1)(1)+(0)(0) & (1)(0)+(0)(-1) \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix}

The image of P(2,5)P(2,5) is:

(xy)=M(25)=(0110)(25)=((0)(2)+(1)(5)(1)(2)+(0)(5))=(52)\begin{pmatrix} x' \\ y' \end{pmatrix} = M \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} 0 & -1 \\ 1 & 0 \end{pmatrix} \begin{pmatrix} 2 \\ 5 \end{pmatrix} = \begin{pmatrix} (0)(2)+(-1)(5) \\ (1)(2)+(0)(5) \end{pmatrix} = \begin{pmatrix} -5 \\ 2 \end{pmatrix}

So, the image of the point is (5,2)(-5,2).