HuntsvilleEngineers mark
HE Reference Shelf — huntsvilleengineers.com
The Reference Shelf · Geometry & Mechanics

Axis-angle representation

Any 3D rotation, no matter how you got there, is just one spin of a certain angle about one fixed axis — and axis-angle is the pair of numbers that says which axis and how far.

Also known as: Rodrigues' rotation formula · rotation vector · Euler axis and angle

The formula

Rotate a vector v about a unit axis k (a length-1 direction) through angle θ. Rodrigues' rotation formula:

v_rot = v·cos θ + (k × v)·sin θ + k·(k · v)·(1 − cos θ)

Reading it: split v into the part along the axis and the part perpendicular. The along-axis part (the k·(k·v) term) never moves. The perpendicular part spins in its plane — cos θ keeps some of it, sin θ swings in the sideways k × v direction.

Same rotation as a matrix. Build the skew-symmetric "cross-product matrix" K from the axis, then:

R = I + sin θ · K + (1 − cos θ) · K²

          [  0   −k_z   k_y ]
where K = [ k_z   0    −k_x ]
          [−k_y  k_x    0   ]

Reading it: K·v computes k × v. R is the whole rotation packaged as a 3×3 you can multiply against any vector or stack into a transform.

Going the other way — pull the angle back out of any rotation matrix from its trace:

θ = arccos( (trace(R) − 1) / 2 )

The axis is the eigenvector of R with eigenvalue 1 — the one direction the rotation leaves alone.

The link to quaternions is the half-angle:

q = ( cos(θ/2),  k·sin(θ/2) )

Reading it: the quaternion carries the half angle. That factor of two is the source of half the sign confusion in flight software.

Where you meet it

  • IMU and star-tracker attitude on the bench. A spacecraft or drone estimator carries attitude as a quaternion internally, but the error you feed the control loop is almost always a small rotation vector — axis times a tiny angle. When you read "attitude error = 0.002 rad about the boresight" off a telemetry page at a design review, that's axis-angle. The small-angle rotation vector is the linearized error state in most Kalman filters flying today.

  • Robot arm and gimbal commanded moves. A pick-and-place or a test-stand gimbal gets told "rotate the end effector 30° about this tool axis." That command is axis-angle before anything downstream turns it into joint angles or a matrix. It's the natural way a human specifies a single reorientation.

  • Antenna and radar pointing on a test range. When you need to slew a dish from one target to another by the shortest path, the single axis-angle rotation between the two pointing vectors is exactly that shortest path. The angle is your slew magnitude; the axis is the rotation the servos have to execute.

  • Coordinate-frame checkout during integration. When two teams hand off a sensor and the frames don't line up, the misalignment is one rotation. Reporting it as "1.4° about roughly the +Y axis" is far more diagnosable than nine matrix entries nobody can eyeball.

How it works

The whole idea rests on Euler's rotation theorem: in 3D, any reorientation of a rigid body about a fixed point equals a single rotation about a single axis through that point. That is not obvious and it is not true in higher dimensions — it's a special gift of three-space. It's why four numbers (axis direction plus angle, or equivalently a unit quaternion) can carry what a 3×3 matrix carries with nine.

Sanity checks that hold every time. A 90° rotation about +z sends the x-axis onto the y-axis — plug k = [0,0,1], θ = 90°, v = [1,0,0] into Rodrigues and you get [0,1,0] exactly. A 120° rotation about the body diagonal [1,1,1] cyclically permutes the axes: x→y→z. Its matrix has trace 0, and arccos((0−1)/2) = 120° — the trace formula recovers the angle you put in.

The mistake people make: treating the rotation vector like an ordinary vector. Rotation vectors do not add. Spin 90° about x, then 90° about y, and the result is not a rotation about x+y. Rotations compose by multiplying matrices or quaternions, not by summing their axis-angle vectors. The vector-addition shortcut is only valid in the small-angle limit, where sin θ ≈ θ and cos θ ≈ 1 — which is exactly why filters get away with it for error states and exactly why it breaks the moment somebody uses it on a large maneuver.

The 180° singularity is the one that bites in code. The clean way to pull an axis out of a matrix uses the off-diagonal differences [R₂₁−R₁₂, R₀₂−R₂₀, R₁₀−R₀₁], which scale with sin θ. At θ = 180°, sin θ = 0, so all three go to zero and the axis vanishes numerically — verified: every one of those terms is 0.0 at exactly 180°. The rotation is perfectly real and well-defined; the extraction shortcut fails. Near 180° you have to switch to reading the axis off the diagonal of R or off . The other end of the range fails too: at θ = 0 the rotation is the identity and the axis is completely undefined — any k works — and that same off-diagonal extraction divides by 2·sin θ, so it's a 0/0 near zero. Extraction code has to branch to a small-angle series there (the product θ·k is approximately half the off-diagonal differences) instead of normalizing a vanishing axis vector, which is a classic hand-rolled bug. Note the asymmetry: the rotation vector θ·k stays perfectly well-behaved through zero even though the unit axis does not. Robust libraries branch on the angle at both ends; hand-rolled code usually doesn't, and the 180° bug shows up only when a test article happens to be flipped near half a turn.

Two more limits worth carrying. The representation is not unique: axis k with angle θ is the same rotation as axis −k with angle −θ, and θ and θ ± 360° land in the same place. And the quaternion double-covers it — q and −q are the same physical attitude, because of that half-angle. A controller that doesn't force the quaternion into a consistent hemisphere can command "the long way around" — a 350° slew where 10° would do. That's the unwinding problem, the axis-angle face of the sign bug, and it burns real actuator margin for nothing.

Why bother with axis-angle at all when you already have matrices and quaternions? Because it's the one form a human reads without a decoder. "3° about the boresight" tells you the magnitude and the geometry of an error in one glance. A matrix hides both. Axis-angle is the interpreter that sits between them.

History

Leonhard Euler proved the load-bearing fact in 1775: any rotation of a body about a fixed point is a rotation about some single axis. He worked it with spherical geometry — no vectors, no matrices, none of that machinery existed yet — and published it the next year in a paper whose Latin title translates roughly to "General formulas for any translation of rigid bodies." [1] The axis he showed must exist is still called the Euler axis, and the angle around it is still θ.

The explicit finite-rotation formula came 65 years later from Benjamin Olinde Rodrigues, a French mathematician and banker, in an 1840 paper in the Journal de Mathématiques Pures et Appliquées on the geometric laws governing the displacements of a rigid system in space. [2][3] Rodrigues wrote down how a finite rotation acts on a vector using only the axis and angle as parameters — the coordinate-free result engineers still code today. Remarkably, he was manipulating what amount to quaternion composition rules three years before William Rowan Hamilton formally introduced quaternions in 1843. [2]

The naming has never fully settled. A close historical study in 1989 argued the finite-rotation formula really traces to Euler and ought to be called "Euler's finite rotation formula"; others treat it as one member of the broader Euler–Rodrigues family and credit both men. [2] For working engineers the label matters less than the fact that a Swiss mathematician's spherical-geometry proof and a French banker's finite-rotation algebra together became the backbone of every attitude system flying over the Tennessee Valley.

Related tools

  • /tools/convert-angle

Sources

  1. https://en.wikipedia.org/wiki/Euler%27s_rotation_theorem
  2. https://en.wikipedia.org/wiki/Rodrigues%27_rotation_formula
  3. https://arxiv.org/pdf/2006.00196

Written by HE in our own words from the cited sources — engineering judgment included, your stamp still required. All entries →

★ The Reference Shelf

Reading is free. The shelf is for cardholders.

Your library card is an email address: pin it to your shelf, print the card, take the FE/PE quick-reference pack, read the Huntsville history. The shelf remembers what you reach for.

Already on the list? Enter with your subscribed email →