Linear Transformations in Three Dimensions
The core intuition of two dimensions — “each column of a matrix is the image of a basis vector” — extends to three dimensions unchanged.
Three-dimensional space has three standard basis vectors:
Suppose the linear transformation sends the three basis vectors to:
then the 3×3 matrix is:
- Column 1 = the image of
- Column 2 = the image of
- Column 3 = the image of
For an arbitrary vector :
It is still “row times column”: the -th component of the result = the -th row of the matrix multiplied component by component with the vector and then summed.
The “grid” of three dimensions is a three-dimensional lattice. A linear transformation turns it into a parallelepiped grid:
- straight lines are preserved ✅
- parallelism and equal spacing are preserved ✅
- the origin stays fixed ✅
The intuitive effect of a three-dimensional linear transformation:
| Transformation | Matrix (example) | Effect |
|---|---|---|
| A rotation about the z-axis | turning about the z-axis | |
| Scaling in the x direction | x stretched by a factor of 2 | |
| A shear along the xy plane | offset according to the z value |
A rotation by θ about the z-axis
Check: — the direction of the x-axis after a rotation by θ about the z-axis ✓; is unchanged ✓
How to See a Three-Dimensional Transformation
In two dimensions you rely on the whole grid; in three dimensions you can imagine “a cube full of little cubes” being stretched, rotated and compressed. Many linear algebra textbooks demonstrate three-dimensional transformations with a “3D grid animation” — this is one of 3Blue1Brown’s signature techniques.
The rule for three-dimensional matrix multiplication is exactly the same as in two dimensions (row times column), and it likewise does not satisfy commutativity:
The matrix that acts first is written on the right. For example, the composite matrix for “first rotate about z, then scale” is (the scaling matrix)·(the rotation matrix).
| Field | Application |
|---|---|
| Computer graphics | the rotation, scaling and projection of 3D objects all rely on 3×3 matrices (with homogeneous coordinates handling translation) |
| Robotics | the transformation matrix of the pose of a robot arm’s end effector |
| Physics | the coordinate transformation of tensors and moments of inertia |
| Machine learning | each layer of a neural network is essentially an “affine transformation” (matrix multiplication plus a bias) |
The key trick in computer graphics: multiplying all the vertices of an object first by the “rotation matrix” and then by the “scaling matrix” lets you pre-multiply them into a single matrix, and then perform just one multiplication per vertex — which greatly improves rendering performance.
- Picture the three basis vectors pointing along the positive x, y and z axes
- Given a 3×3 matrix, look at its three columns and imagine where the three basis vectors each “fly” to
- Imagine the whole three-dimensional grid deforming along with the basis vectors
- Use “the matrix that acts first is on the right” to derive composite transformations
Core Conclusion
All the intuitions of two dimensions (column = the image of a basis vector, row times column, right first, non-commutative) hold word for word in three dimensions; only the matrix grows from 2×2 to 3×3. Grasp the single idea that “a matrix is the table recording where the basis vectors go”, and you have grasped every dimension.
Symbols Used in This Article
| Symbol | Type | Pronunciation/Explanation | Meaning in This Article |
|---|---|---|---|
| Mathematical symbol | i hat, j hat, k hat | The three unit basis vectors of three-dimensional space | |
| Mathematical symbol | 3 by 3 matrix | The 3×3 matrix recording a three-dimensional linear transformation; its three columns are the images of the three basis vectors | |
| Mathematical symbol | M times v | The three-dimensional matrix times a vector, still computed row by column | |
| Mathematical symbol | R z of theta | The rotation matrix for a rotation by about the z-axis | |
| Greek letter | Theta | The angle of the rotation about the z-axis | |
| Mathematical symbol | cos theta, sin theta | The trigonometric terms appearing in the rotation matrix | |
| Mathematical symbol | not equal | Three-dimensional composite transformations likewise do not satisfy commutativity |
