5 Computing Transformations with Matrices
This chapter covers
- Writing a linear transformation as a matrix.
- Multiplying matrices to compose and apply linear transformations.
- Understanding linear functions accepting and outputting vectors of different dimensions.
- Translating vectors in 2D or 3D with matrices.
In the culmination of Chapter 4, you learned quite a big idea: any linear transformation in 3D can be specified by just three vectors, or nine numbers total. Rotation by any angle about any axis, reflection across any plane, projection onto any plane, or scaling by any factor in any direction: any of these can be achieved by the right selection of nine numbers.
We could describe a linear transformation as “rotation counterclockwise by 90 degrees about the z-axis,” or we could describe it using the right nine numbers. Either way, we get an imaginary “machine” that behaves the same way: taking 3D vectors as inputs and producing rotated 3D vectors as outputs. The implementations might be different, but the “machines” would produce indistinguishable results.