In a recent post, I covered how we can use transformation matrices to perform arbitrary transforms, although it was more about the API than the math.

I felt an interactive representation could help us understand them better.

Basically, a transformation matrix is a 3x4 matrix where:

  • The last column represents the location of object in global coordinates.

  • The first three columns each represent the transformed unit vectors of the object’s local coordinates (XYZ from left to right).

But we have a 4x4 matrix. Why do we have an extra row?

The last row is present to ensure the matrix is compatible with matrix multiplication when using homogeneous coordinates, which is a topic for another day. :)

But for now, let’s keep it simple and assume it’s always gonna be (0, 0, 0, 1) and doesn’t affect our transformations.

With that in mind, notice any patterns in video when we perform certain transformations?

Play around the cube in this blend file and see for yourself how various transformations like translation, rotation and scale affect the Transformation Matrix.