Source: Homework Set 1, Question 5
Tags: vector rotation, rotation about an axis, Euler angles, orthogonal projection, coordinate system, counterclockwise rotation, plane rotation
Difficulty: Advanced | Prerequisites: §12.1-12.5 (all vector operations, projections, cross product, planes). This topic synthesises everything from the first four sections.
Big Picture
Rotating a vector about an arbitrary axis in three dimensions is one of the most demanding problems in introductory multivariable calculus, because it requires you to chain together nearly every tool from §12.2 through §12.5: dot products, cross products, projections, orthogonal decomposition, and coordinate systems on planes. The homework builds the rotation algorithm step by step, first in the simpler case of rotating within a plane, then generalising to rotation about any axis in R³. This is a simplified version of Euler angle rotation, which is fundamental in physics, robotics, and computer graphics.
To rotate a vector w about an axis u by angle θ: decompose w into its projection along u (unchanged by rotation) and its orthogonal part (which lives in the plane perpendicular to u); rotate the orthogonal part in that plane using a 2D rotation formula with two orthonormal basis vectors; then add the projection back.
Rotation in a plane
Given orthogonal unit vectors v₁ and v₂ spanning a plane through the origin, and a vector v = c₁v₁ + c₂v₂ in that plane, the vector rotated by θ counterclockwise about the normal n = v₁ x v₂ is v̂ = c₁(cos θ v₁ + sin θ v₂) + c₂(-sin θ v₁ + cos θ v₂).
Think of it as: the standard 2D rotation matrix applied to the coordinates (c₁, c₂), then translated back into 3D using the basis vectors.
Rotation about an axis (3D)
The three-step algorithm: (1) find orth_u w (the part of w perpendicular to the axis u), (2) rotate it in the plane orthogonal to u, (3) add proj_u w back. The projection along the axis is unchanged because rotation about an axis leaves the component along that axis fixed.
Coordinate system on a plane
Two orthogonal unit vectors v₁, v₂ lying in a plane, used as basis vectors. Any vector in the plane can be written as c₁v₁ + c₂v₂.
Euler angles
A system of three angles describing any rotation of a rigid body in 3D. The homework's algorithm is a simplified version of this; the full treatment appears in physics and engineering dynamics courses.
Step-by-step: the 3D rotation algorithm
To rotate w about axis u by angle θ counterclockwise:
Compute proj_u w = ((w · u)/(u · u)) u. This component is unchanged by the rotation.
Compute orth_u w = w - proj_u w. This is the part that will rotate.
Build an orthonormal basis {v₁, v₂} for the plane perpendicular to u:
v₁ = orth_u w / |orth_u w| (normalise the orthogonal part)
v₂ = (û x v₁), where û = u/|u| is the unit vector along the axis. Check that n = v₁ x v₂ points in the direction of û (if not, negate v₂).
Express orth_u w in coordinates: orth_u w = c₁ v₁ + c₂ v₂. Since v₁ was built from orth_u w, we have c₁ = |orth_u w| and c₂ = 0.
Apply the rotation formula: orth_u ŵ = c₁(cos θ v₁ + sin θ v₂) + c₂(-sin θ v₁ + cos θ v₂) = |orth_u w|(cos θ v₁ + sin θ v₂).
Add the projection back: ŵ = orth_u ŵ + proj_u w.
Worked example: rotate w = ⟨1, 0, 1⟩ by π/4 about the z-axis (Q5a)
u = ⟨0, 0, 1⟩ (the z-axis).
proj_u w = ((1·0 + 0·0 + 1·1)/1)⟨0, 0, 1⟩ = ⟨0, 0, 1⟩.
orth_u w = ⟨1, 0, 1⟩ - ⟨0, 0, 1⟩ = ⟨1, 0, 0⟩.
v₁ = ⟨1, 0, 0⟩ (already unit length). v₂ = ⟨0, 0, 1⟩/1 x ⟨1, 0, 0⟩ = ⟨0, 1, 0⟩. Check: v₁ x v₂ = ⟨0, 0, 1⟩ = û. Good.
Coordinates: c₁ = 1, c₂ = 0.
Rotated orthogonal part: 1·(cos(π/4)⟨1,0,0⟩ + sin(π/4)⟨0,1,0⟩) = ⟨√2/2, √2/2, 0⟩.
Final: ŵ = ⟨√2/2, √2/2, 0⟩ + ⟨0, 0, 1⟩ = ⟨√2/2, √2/2, 1⟩.
Sanity check: the z-component is unchanged (as expected for rotation about the z-axis), and the xy-part has been rotated 45° counterclockwise.
Worked example outline: rotate w = ⟨3, 8, 2⟩ by 2π/3 about u = ⟨2, 1, 2⟩ (Q5b)
Compute proj_u w: w · u = 6 + 8 + 4 = 18, u · u = 9, so proj = (18/9)⟨2, 1, 2⟩ = ⟨4, 2, 4⟩.
orth_u w = ⟨3, 8, 2⟩ - ⟨4, 2, 4⟩ = ⟨-1, 6, -2⟩.
|orth_u w| = √(1 + 36 + 4) = √41.
v₁ = ⟨-1, 6, -2⟩/√41.
û = ⟨2, 1, 2⟩/3. v₂ = û x v₁. Compute this cross product.
Then apply the rotation formula with θ = 2π/3 (cos(2π/3) = -1/2, sin(2π/3) = √3/2).
Add proj_u w = ⟨4, 2, 4⟩ back to get the final answer.
Rotation in a plane (v = c₁v₁ + c₂v₂, rotated by θ about n = v₁ x v₂):
\hat{\mathbf{v}} = c_1(\cos\theta\,\mathbf{v}_1 + \sin\theta\,\mathbf{v}_2) + c_2(-\sin\theta\,\mathbf{v}_1 + \cos\theta\,\mathbf{v}_2)3D rotation of w about axis u by angle θ:
\hat{\mathbf{w}} = \text{orth}_{\mathbf{u}}\hat{\mathbf{w}} + \text{proj}_{\mathbf{u}}\mathbf{w}where orth_u ŵ is the rotated version of orth_u w in the plane perpendicular to u, and proj_u w is unchanged.
This rotation algorithm is the mathematical foundation of 3D computer graphics. Every time a game engine rotates a camera or an object, it performs exactly this kind of computation (often expressed as quaternion multiplication, which encodes the same idea more efficiently).
In robotics, rotating reference frames to track a robotic arm's joints uses the same decompose-rotate-recompose logic. Satellite attitude control relies on it too: the satellite's orientation is tracked by rotating vectors about successive axes.
Forgetting that proj_u w stays fixed. Students sometimes try to rotate the entire vector, including the component along the axis. Only the orthogonal part rotates.
Building v₂ incorrectly. The second basis vector must be computed as û x v₁ (or v₁ x û, depending on orientation convention), not chosen at random.
Mixing up the direction of rotation. Counterclockwise is defined relative to the normal n = v₁ x v₂. If your normal points opposite to u, you get a clockwise rotation instead.
Forgetting to normalise. The basis vectors v₁ and v₂ must be unit vectors for the rotation formula to work. Using unnormalised vectors scales the result incorrectly.
⚠️ This problem type synthesises projections, cross products, and plane geometry. Expect it to appear as a longer, multi-part exam question worth significant marks.
⚠️ The z-axis case (Q5a) is the one to practise first. It reduces to ordinary 2D rotation and serves as a sanity check.
⚠️ For Q5b-type problems, keep your work organised. Label every intermediate result clearly. The most common source of errors is losing track of which vector is which.
⚠️ Verify your answer: the rotated vector should have the same magnitude as the original, and its projection along the axis should be unchanged.
True or false: when rotating w about u, the component of w along u changes.
False. proj_u w is unchanged.
Fill in the blank: the rotation formula requires v₁ and v₂ to be ___ ___ vectors.
Orthogonal unit (orthonormal).
True or false: rotating ⟨1, 0, 0⟩ by π/2 about the z-axis gives ⟨0, 1, 0⟩.
True. This is a standard 90° counterclockwise rotation in the xy-plane.
Fill in the blank: to rotate the orthogonal part of w, you first need two ___ vectors spanning the plane perpendicular to u.
Orthonormal basis.
True or false: |ŵ| = |w| after rotation.
True. Rotation preserves length.
Q: Rotate w = ⟨0, 1, 0⟩ by π/2 counterclockwise about the z-axis.
A: proj_z w = ⟨0, 0, 0⟩ (no z-component). orth_z w = ⟨0, 1, 0⟩. v₁ = ⟨0, 1, 0⟩, v₂ = ⟨0, 0, 1⟩ x ⟨0, 1, 0⟩ = ⟨-1, 0, 0⟩. Wait, let us be careful: û = ⟨0, 0, 1⟩, so v₂ = û x v₁ = ⟨0, 0, 1⟩ x ⟨0, 1, 0⟩ = ⟨-1, 0, 0⟩. Rotated part: 1·(cos(π/2)⟨0,1,0⟩ + sin(π/2)⟨-1,0,0⟩) = ⟨-1, 0, 0⟩. Final: ŵ = ⟨-1, 0, 0⟩.
Q: If w is parallel to u, what happens when you rotate w about u?
A: orth_u w = 0, so there is nothing to rotate. The rotated vector is just proj_u w = w. Rotating a vector about an axis it is already aligned with does nothing.
Q: After rotating w about u, what two properties should you check to verify your answer?
A: (1) |ŵ| = |w| (rotation preserves magnitude). (2) proj_u ŵ = proj_u w (the component along the axis is unchanged).
Q: In the rotation formula v̂ = c₁(cos θ v₁ + sin θ v₂) + c₂(-sin θ v₁ + cos θ v₂), what do c₁ and c₂ represent?
A: They are the coordinates of the original vector v in the basis {v₁, v₂}. That is, v = c₁v₁ + c₂v₂.
This problem is the capstone of the homework because it uses every major tool: dot products (for projection), cross products (for building the orthonormal basis and the normal), orthogonal decomposition (for splitting the vector), and coordinate systems on planes (for applying the rotation formula).
The rotation algorithm here generalises to Rodrigues' rotation formula, which you may encounter in a linear algebra or physics course. It is also the conceptual foundation for quaternion rotation, widely used in game engines and aerospace.
In later sections of Calculus III, understanding how to work with orthonormal frames in 3D will help with the Frenet-Serret formulas for space curves.
vector rotation, rotation about an axis, 3D rotation, Euler angles, Rodrigues rotation formula, quaternion rotation, orthogonal decomposition, projection, cross product, orthonormal basis, counterclockwise, right-hand rule, rotation matrix, coordinate system on a plane, Calculus III MATH 215, Homework Set 1 Question 5