![]() |
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?A transformation matrix is a square matrix, which represents a linear transformation in vector space. It transforms (from one) coordinated system to a (different) system by keeping the nature of that space identical. Therefore, it functions by keeping the linearity attribute of the space. Alternatively, it is a linear transformation in which the matrix carries the coefficients making it easier to compute and change the geometrical objects. ![]() Transformation Matrix For illustration, look at a 2D coordinate system with coordinate vectors i and j. A transformation matrix T can be utilized to take a vector v = (x, y) and transform it to a vector w = (x’, y’) which forms a new coordinate system. The transformation matrix T consists of the coefficients that determine the directions that in the basis vector i and j are transformed to and these coefficients are used to find the vector w. Properties of Transformation MatrixVarious properties of the Transformation Matrix are:
Types of Transformation MatrixTransformation matrices can be classified into different types based on the specific transformations they represent. Some common types of Transformation Matrix include:
Translation MatrixA 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 MatrixA 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 MatrixA 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 MatrixA 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 MatrixA 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 MatrixA 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 MatrixAn 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) Applications of Transformation MatrixTransformation matrices have numerous applications in various fields, including:
ConclusionTransformation matrix is a great tool for linear algebra, it is a compact and convenient way to realize and implement various transformations to both vectors and points. It is possible to move figures by merely recognizing different transformation matrices and their properties. It is possible to generate interior scenes intricately and also to solve problems of different fields by transforming objects. The applications of transformation matrices extend beyond the examples mentioned here, making them an essential concept in mathematics and its applications. Read More: Examples on Transformation matrixExample 1: Find the new matrix after transformation using the transformation matrix [Tex]\begin{pmatrix} 2 & -3\\ 1 & 2\\ \end{pmatrix} [/Tex]on the vector A = 5i + 4j. Solution:
Example 2: Find the value of the constant ‘a’ in the transformation matrix [Tex]\begin{pmatrix} 1 & a\\ 0 & 1\\ \end{pmatrix}[/Tex] , which has transformed the vector A = 3i + 2j to another vector B = 7i + 2j. Solution:
FAQs on Transformation matrixWhat is a Transformation Matrix?
How to Apply a Transformation Matrix?
What are Basic Elementary Operations of a Matrix?
Is Transformation Matrix Left or Right?
What is the Range of a Transformation Matrix?
|
Reffered: https://www.geeksforgeeks.org
Mathematics |
Related |
---|
![]() |
![]() |
![]() |
![]() |
![]() |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 13 |