All Exams Test series for 1 year @ ₹349 only
Question

What is the transformation matrix M that transforms a square in the xy-plane defined by (1, 1) T, (-1, 1) T, (-1, -1) T and (1, -1) T to a parallelogram whose corresponding vertices are (2, 1) T, (0, 1) T, (-2, -1) T and (0, -1) T?

The correct answer is

M = \(\left[\begin{array}{*{20}{c}} 1&1&0\\ 0&1&0\\ 0&0&1 \end{array}\right]\)

Finding the 2D Transformation Matrix

The problem asks us to find a 2D transformation matrix, represented in 3x3 homogeneous coordinates, that maps a specific square to a specific parallelogram. We are given the coordinates of the vertices of the square and their corresponding transformed coordinates on the parallelogram.

Understanding 2D Transformations and Homogeneous Coordinates

In 2D computer graphics and geometry, transformations like translation, rotation, scaling, and shearing can be represented using matrix multiplication. To handle translation with matrix multiplication, we use homogeneous coordinates. A 2D point (x, y) is represented as a 3D vector $\begin{bmatrix} x \\ y \\ 1 \end{bmatrix}$. A 2D transformation is then performed by multiplying this vector by a 3x3 transformation matrix M:

$\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = M \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}$

For standard affine transformations, the transformation matrix M has the form:

$M = \begin{bmatrix} a & b & c \\ d & e & f \\ 0 & 0 & 1 \end{bmatrix}$

Where:

  • $\begin{bmatrix} a & b \\ d & e \end{bmatrix}$ represents linear transformations (scaling, rotation, shear).
  • $\begin{bmatrix} c \\ f \end{bmatrix}$ represents translation.

Setting up the Transformation Problem

We are given the following correspondences between the vertices of the source square and the destination parallelogram:

  • Source: (1, 1) maps to Destination: (2, 1)
  • Source: (-1, 1) maps to Destination: (0, 1)
  • Source: (-1, -1) maps to Destination: (-2, -1)
  • Source: (1, -1) maps to Destination: (0, -1)

Using homogeneous coordinates, these correspondences are:

  • $\begin{bmatrix} 1 \\ 1 \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} 2 \\ 1 \\ 1 \end{bmatrix}$
  • $\begin{bmatrix} -1 \\ 1 \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} 0 \\ 1 \\ 1 \end{bmatrix}$
  • $\begin{bmatrix} -1 \\ -1 \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} -2 \\ -1 \\ 1 \end{bmatrix}$
  • $\begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix} \rightarrow \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix}$

Let the transformation matrix be $M = \begin{bmatrix} a & b & c \\ d & e & f \\ 0 & 0 & 1 \end{bmatrix}$. Applying the transformation equation $\begin{bmatrix} x' \\ y' \\ 1 \end{bmatrix} = M \begin{bmatrix} x \\ y \\ 1 \end{bmatrix}$ to each point gives us a system of linear equations.

Solving for the Matrix Elements

For a point $(x, y)$ transforming to $(x', y')$, the transformation is:

$x' = ax + by + c$

$y' = dx + ey + f$

Let's use the four point correspondences to set up equations for the unknown elements a, b, c, d, e, and f.

Equations for the x-coordinates (finding a, b, c):

From (1, 1) → (2, 1): $a(1) + b(1) + c = 2 \implies a + b + c = 2$ (Equation 1)

From (-1, 1) → (0, 1): $a(-1) + b(1) + c = 0 \implies -a + b + c = 0$ (Equation 2)

From (-1, -1) → (-2, -1): $a(-1) + b(-1) + c = -2 \implies -a - b + c = -2$ (Equation 3)

From (1, -1) → (0, -1): $a(1) + b(-1) + c = 0 \implies a - b + c = 0$ (Equation 4)

We can solve this system:

  • Subtract Equation 2 from Equation 1: $(a + b + c) - (-a + b + c) = 2 - 0 \implies 2a = 2 \implies a = 1$.
  • Substitute $a=1$ into Equation 1: $1 + b + c = 2 \implies b + c = 1$.
  • Substitute $a=1$ into Equation 4: $1 - b + c = 0 \implies -b + c = -1$.
  • Now we have a system for b and c:
    • $b + c = 1$
    • $-b + c = -1$
  • Add these two equations: $(b + c) + (-b + c) = 1 + (-1) \implies 2c = 0 \implies c = 0$.
  • Substitute $c=0$ into $b + c = 1$: $b + 0 = 1 \implies b = 1$.

So, $a=1$, $b=1$, $c=0$. We can verify these values using Equation 3: $-a - b + c = -(1) - (1) + 0 = -2$, which matches.

Equations for the y-coordinates (finding d, e, f):

From (1, 1) → (2, 1): $d(1) + e(1) + f = 1 \implies d + e + f = 1$ (Equation 5)

From (-1, 1) → (0, 1): $d(-1) + e(1) + f = 1 \implies -d + e + f = 1$ (Equation 6)

From (-1, -1) → (-2, -1): $d(-1) + e(-1) + f = -1 \implies -d - e + f = -1$ (Equation 7)

From (1, -1) → (0, -1): $d(1) + e(-1) + f = -1 \implies d - e + f = -1$ (Equation 8)

We can solve this system:

  • Subtract Equation 6 from Equation 5: $(d + e + f) - (-d + e + f) = 1 - 1 \implies 2d = 0 \implies d = 0$.
  • Substitute $d=0$ into Equation 5: $0 + e + f = 1 \implies e + f = 1$.
  • Substitute $d=0$ into Equation 8: $0 - e + f = -1 \implies -e + f = -1$.
  • Now we have a system for e and f:
    • $e + f = 1$
    • $-e + f = -1$
  • Add these two equations: $(e + f) + (-e + f) = 1 + (-1) \implies 2f = 0 \implies f = 0$.
  • Substitute $f=0$ into $e + f = 1$: $e + 0 = 1 \implies e = 1$.

So, $d=0$, $e=1$, $f=0$. We can verify these values using Equation 7: $-d - e + f = -(0) - (1) + 0 = -1$, which matches.

Constructing the Transformation Matrix M

Putting the values of a, b, c, d, e, and f into the matrix M:

$M = \begin{bmatrix} a & b & c \\ d & e & f \\ 0 & 0 & 1 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$

This matrix corresponds to a horizontal shear transformation.

Verification

Let's quickly verify the transformation for one of the points, e.g., (1, -1):

$M \begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix} \begin{bmatrix} 1 \\ -1 \\ 1 \end{bmatrix} = \begin{bmatrix} 1(1) + 1(-1) + 0(1) \\ 0(1) + 1(-1) + 0(1) \\ 0(1) + 0(-1) + 1(1) \end{bmatrix} = \begin{bmatrix} 1 - 1 + 0 \\ 0 - 1 + 0 \\ 0 + 0 + 1 \end{bmatrix} = \begin{bmatrix} 0 \\ -1 \\ 1 \end{bmatrix}$

The transformed point is (0, -1), which matches the expected destination vertex.

The transformation matrix M is $\begin{bmatrix} 1 & 1 & 0 \\ 0 & 1 & 0 \\ 0 & 0 & 1 \end{bmatrix}$.

Revision Table: Key Concepts for 2D Transformations

Concept Description Matrix (Homogeneous)
Translation Moving an object by $(t_x, t_y)$. $\left[\begin{array}{*{20}{c}} 1&0&t_x\\ 0&1&t_y\\ 0&0&1 \end{array}\right]$
Scaling Resizing an object by $(s_x, s_y)$ around the origin. $\left[\begin{array}{*{20}{c}} s_x&0&0\\ 0&s_y&0\\ 0&0&1 \end{array}\right]$
Rotation Rotating an object by angle $\theta$ around the origin. $\left[\begin{array}{*{20}{c}} \cos\theta&-\sin\theta&0\\ \sin\theta&\cos\theta&0\\ 0&0&1 \end{array}\right]$
Shear (X-axis) Shifting points horizontally based on their y-coordinate by shear factor $sh_x$. $\left[\begin{array}{*{20}{c}} 1&sh_x&0\\ 0&1&0\\ 0&0&1 \end{array}\right]$
Shear (Y-axis) Shifting points vertically based on their x-coordinate by shear factor $sh_y$. $\left[\begin{array}{*{20}{c}} 1&0&0\\ sh_y&1&0\\ 0&0&1 \end{array}\right]$

Additional Information: Affine Transformations

The transformation matrix we found is an example of an affine transformation. Affine transformations preserve points, straight lines, and planes. They also preserve the ratios of distances along a line. However, unlike rigid transformations (translation and rotation), they do not necessarily preserve angles or lengths. The general form of a 2D affine transformation matrix in homogeneous coordinates is:

$M_{affine} = \begin{bmatrix} a & b & c \\ d & e & f \\ 0 & 0 & 1 \end{bmatrix}$

Any sequence of translations, rotations, scaling, and shearing can be combined into a single affine transformation matrix by multiplying their individual matrices. Finding the matrix as we did by solving for the parameters $(a, b, c, d, e, f)$ is a general method when you know the mapping of a few points (at least 3 non-collinear points are needed to uniquely determine a 2D affine transformation).

Was this answer helpful?

Important Questions from Matrix Algebra

  1. If A = \( \left[\begin{array}{cc}0 & 1 \\ −1 & 0\end{array}\right]\)  and (aI 2  + bA)2  = A, then
  2. If A = \(\left[\begin{array}{cc}2 & −3 \\3 & 5\end{array}\right]\), then which of the following statements are correct?

    A. A is a square matrix

    B. A−1 exists

    C. A is a symmetric matrix

    D. |A| = 19

    E. A is a null matrix

    Choose the correct answer from the options given below.

  3. If A is Square Matrix of order 3, then product of A and its transpose is

  4. Let \(A = \left[ {\begin{array}{*{20}{c}} 1&1&0\\ 0&1&0\\ 1&1&0\\ 0&0&1 \end{array}} \right]\) and  \(B = \left[ {\begin{array}{*{20}{c}} 1&0&0&0\\ 0&1&1&0\\ 1&0&1&1\\ \end{array}} \right]\) Find the boolean product A ⊙ B of the two matrices.

  5. The rank of the matrix \(\begin{bmatrix} 1 & 1 & 1 \\\ a & b & c \\\ a^2 & b^2 & c^2 \end{bmatrix}\) where a = b ≠ c is:

Need Expert Advice?

Start Your Preparation with Prepp Mobile App

Download the app from Google Play & App Store
Download the app from Google Play & App Store
Prepp Mobile App