A transformation matrix is a square matrix that, when multiplied by a vector, transforms the vector into a new coordinate system. Given a transformation matrix T and a vector v, the transformation is expressed as:
where is the transformed vector.
Types of Transformation Matrices
1. Identity Matrix (No Transformation)
The identity matrix leaves the vector unchanged:
For any vector , applying results in .
2. Scaling Transformation
Scaling changes the size of an object without altering its shape. The transformation matrix for scaling in 2D is:
where and are scaling factors along the x- and y-axes, respectively.
3. Rotation Transformation
Rotation transforms a point around the origin by an angle . The rotation matrix is:
4. Reflection Transformation
Reflection flips a point across a specific axis. Common reflection matrices include:
Reflection across the -axis:
Reflection across the -axis:
Reflection across the line :
Reflection across the line :
5. Shear Transformation
Shearing distorts an object by shifting its points in a direction parallel to an axis.
Horizontal shear:
Vertical shear:
where is the shear factor.
6. Translation Transformation
Translation moves an object without rotating or resizing it. Unlike other transformations, translation is often represented using homogeneous coordinates:
where and are translation distances along the -axis and -axis.