Theory of Computation & Computer Graphics — Three-Dimensional Transformation, NEC licence examination syllabus (Nepal Engineering Council).
3D Rotation: now there are THREE axes to rotate around
The topic where "which axis?" becomes just as important as "which angle?"
Rotation about Z-axis (angle θ) — same as 2D rotation, z unchanged:
[x'] [cosθ -sinθ 0 0] [x]
[y'] = [sinθ cosθ 0 0] [y]
[z'] [0 0 1 0] [z]
[1 ] [0 0 0 1] [1]
Rotation about X-axis: y and z rotate, x unchanged
Rotation about Y-axis: z and x rotate, y unchanged
(Each follows the exact same 2D rotation pattern, just applied
to the OTHER two axes while the rotation axis itself stays fixed)
about z: x and y turn, z is untouched With rz = 30 °, rx = 0 °, x' = 1.73, y' = 1.
Move rz alone and watch the blue z stub stay perfectly still — that is what 'rotation about z' means.
Rotation about an arbitrary axis — the hard version
When the rotation axis isn't one of X, Y, or Z, the standard technique is: rotate the axis (using combinations of the basic rotations above) until it ALIGNS with a coordinate axis (usually Z), perform the simple rotation there, then rotate everything back to the original orientation.
💡 Practice basic rotation about each of the three axes with simple points first — the arbitrary-axis version builds directly on being fluent with these three.
The rule that makes all three matrices memorable
Do not memorise three separate matrices. There is only one pattern: the axis you rotate about keeps its coordinate, and the other two rotate between themselves exactly as in 2D.
🔄 The same rotation, three ways
About zx and y turn, z unchanged — identical to the 2D rotation matrix with a z row bolted on.
About xy and z turn, x unchanged.
About yz and x turn, y unchanged.
Note the cycle in the third row: it is z→x, not x→z. The axes follow the order x→y→z→x, so rotation about y takes z into x. Writing that pair backwards flips the sign of both sine terms and is the single commonest error in exam answers on 3D rotation.
💡 The figure above is worth using here rather than reading past. Move the z-slider and watch the blue z-stub stay perfectly still while the cube spins around it — then move the x-slider and watch the red one hold instead. That is the whole topic in two gestures.
Properties worth stating
Rotation preserves lengths, angles and volumes; its determinant is 1. As in 2D, the inverse of a rotation is its transpose, which is far quicker than inverting a 4×4 matrix by hand — a fact examiners like to test directly.
And as in 2D, rotation is about an axis through the origin. Rotating an object about its own centre requires translating that centre to the origin first.
Syllabus points
Rotation about x, y, z axes
Rotation about an arbitrary axis (numerical)
Create a free account to tick topics off, take notes as you read, watch the video lessons and get a day-by-day study plan built around your exam date.
Related topics in Three-Dimensional Transformation