# Rodrigues' rotation formula

In the theory of three-dimensional rotation, Rodrigues' rotation formula, named after Olinde Rodrigues, is an efficient algorithm for rotating a vector in space, given an axis and angle of rotation. By extension, this can be used to transform all three basis vectors to compute a rotation matrix in SO(3), the group of all rotation matrices, from an axis–angle representation. In other words, the Rodrigues' formula provides an algorithm to compute the exponential map from so(3), the Lie algebra of SO(3), to SO(3) without actually computing the full matrix exponential.

## Statement

If v is a vector in 3 and k is a unit vector describing an axis of rotation about which v rotates by an angle Template:Mvar according to the right hand rule, the Rodrigues formula is

## Derivation Rodrigues' rotation formula rotates v by an angle θ around an axis z by decomposing it into its components parallel and perpendicular to z, and rotating only the perpendicular component.

Given a rotation axis represented by a unit vector k and a vector v to rotate about k by the angle θ,

${\mathbf {v} }_{\parallel }=({\mathbf {k} }\cdot {\mathbf {v} }){\mathbf {k} }$ is the component of v parallel to k, also called the vector projection of v on k, and

${\mathbf {v} }_{\perp }={\mathbf {v} }-{\mathbf {v} }_{\parallel }={\mathbf {v} }-({\mathbf {k} }\cdot {\mathbf {v} }){\mathbf {k} }$ is the component of v orthogonal to k, also called the vector rejection of v from k.

Define

${\mathbf {w} }={\mathbf {k} }\times {\mathbf {v} }$ .

The vectors v and w have the same length, but w is perpendicular to both k and v. This follows from

${\mathbf {w} }={\mathbf {k} }\times {\mathbf {v} }={\mathbf {k} }\times ({\mathbf {v} }_{\parallel }+{\mathbf {v} }_{\perp })={\mathbf {k} }\times {\mathbf {v} }_{\parallel }+{\mathbf {k} }\times {\mathbf {v} }_{\perp }={\mathbf {k} }\times {\mathbf {v} }_{\perp },$ since k has unit length, is parallel to v∥∥ and is perpendicular to v.

The vector w can be viewed as a copy of v rotated by 90° about k. Through trigonometry, one may now rotate v by θ around k to obtain v⊥rot. Consequently,

{\begin{aligned}\mathbf {v} _{\perp \ \mathrm {rot} }&=\mathbf {v} _{\perp }\cos \theta +\mathbf {w} \sin \theta \\&=(\mathbf {v} -(\mathbf {k} \cdot \mathbf {v} )\mathbf {k} )\cos \theta +(\mathbf {k} \times \mathbf {v} )\sin \theta ~.\end{aligned}} Moreover, v⊥rot is also the rejection from k of the vector vrot, defined as the desired vector, v rotated about k by the angle θ.

Since v∥∥ is not affected by a rotation about k, the projection of vrot on k coincides with v∥∥. Thus,

{\begin{aligned}{\mathbf {v} }_{\mathrm {rot} }&={\mathbf {v} }_{\perp \ {\mathrm {rot} }}+{\mathbf {v} }_{\parallel \ {\mathrm {rot} }}\\&={\mathbf {v} }_{\perp \ {\mathrm {rot} }}+{\mathbf {v} }_{\parallel }\\&=({\mathbf {v} }-({\mathbf {k} }\cdot {\mathbf {v} }){\mathbf {k} })\cos \theta +({\mathbf {k} }\times {\mathbf {v} })\sin \theta +({\mathbf {k} }\cdot {\mathbf {v} }){\mathbf {k} }\\&={\mathbf {v} }\cos \theta +({\mathbf {k} }\times {\mathbf {v} })\sin \theta +{\mathbf {k} }({\mathbf {k} }\cdot {\mathbf {v} })(1-\cos \theta ),\end{aligned}} as stated.

## Matrix notation

Representing v and k as column matrices, permits defining a matrix K as the "cross-product matrix" for the vector k, i.e.,

$\mathbf {K} =\left[{\begin{array}{ccc}0&-k_{3}&k_{2}\\k_{3}&0&-k_{1}\\-k_{2}&k_{1}&0\end{array}}\right]$ .

This matrix can be easily checked to have the property that

$\mathbf {K} \mathbf {v} =\mathbf {k} \times \mathbf {v}$ for any vector v. (In fact, K is the unique matrix with this property.)

Now, from the last equation in the previous sub-section, one may write

{\begin{aligned}\mathbf {v} _{\mathrm {rot} }&=\mathbf {v} \cos \theta +(\mathbf {k} \times \mathbf {v} )\sin \theta +\mathbf {k} (\mathbf {k} \cdot \mathbf {v} )(1-\cos \theta )\\&=\mathbf {v} +(\mathbf {K} \mathbf {v} )\sin \theta +(\mathbf {k} (\mathbf {k} \cdot \mathbf {v} )-\mathbf {v} )(1-\cos \theta ).\end{aligned}} To simplify further, use the standard formula for the vector triple product,

$\mathbf {a} \times (\mathbf {b} \times \mathbf {c} )=\mathbf {b} (\mathbf {a} \cdot \mathbf {c} )-\mathbf {c} (\mathbf {a} \cdot \mathbf {b} )$ with a = b = k, and c = v, to obtain

$(\mathbf {k} (\mathbf {k} \cdot \mathbf {v} )-\mathbf {v} )=\mathbf {k} \times (\mathbf {k} \times \mathbf {v} )$ or

$\mathbf {k} (\mathbf {k} \cdot \mathbf {v} )-\mathbf {v} =\mathbf {K} ^{2}\mathbf {v} ~.$ This amounts to (substituting the above equation in the last one for vrot),

$\mathbf {v} _{\mathrm {rot} }=\mathbf {v} +(\sin \theta )\mathbf {K} \mathbf {v} +(1-\cos \theta )\mathbf {K} ^{2}\mathbf {v} ~,$ resulting in the Rodrigues' rotation formula in matrix notation,

{\begin{aligned}\mathbf {v} _{\mathrm {rot} }&=\mathbf {R} \mathbf {v} \end{aligned}} where R is the rotation matrix

Since K is defined in terms of the components of the rotation axis k, and Template:Mvar is the rotation angle, R is the rotation matrix about k by angle Template:Mvar. R is an element of the rotation group SO(3) of 3, and K is an element of the Lie algebra so(3) generating that Lie group (just note that is skew-symmetric, which characterizes a so(3)): In terms of the matrix exponential,

$\mathbf {R} =\exp(\theta \mathbf {K} )~.$ To see that the last identity holds, one notes that

$\mathbf {R} (\theta )\mathbf {R} (\phi )=\mathbf {R} (\theta +\phi ),\quad \mathbf {R} (0)=\mathbf {I} ~,$ characteristic of a one-parameter subgroup, i.e. exponential, and that the formulas match for infinitesimal Template:Mvar.

For an alternative derivation based on this exponential relationship, see Axis–angle representation#Exponential map from so(3) to SO(3). For the inverse mapping, see Axis–angle representation#Log map from SO(3) to so(3).