Axis–angle representation

Only two numbers, not three, are needed to define the direction of a unit vector e rooted at the origin because the magnitude of e is constrained.

For example, the elevation and azimuth angles of e suffice to locate it in any particular Cartesian coordinate frame.

The rotation occurs in the sense prescribed by the right-hand rule.

It is used for the exponential and logarithm maps involving this representation.

These facts must be taken into account when inverting the exponential map, that is, when finding a rotation vector that corresponds to a given rotation matrix.

Then if you turn to your left, you will rotate ⁠-π/2⁠ radians (or -90°) about the -z axis.

Viewing the axis-angle representation as an ordered pair, this would be

The above example can be represented as a rotation vector with a magnitude of ⁠π/2⁠ pointing in the z direction,

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.

Plugging the three eigenvalues 1 and e±iθ and their associated three orthogonal axes in a Cartesian representation into Mercer's theorem is a convenient construction of the Cartesian representation of the Rotation Matrix in three dimensions.

In other words, Rodrigues' formula provides an algorithm to compute the exponential map from

Here the unit vector is denoted ω instead of e. The exponential map effects a transformation from the axis-angle representation of rotations to rotation matrices,

Essentially, by using a Taylor expansion one derives a closed-form relation between these two representations.

representing the unit rotation axis, and an angle, θ ∈ R, an equivalent rotation matrix R is given as follows, where K is the cross product matrix of ω, that is, Kv = ω × v for all vectors v ∈ R3,

Because K is skew-symmetric, and the sum of the squares of its above-diagonal entries is 1, the characteristic polynomial P(t) of K is P(t) = det(K − tI) = −(t3 + t).

This cyclic pattern continues indefinitely, and so all higher powers of K can be expressed in terms of K and K2.

by the Taylor series formula for trigonometric functions.

This is a Lie-algebraic derivation, in contrast to the geometric one in the article Rodrigues' rotation formula.

[1] 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. Let K continue to denote the 3 × 3 matrix that effects the cross product with the rotation axis ω: K(v) = ω × v for all vectors v in what follows.

will also result in the identical rotation; a better method is to constrain

may also be found using null space of R-I, see rotation matrix#Determining the axis.

However, even in the case where θ = π the Frobenius norm of the log is

is the geodesic distance on the 3D manifold of rotation matrices.

In that case, the off-axis terms will actually provide better information about θ since, for small angles, R ≈ I + θK.

(This is because these are the first two terms of the Taylor series for exp(θK).)

This formulation also has numerical problems at θ = π, where the off-axis terms do not give information about the rotation axis (which is still defined up to a sign ambiguity).

The following expression transforms axis–angle coordinates to versors (unit quaternions):

Given a versor q = r + v represented with its scalar r and vector v, the axis–angle coordinates can be extracted using the following:

A more numerically stable expression of the rotation angle uses the atan2 function:

The angle θ and axis unit vector e define a rotation, concisely represented by the rotation vector θ e .