On this page
You can point a drone or a spacecraft in any direction with three turns. That idea, Euler angles, runs from physics problems to the Apollo guidance platforms. It also hides a trap called gimbal lock.
What are Euler angles?
Euler angles are three angles that specify a general rotation as a product of three rotation matrices (Wolfram MathWorld, Euler Angles). By Euler's rotation theorem any rotation can be written this way, in several conventions depending on the axes used (same source).
For aircraft the usual names are yaw, pitch and roll. Put the x-axis along the nose, the y-axis along the left wing and the z-axis straight up:
Yaw (ψ) turns about the vertical z-axis: the nose swings left or right.
Pitch (θ) turns about the wing axis y: the nose goes up or down.
Roll (φ) turns about the nose axis x: one wing dips.
In one common convention the full rotation matrix is the product R = Rz(ψ) · Ry(θ) · Rx(φ), where each factor is the standard 3 × 3 matrix for a turn about one axis. Read left to right, each turn is about the plane's own, already-turned axes: yaw, then pitch, then roll. Each column shows where one axis lands; see how a change of basis matrix works.
Why does the order of rotations matter?
Matrix multiplication does not commute. Start level and make two 90° turns in both orders, each about the plane's own axes.
Yaw left 90°, then pitch nose-up 90°. After the yaw the nose points left. Pitching up about the plane's own wing axis lifts the nose: it ends pointing straight up.
Pitch nose-up 90°, then yaw left 90°. After the pitch the nose points straight up, and the plane's own vertical axis now lies flat, pointing backwards. Yawing about that axis swings the nose back down to the horizon: it ends pointing left.
Same two turns, and the nose ends up 90° apart. In vectors, the nose (1, 0, 0) goes to (0, 0, 1) in the first order and to (0, 1, 0) in the second. With these axes a nose-up pitch is a negative turn about y, so multiplying Rz(90°) and Ry(−90°) both ways gives the same two answers. So every Euler-angle formula must state its order and its signs.
What is gimbal lock?
Set pitch to 90° in R = Rz(ψ) · Ry(θ) · Rx(φ) and multiply out. Every entry now depends only on the difference φ − ψ. The top row becomes (0, sin(φ − ψ), cos(φ − ψ)), the middle row (0, cos(φ − ψ), −sin(φ − ψ)) and the bottom row (−1, 0, 0). So yaw 30° with roll 10° gives exactly the same orientation as yaw 0° with roll −20°. Two angles are now doing one job.
With the nose vertical, the roll axis lies along the yaw axis, so turning about either does the same thing. One degree of freedom has gone.
In April 1963, David Hoag of the MIT Instrumentation Laboratory described this for the Apollo guidance platform: gimbal lock occurs when the outer gimbal axis is carried around by vehicle motion to be parallel to the inner gimbal axis (Hoag, MIT Instrumentation Laboratory Document E-1344). The object is fine; the three-angle description breaks down.
What happened with gimbal lock on Apollo 11?
Apollo's inertial measurement unit carried its stable platform inside three gimbals: outer, middle and inner (Apollo Lunar Surface Journal, Gimbal Angles, Gimbal Lock, and a Fourth Gimbal for Christmas). In that essay Paul Fjeld writes that in the lunar module the computer flashed a "gimbal lock" warning at a 70° middle gimbal angle and froze the platform at 85°, then waited for a realignment.
Hoag's report weighed a fourth, redundant gimbal that would have added 15 pounds and 725 cubic inches to the unit, and judged its advantages outweighed by the simplicity, size and reliability of the three-gimbal design (E-1344). Apollo flew with three, so crews had to steer around the lock.
About two hours after the Apollo 11 landing, CapCom Owen Garriott radioed Michael Collins in the command module: "We noticed you are maneuvering very close to gimbal lock. I suggest you move back away. Over." Collins said he was going around it, then joked: "How about sending me a fourth gimbal for Christmas." Compare how a fibre-optic gyroscope feels the Earth turn.
How do you avoid gimbal lock in problems?
Whenever a question gives you three angles:
Write the convention first: which axes, in what order, which sign is positive, fixed or turning with the body.
Test the formula with 90° turns on the vector (1, 0, 0) before trusting it.
If the middle angle is near ±90°, only the difference (or sum, in some conventions) of the other two is meaningful.
For smooth turning through every direction, use the rotation matrix itself or quaternions, which have no such singular angle.
If the picture won't settle, the Fermi Concept Library gives every concept in physics and mathematics its own lesson and place in the map, and the Fermi Simulation Lab has interactive simulations for ideas easier to see than to read.



