Types of Transformation Matrix
Transformation matrices can be classified into different types based on the specific transformations they represent. Some common types of Transformation Matrix include:
- Translation Matrix
- Rotation Matrix
- Scaling Matrix
- Combined Matrix
- Reflection Matrix
- Shear Matrix
- Affine Transformation Matrix
Translation Matrix
A translation matrix is used to shift objects in a coordinate system. Let’s consider a point P(2, 3) and apply a translation of (4, -1) units.
Given point P = (2, 3) and translation vector T = (4, -1), the translation matrix is:
[Tex] \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & -1\\ 0 & 0 & 1\\ \end{pmatrix} [/Tex]
Applying the translation matrix to point P:
[Tex] \begin{pmatrix} 1 & 0 & 4\\ 0 & 1 & -1\\ 0 & 0 & 1\\ \end{pmatrix} [/Tex] [Tex] \begin{pmatrix} 2\\ 3\\ 1\\ \end{pmatrix} [/Tex] = [Tex] \begin{pmatrix} 6\\ 2\\ 1\\ \end{pmatrix} [/Tex]
Therefore, after the translation, point P(2, 3) is moved to P'(6, 2).
Rotation Matrix
A rotation matrix is used to rotate objects in a coordinate system. Let’s rotate a point Q(1, 1) by 90 degrees counterclockwise.
Given point Q = (1, 1) and rotation angle θ = 90 degrees, the rotation matrix is:
R = [Tex] \begin{pmatrix} 0 & -1\\ 1 & 0\\ \end{pmatrix} [/Tex]
Applying the rotation matrix to point Q:
[Tex]\begin{pmatrix} 0 & -1\\ 1 & 0\\ \end{pmatrix} [/Tex] [Tex]\begin{pmatrix} 1\\ 1\\ \end{pmatrix} [/Tex] = [Tex]\begin{pmatrix} -1 \\ 1\\ \end{pmatrix} [/Tex]
After the rotation, point Q(1, 1) is rotated to Q'(-1, 1).
Scaling Matrix
A scaling matrix is used to resize objects in a coordinate system. Let’s scale a rectangle with vertices A(1, 1), B(1, 3), C(3, 3), D(3, 1) by a factor of 2 in the x-direction and 3 in the y-direction.
Given rectangle ABCD and scaling factors sx = 2, sy = 3, the scaling matrix is:
S = [Tex]\begin{pmatrix} 2 & 0\\ 0 & 3\\ \end{pmatrix} [/Tex]
Applying the scaling matrix to the vertices of the rectangle:
A'(2, 3), B'(2, 9), C'(6, 9), D'(6, 3)
Combined Matrix
A combined matrix applies multiple transformations in sequence. Let’s translate a point P(1, 2) by (3, 4) and then rotate it 45 degrees counterclockwise.
Given point P = (1, 2), translation vector T = (3, 4), rotation angle θ = 45 degrees, the combined matrix is:
C = R⋅T
Applying the combined matrix to point P:
First, translate by T:
T = [Tex]\begin{pmatrix} 1 & 0 & 3\\ 0 & 1 & 4\\ 0 & 0 & 1\\ \end{pmatrix} [/Tex]
P′ = T⋅P = [Tex]\begin{pmatrix} 4\\ 6\\ 1\\ \end{pmatrix} [/Tex]
Then, rotate by R:
R = [Tex]\begin{pmatrix} cos(45) & −sin(45)\\ sin(45) & cos(45)\\ \end{pmatrix} [/Tex]
P′′ = R⋅P′ = [Tex]\begin{pmatrix} -1\\ 5\\ \end{pmatrix}[/Tex]
Reflection Matrix
A reflection matrix is used to mirror objects across a line or plane. Let’s reflect a point Q(2, 3) across the x-axis.
Given point Q = (2, 3), the reflection matrix about the x-axis is:
Rx = [Tex]\begin{pmatrix} 1 & 0\\ 0 & -1\\ \end{pmatrix} [/Tex]
Applying the reflection matrix to point Q:
Rx⋅Q = [Tex]\begin{pmatrix} 2\\ -3\\ \end{pmatrix} [/Tex]
After reflection, point Q(2, 3) is mirrored to Q'(2, -3).
Shear Matrix
A shear matrix is used to skew objects in a coordinate system. Let’s shear a rectangle with vertices A(1, 1), B(1, 3), C(3, 3), D(3, 1) in the x-direction by a factor of 2.
Given rectangle ABCD and shear factor kx = 2, the shear matrix is:
Hx = [Tex]\begin{pmatrix} 1 & 2\\ 0 & 1\\ \end{pmatrix}[/Tex]
Applying the shear matrix to the vertices of the rectangle:
A'(3, 1), B'(3, 3), C'(7, 3), D'(7, 1)
Affine Transformation Matrix
An affine transformation matrix combines linear transformations with translations. Let’s apply an affine transformation to a point P(1, 1) by scaling it by a factor of 2 in the x-direction, rotating it 30 degrees counterclockwise, and then translating it by (2, 3).
Given point P = (1, 1), scaling factor sx = 2, rotation angle θ = 30 degrees, translation vector T = (2, 3), the affine transformation matrix is:
A = R⋅S⋅T
Applying the affine transformation matrix to point P:
First, scale by S:
S = [Tex]\begin{pmatrix} 2 & 0\\ 0 & 1\\ \end{pmatrix} [/Tex]
P′ = S⋅P = [Tex]\begin{pmatrix} 2\\ 1\\ \end{pmatrix} [/Tex]
Then, rotate by R:
R = [Tex]\begin{pmatrix} cos(30) & −sin(30)\\ sin(30) & cos(30)\\ \end{pmatrix} [/Tex]
P′′ = R⋅P′ = [Tex]\begin{pmatrix} 1.732\\ 1.5\\ \end{pmatrix} [/Tex]
Finally, translate by T:
T = [Tex]\begin{pmatrix} 1 & 0 & 2\\ 0 & 1 & 3\\ 0 & 0 & 1\\ \end{pmatrix} [/Tex]
P′′′ =T⋅P′′ = [Tex]\begin{pmatrix} 3.732\\ 4.5\\ \end{pmatrix} [/Tex]
After the affine transformation, point P(1, 1)
Transformation Matrix
Transformation matrices are the core notions in linear algebra and these can help make advancements in many areas including computer graphics, image processing, and so on. Zero vectors and the corresponding unit vectors provide a compact and generalized manner of applying transformations to vectors or points in a coordinate system.
In this article, we will explore detail about transformation matrices, their basic principles, types various applications and others in detail.
Table of Content
- What is a Transformation Matrix?
- Properties of Transformation Matrix
- Types of Transformation Matrix
- Applications of Transformation Matrix
- Examples on Transformation matrix
- FAQs on Transformation matrix
Contact Us