Extract from 'Are quaternions good or evil'

Modern robotics, Rodrigues form of a rotation matrix

Skew matrix arithmetic

If we have a vector

\[ \vec{\omega} =\begin{bmatrix} \omega _{x} & \omega _{y} & \omega _{z} \end{bmatrix}^T \]

We can use a skew (or bracket, or adjoint) operator to form a skew matrix of the form

\[ S(\vec{\omega})=\tilde{S}=[\vec{\omega}]=S_\omega= \begin{bmatrix} 0 & -\omega _{z} & \omega _{y}\\ \omega _{z} & 0 & -\omega _{x}\\ -\omega _{y} & \omega _{x} & 0 \end{bmatrix} \]

$\tilde{S}$ or $[\vec{\omega}]$ has the property that implements the cross product, i.e. $\vec{\omega}\times\vec{v}=\tilde{S}_\omega\vec{v}$ and $\vec{v}\times\vec{\omega}=-\tilde{S}_u\vec{v}=\tilde{S}_u^T\vec{v}$

It also has the following properties

\begin{align} S^T=-S\\ S^2-\vec{\omega}\vec{\omega}^T+I\vec{\omega}^T\vec{\omega}=0\\ S^3+S=(\vec{\omega}^T\vec{\omega}-1)S^T=(1-\vec{\omega}^T\vec{\omega})S \end{align}

Note that $\vec{\omega}\vec{\omega}^T$ is an 'outer product' and hence a matrix where as $\vec{\omega}^T\vec{\omega}$ is an 'inner product' hence a single number or scalar.

If $\vec{\omega}$ is a unit vector then these properties simplify to

\begin{align} S^2-\vec{\omega}\vec{\omega}^T+I=0\label{eq:S4}\\ S^3=-S \label{eq:S5} \end{align}

Another property if $\vec{\omega}$ is a unit vector (from equation 4 and 5) of a unit vector skew matrix is that $S\vec{\omega}\vec{\omega}^T=0$

Further properties are

Rotation matrices and the exponential form

A property of $S_\omega$ is that the exponential will generate an orthogonal rotational matrix, usually expressed as

\begin{equation} R=e^{[\vec{\omega}]\theta}=e^{S_{\vec{\omega}}\theta} \label{eq:expform} \end{equation}

where $\vec{\omega}$ is a unit vector and $\theta$ represents some rotation about $\vec{\omega}$.

This can be demonstrated by expanding the exponential as

\[ R=I + S\theta + S^2\frac{\theta^2}{2!} + S^3\frac{\theta^3}{3!} + S^4\frac{\theta^4}{4!} +... \]\[ R=I + S\theta + S^2\frac{\theta^2}{2!} - S\frac{\theta^3}{3!} - S^2\frac{\theta^4}{4!} +... \]\[ R=I + \left(S\theta - S\frac{\theta^3}{3!} +...\right) + \left(S^2\frac{\theta^2}{2!} - S^2\frac{\theta^4}{4!} +...\right) \]\[ R=I + \sin\theta S + (1-\cos\theta)S^2 \]

This is sometimes called Euler's formula, possibly because it is an extension of $e^{i\theta}=\cos\theta+i\sin\theta$ but it is more properly called Rodrigues rotation formula.

Rodrigues formula was originally expressed in a vector notation, but using skew matrices is a more elegant approach.

Some variants of Rodrigues rotation formula

Using the properties of skew matrices above the following variants of Rodrigues rotation formula are possible.

\begin{align} R = e^{S_\omega\theta} &= I + \sin\theta S_\omega + (1-\cos\theta)S_\omega^2\\ &= I + \sin\theta S_\omega + S_\omega^2 -\cos\theta S_\omega^2\\ &= I + \sin\theta S_\omega+(1-\cos\theta)(\vec{\omega}\,\vec{\omega}^T - I)\\ &= I\cos\theta + \sin\theta S_\omega + (1-\cos\theta)\vec{\omega}\,\vec{\omega}^T\\ &= \sin\theta S_\omega + \vec{\omega}\,\vec{\omega}^T + (I-\vec{\omega}\,\vec{\omega}^T)\cos\theta \end{align}

and evidently

\[ R^T= e^{-S_\omega\theta}= e^{S^T_u\theta} =I-\sin\theta S_\omega + (1-\cos\theta) S_\omega^2 \]