A transformation matrix is a matrix that represents a geometric transformation using matrix multiplication.
If
is the transformed version of
Main idea
A transformation matrix tells us how space is being changed.
Depending on the matrix, it can represent:
- rotation
- scaling
- shear
- reflection
In Homogeneous Coordinates, it can also represent translation.
Best way to think about it
The easiest way to understand a transformation matrix is to see what it does to the basis vectors.
In 2D, the standard basis vectors are:
If
then
So the columns of the matrix are the transformed basis vectors.
This is the cleanest mental model:
A transformation matrix is just telling us where the basis vectors get sent.
Once you know that, you know what happens to every other vector too.
Why this works
Any vector in 2D can be written as
Then
and by linearity,
So once we know what happens to
Example: scaling
This stretches the
Example: rotation in 2D
Rotation by angle
This rotates every vector counterclockwise by
The columns show where the basis vectors go:
- first column = where
goes - second column = where
goes
Example: reflection across the x-axis
This flips the vector across the x-axis.
Important limitation
Ordinary
That means they must preserve:
- vector addition
- scalar multiplication
- the origin
So translation is not included here, because translation moves the origin.
That is exactly why Homogeneous Coordinates are introduced.
They let us extend the matrix framework so translation can be handled too.
Intuition
Transformation matrices are really a compact way of describing how a space is being reshaped.
The entries may look abstract, but the matrix is just encoding:
- where the axes go
- how lengths scale
- whether things rotate, shear, or reflect
So instead of memorizing matrices, it is better to ask:
What does this matrix do to the basis vectors?