No jobs
Advanced 11 min 3 of 3

Optimising on the manifold

Why a pose update is six numbers, and why you never add them to a matrix.

What this repairs

The idea that "Lie groups" are advanced theory, rather than the direct answer to "how do I take a derivative with respect to a rotation".

Gauss–Newton wants to compute an update Δ\Delta and apply it as xx+Δx \leftarrow x + \Delta . For a rotation that is immediately broken: add anything to a rotation matrix and it stops being one. The set of rotations is a curved surface in the space of 3×33\times3 matrices — a manifold — and addition leaves it.

The fix is to keep the state on the manifold and the update in a flat space attached to it. At any rotation, the tangent space is three-dimensional; a vector in it is an angular velocity ω\boldsymbol{\omega} , and the exponential map turns it into a rotation:

exp:so(3)SO(3),exp([ω]×)=I+sinθ[k]×+(1cosθ)[k]×2.\exp: \mathfrak{so}(3) \to SO(3), \qquad \exp([\boldsymbol{\omega}]_\times) = I + \sin\theta\,[\mathbf{k}]_\times + (1-\cos\theta)[\mathbf{k}]_\times^2.

That is Rodrigues' formula again, now with a job title. Updates then compose multiplicatively:

RRexp([Δω]×).R \leftarrow R \exp([\Delta\boldsymbol{\omega}]_\times).

Three numbers, no constraint, no drift, and a 3×33\times3 Hessian block instead of a 9×99\times9 one with six redundant directions.

The same construction extends to full poses. SE(3)SE(3) has a six-dimensional tangent space — a twist ξ=(v,ω)\xi = (\mathbf{v}, \boldsymbol{\omega}) — and

exp(ξ)=[exp([ω]×)Vv01],V=I+1cosθθ[k]×+θsinθθ[k]×2.\exp(\xi) = \begin{bmatrix} \exp([\boldsymbol{\omega}]_\times) & V\mathbf{v} \\ \mathbf{0}^\top & 1 \end{bmatrix}, \qquad V = I + \frac{1-\cos\theta}{\theta}[\mathbf{k}]_\times + \frac{\theta - \sin\theta}{\theta}[\mathbf{k}]_\times^2.

The matrix VV is worth a moment. v\mathbf{v} is not the resulting translation — it is a velocity that acts while the frame is simultaneously rotating, and VV integrates that coupling. Only when ω=0\boldsymbol{\omega} = 0 do the two coincide. This is why a "small pose update" is six numbers with a non-obvious relationship to the twelve numbers of the matrix it produces.

Check yourself

Why can you average two rotation matrices element-wise and get something that is not a rotation, but average two tangent vectors and always get a valid update?

Show answer

Because SO(3)SO(3) is not closed under addition — it is a curved manifold sitting inside the flat vector space of matrices, and the straight line between two of its points leaves the surface. The tangent space is a vector space: any linear combination of tangent vectors is a tangent vector, and exp\exp maps it back onto the manifold. Averaging rotations properly means mapping to the tangent space at some reference, averaging there, and mapping back — which is why the "correct" average depends on the reference you chose, and is only unique when the rotations are close together.

Euler View - ML Experiment Monitor