In mathematics, the axis–angle representation of a rotation parameterizes a rotation in a three-dimensional Euclidean space by two values: a unit vector indicating the direction of an axis of rotation, and an angle θ describing the magnitude of the rotation about the axis. The rotation occurs in the sense prescribed by the right-hand rule. The rotation axis, a locus of points that do not move, is sometimes called the Euler axis.
It is one of many rotation formalisms in three dimensions. These formalisms describe rotations around the origin, a fixed point. Alternatively, one can understand such rotations as transformations of vectors, not points; in other words, translations are ignored. The axis–angle representation evolves from Euler's rotation theorem, which implies that any rotation or sequence of rotations of a rigid body in a three-dimensional space is equivalent to a pure rotation about a single fixed axis.
The axis–angle representation is equivalent to the more concise rotation vector, also called the Euler vector. In this case, both the rotation axis and the angle are represented by a Euclidean vector codirectional with the rotation axis whose magnitude is the rotation angle θ:
The axis–angle representation is convenient when dealing with rigid body dynamics. It is useful to both characterize rotations, and also for converting between different representations of rigid body motion, such as homogeneous transformations[clarification needed] and twists.
Say you are standing on the ground and you pick the direction of gravity to be the negative z direction. Then if you turn to your left, you will travel radians (or 90°) about the z axis. In axis-angle representation, this would be
The above example can be represented as a rotation vector with a magnitude of pointing in the z direction.
Rotating a vector
Rodrigues' rotation formula (named after Olinde Rodrigues) is an efficient algorithm for rotating a Euclidean vector, given a rotation axis and an angle of rotation. In other words, the Rodrigues' formula provides an algorithm to compute the exponential map from so(3) to SO(3) without computing the full matrix exponent (the rotation matrix).
If v is a vector in and ω is a unit vector describing an axis of rotation about which we want to rotate v by an angle θ (in a right-handed sense), the Rodrigues' formula to obtain the rotated vector is:
For the rotation of a single vector this is more efficient than converting ω and θ into a rotation matrix to rotate the vector.
Relationship to other representations
There are many ways to represent a rotation. It is useful to understand how different representations relate to one another, and how to convert between them.
Exponential map from so(3) to SO(3)
Essentially, by using a Taylor expansion you can derive a closed form relationship between these two representations. Given a unit vector representing the Euler axis, and an angle, , an equivalent rotation matrix is given by the following:
Due to the existence of the above mentioned exponential map, the unit vector ω representing the rotation axis, and the angle θ are sometimes called the exponential coordinates of the rotation matrix R.
Log map from SO(3) to so(3)
To retrieve the axis–angle representation of a rotation matrix calculate the angle of rotation:
and then use it to find the normalized axis:
Note, also that the Matrix logarithm of the rotation matrix R is:
Note that given rotation matrices A and B:
is the geodesic distance on the 3D manifold of rotation matrices. Note that for small rotations, the above computation of may be numerically imprecise as the derivative of arccos goes to infinity as theta approaches zero. In that case, the off-axis terms will provide better information about , as for small angles, where is the matrix representation of the cross product.
This formulation also has numerical problems at . There, the off-axis terms don't give information about the rotation axis (which is still defined up to a sign ambiguity). In that case, we must reconsider the above formula:
At we have
and so let
so the diagonal terms of B are the squares of the elements of ω and the signs (up to sign ambiguity) can be determined from the signs of the off-axis terms of B.
Given a versor represented with its scalar s and vector x, the axis–angle coordinates can be extracted using the following:
A more numerically stable expression of the rotation angle uses the atan2 function:
where |x| is the Euclidean norm of the 3-vector x.
- homogeneous coordinates
- screw theory, a representation of rigid body motions and velocities using the concepts of twists, screws and wrenches