Definitions
Nearby Words

# Axis angle

The axis angle representation of a rotation, also known as the exponential coordinates of a rotation, parameterizes a rotation by two values: a unit vector indicating the direction of a directed axis (straight line), and an angle describing the magnitude of the rotation about the axis. The rotation occurs in the sense prescribed by the right hand rule.

This 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 representation. In this case, both the axis and the angle are represented by a non-normalized vector codirectional with the axis whose magnitude is the rotation angle.

## Uses

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 and twists.

### Example

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 $tfrac\left\{pi\right\}\left\{2\right\}$ radians (or 90 degrees) about the z axis. In axis angle representation, this would be

$langle mathrm\left\{axis\right\}, mathrm\left\{angle\right\} rangle = left\left(begin\left\{bmatrix\right\} a_x a_y a_z end\left\{bmatrix\right\},theta right\right) = left\left(begin\left\{bmatrix\right\} 0 0 1 end\left\{bmatrix\right\},frac\left\{pi\right\}\left\{2\right\}right\right)$

This can be represented as a rotation vector with a magnitude of $tfrac\left\{pi\right\}\left\{2\right\}$ pointing in the z direction.

$begin\left\{bmatrix\right\} 0 0 frac\left\{pi\right\}\left\{2\right\} end\left\{bmatrix\right\}$

## Relationship to other representations

There are many ways to represent a rotation. It is useful to understand how different representation relate to one another, and how to convert between them.

### Exponential map from so(3) to SO(3)

The exponential map is used as a transformation from axis angle representation of rotations to rotation matrices.

$expcolon so\left(3\right) to SO\left(3\right)$

Essentially, by using a Taylor expansion you can derive a closed form relationship between these two representations. Given an axis, $omega in Bbb\left\{R\right\}^\left\{3\right\}$ having length 1, and an angle, $theta in Bbb\left\{R\right\}$, an equivalent rotation matrix is given by the following:

$R = exp\left(hat\left\{omega\right\} theta\right) = sum_\left\{k=0\right\}^inftyfrac\left\{\left(hat\left\{omega\right\}theta\right)^k\right\}\left\{k!\right\} = I + hat\left\{omega\right\} theta + frac\left\{1\right\}\left\{2\right\}\left(hat\left\{omega\right\}theta\right)^2 + frac\left\{1\right\}\left\{6\right\}\left(hat\left\{omega\right\}theta\right)^3 + cdots$

$R = I + hat\left\{omega\right\}left\left(theta - frac\left\{theta^3\right\}\left\{3!\right\} + frac\left\{theta^5\right\}\left\{5!\right\} - cdotsright\right) + hat\left\{omega\right\}^2 left\left(frac\left\{theta^2\right\}\left\{2!\right\} - frac\left\{theta^4\right\}\left\{4!\right\} + frac\left\{theta^6\right\}\left\{6!\right\} - cdotsright\right)$

$R = I + hat\left\{omega\right\} sin\left(theta\right) + hat\left\{omega\right\}^2 \left(1-cos\left(theta\right)\right)$

where R is a 3x3 rotation matrix and the hat operator gives the antisymmetric matrix equivalent of the cross product.

### Log map from SO(3) to so(3)

To retrieve the axis angle representation of a rotation matrix calculate the angle of rotation:

$theta = arccosleft\left(frac\left\{mathrm\left\{trace\right\}\left(R\right) - 1\right\}\left\{2\right\} right\right)$
and then use it to find the normalized axis:
$omega = frac\left\{1\right\}\left\{2 sin\left(theta\right)\right\} begin\left\{bmatrix\right\} R\left(3,2\right)-R\left(2,3\right) R\left(1,3\right)-R\left(3,1\right) R\left(2,1\right)-R\left(1,2\right) end\left\{bmatrix\right\}$

### Quaternions

To transform from axis angle coordinates to quaternions use the following expression:

$Q = left\left(cosleft\left(frac\left\{theta\right\}\left\{2\right\}right\right), omega sinleft\left(frac\left\{theta\right\}\left\{2\right\}right\right)right\right)$

Given a unit quaternion, the axis angle coordinates can be extracted using the following:

$theta = 2,arccos\left(q_0\right),$
$omega =$
left{ begin{matrix} frac{q}{ sin(theta/2 ) } , & mathrm{if} ; theta neq 0 0, & mathrm{otherwise} end{matrix} right.