> ## Documentation Index
> Fetch the complete documentation index at: https://aegean.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Exponential coordinates of a rotation

> Write a rotation as the matrix exponential of an angular velocity, apply the Rodrigues' formula and use the matrix logarithm to invert the rotation.

[Angular velocity](/aiml-common/lectures/motion-algebras/angular-velocity/index) gave the velocity of a rotating body at one instant, $\dot R = [\omega_s] R$. This section turns that velocity into a finite rotation. When the axis stays fixed, the rotation is a matrix exponential and we can represent the rotation with three numbers. The section follows section 3.2.3 of Kevin Lynch and Frank Park, *Modern Robotics: Mechanics, Planning, and Control* (Kevin M. Lynch, 2017).

## Coordinates in the Lie algebra

A rotation matrix has nine entries but only three degrees of freedom. Its entries must satisfy $R^T R = I$ and $\det R = 1$, so you cannot change them independently. The sum of two rotation matrices is not a rotation matrix. Neither is the midpoint $\tfrac{1}{2}(R_1 + R_2)$. A gradient step on the nine entries also leaves SO(3), which requires a projection back onto the group.

Exponential coordinates represent a rotation by a vector $\hat\omega\theta \in \mathbb{R}^3$. Its direction is the rotation axis. Its length is the rotation angle. Any vector in $\mathbb{R}^3$ is allowed, so you can add, scale, and differentiate these coordinates as ordinary vectors. The exponential maps the result to a valid rotation matrix. Adding the coordinates of two rotations does not compose them, though, because rotations in space do not commute. [Lie II](/aiml-common/lectures/motion-algebras/lie-calculus/index#the-small-adjoint-and-the-lie-bracket) shows an example and the correction term.

In the language of [Lie I](/aiml-common/lectures/motion-algebras/lie-theory/index), SO(3) is the *Lie group*. It is a curved space whose points are rotation matrices. Its *Lie algebra* $\mathfrak{so}(3)$ is the flat tangent space at the identity. Its elements are the skew-symmetric matrices $[\omega]$ that you met as angular velocities. The exponential and logarithm connect the two spaces:

$$
\exp : \mathfrak{so}(3) \to SO(3), \qquad \log : SO(3) \to \mathfrak{so}(3) .
$$

The matrix $[\hat\omega]\theta$ in the algebra is built from the three exponential coordinates $\hat\omega\theta$. Physically, $e^{[\hat\omega]\theta}$ is the rotation reached by turning at the constant angular velocity $\hat\omega\theta$ for one second. You can carry out calculations in the flat algebra and map the result to the curved group.

For interpolation from $R_0$ to $R_1$, take $\log(R_0^T R_1)$, scale it by $t \in [0, 1]$, and map it back: $R(t) = R_0\, e^{t \log(R_0^T R_1)}$. In estimation and optimization, a filter or solver can correct a rotation with a small vector $\delta \in \mathbb{R}^3$: $R \leftarrow R\, e^{[\delta]}$. The result is always a rotation. [Lie II](/aiml-common/lectures/motion-algebras/lie-calculus/index) develops the calculus for these operations.

Each revolute joint in a robot arm rotates about its axis, so its motion is an exponential. The arm's forward kinematics is a product of these exponentials. [Motion representations](/aiml-common/lectures/motion-algebras/motion-representations/index#screw-motion) extends the same idea from rotations to full rigid motions.

## In the plane

A body that turns at the constant rate $\omega = 1$ for a time $\theta$ obeys $\dot R = G R$. The solution is the matrix exponential $R(\theta) = e^{\theta G} R(0)$. Because $G^2 = -I$, the exponential series splits into the cosine and sine series:

$$
e^{\theta G} = I \cos\theta + G \sin\theta = R(\theta) .
$$

So in the plane the exponential coordinate of a rotation is just its angle $\theta$, and $G$ is the quarter-turn generator of [Lie I](/aiml-common/lectures/motion-algebras/lie-theory/index#exp-and-log).

## In space

In space you can also write a rotation as an exponential, but only for a fixed axis. The solution below needs $\dot R = [\omega] R$ with a constant matrix $[\omega]$ (Lynch and Park Proposition 3.10, [page 82](https://artifacts.aegeanai.com/pdf/lynch-mr/body-motions.pdf#page=24)). This is why Lynch and Park return to a fixed axis to build exponential coordinates. When the axis changes with time, as in the [examples of a moving axis](/aiml-common/lectures/motion-algebras/angular-velocity/index#a-rotating-axis-that-changes-with-time), you have to build $R(t)$ up step by step instead. Suppose a body rotates with constant unit angular velocity $\hat\omega$ for a time $\theta$. Its orientation obeys $\dot R = [\hat\omega] R$. This linear differential equation has the solution $R(\theta) = e^{[\hat\omega]\theta} R(0)$. The matrix exponentials used by Lynch and Park, $e^{[\hat\omega]\theta}$ for rotations and $e^{[\mathcal{S}]\theta}$ for [rigid motions](/aiml-common/lectures/motion-algebras/motion-representations/index#screw-motion), are instances of the Lie exponential from [Lie I](/aiml-common/lectures/motion-algebras/lie-theory/index#exp-and-log). The product of exponentials formula for robot arms is named for its product of Lie-group exponentials.

A rotation by an angle $\theta$ about a unit axis $\hat\omega$ is described by the three numbers $\hat\omega\theta \in \mathbb{R}^3$, called its *exponential coordinates*. Let $[\hat\omega]$ be the skew-symmetric matrix of $\hat\omega$ from [angular velocity](/aiml-common/lectures/motion-algebras/angular-velocity/index#a-rotating-axis-that-changes-with-time). Rodrigues' formula computes the rotation matrix. This formula is the exponential map Exp of SO(3):

$$
R = e^{[\hat\omega]\theta} = I + \sin\theta\, [\hat\omega] + (1 - \cos\theta)[\hat\omega]^2 .
$$

Example 3.12 of Lynch and Park ([page 84](https://artifacts.aegeanai.com/pdf/lynch-mr/body-motions.pdf#page=26)) works through one case. A frame $\{b\}$ starts aligned with the fixed frame $\{s\}$. It turns by $\theta_1 = 30^\circ = 0.524$ rad about the unit axis $\hat\omega_1 = (0, 0.866, 0.5)$. Rodrigues' formula gives its orientation:

$$
R = e^{[\hat\omega_1]\theta_1} = I + \sin\theta_1\, [\hat\omega_1] + (1 - \cos\theta_1)[\hat\omega_1]^2 =
\begin{bmatrix} 0.866 & -0.250 & 0.433 \\ 0.250 & 0.967 & 0.058 \\ -0.433 & 0.058 & 0.899 \end{bmatrix} .
$$

You can describe the same orientation with the axis and the angle alone. Its exponential coordinates are $\hat\omega_1\theta_1 = (0, 0.453, 0.262)$.

<video src="https://artifacts.aegeanai.com/manim/exponential-coordinates/RodriguesExample.mp4" controls loop muted playsInline width="100%" style={{ borderRadius: 8 }} />

*Example 3.12. The frame $\{b\}$ starts on top of $\{s\}$ (gray) and turns by $30^\circ$ about $\hat\omega_1$ (yellow). Each axis tip moves along a circle about $\hat\omega_1$. The columns of $R$ are the axes of $\{b\}$ written in $\{s\}$. The orange arrow is $\hat\omega_1\theta_1$. It points along the axis, and its length is the angle in radians.*

## The matrix logarithm

The logarithm of a rotation inverts the matrix exponential for rotation angles $0 \le \theta < \pi$. Rotations by $\theta$ and $\theta + 2\pi$ produce the same matrix, so a single inverse cannot cover every angle. A rotation by exactly $\pi$ requires separate treatment. The axes $\hat{\omega}$ and $-\hat{\omega}$ produce the same rotation, so the logarithm has two solutions and needs a sign convention. For $\theta = 0$ the logarithm is the zero matrix. If $0 < \theta < \pi$, then

$$
[\hat\omega] = \frac{1}{2 \sin \theta}(R - R^T) .
$$

## The exponential map on a curved space

SO(3) is a curved three-dimensional space. Its exponential map wraps a flat coordinate space onto it. You cannot draw a curved three-dimensional space, but the unit sphere $S^2$ shows the same structure in one lower dimension. At a point $p$, the tangent plane $T_pS^2$ touches the sphere and contains every possible velocity of a curve through $p$. The exponential map carries a tangent vector $\omega$ onto the sphere. It follows the great circle in the vector's direction for an arc length $\|\omega\|$:

$$
\exp_p(\omega) = \cos(\|\omega\|)\, p + \sin(\|\omega\|)\, \frac{\omega}{\|\omega\|}
$$

Straight lines in the tangent plane become curved arcs on the sphere. Near $p$, the plane approximates the sphere well. SO(3) has the same local structure. Its tangent space is $\mathbb{R}^3$, and the exponential map turns a vector $\hat{\omega}\theta$ into a rotation matrix.

<video src="https://artifacts.aegeanai.com/manim/spatial-motion/TangentSpaceExpMap.mp4?v=2" controls loop muted playsInline width="100%" style={{ borderRadius: 8 }} />

*The sphere provides a visible model of SO(3). The gold plane is the tangent plane $T_pS^2$ at $p$, and the white arrow is a tangent vector $\omega$. The red arc is $\exp_p(\omega)$, the great-circle path that starts at $p$, follows the direction of $\omega$, and has the same length. The fan shows this mapping in twelve directions. The final orbit compares the flat plane with arcs that follow the sphere's curvature.*

## References

* Kevin M. Lynch, F. (2017). *Modern Robotics*.

***

<Callout icon="bug" iconType="regular">
  Found an error on this page? [Report an issue](https://github.com/aegean-ai/eaia-feedback/issues/new?template=page-issue.yml\&page=/aiml-common/lectures/motion-algebras/exponential-coordinates).
</Callout>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.