Reading and display settings

Appearance

System follows your operating system and keeps following it, even if you change it later. The header's sun, moon and monitor cycle the same three options.

Text size (%) 100%

Default. Scales every text size on the site, equations and tables included.

Reading width 70ch

How much text runs across one line of prose. Narrower is easier to track; wider fits more on screen.

Line spacing 1.6

The leading on body text. Taller leading helps a tired eye stay on the line.

Density

Padding and gaps around controls, cards, and tables — how much breathing room the layout leaves itself.

Motion

System follows your operating system. Reduced removes every transition on this site. Full keeps them on unless your system asks for less.

1

What a derivative means on a group

Perturb with ⊕, measure with ⊖

🎯 Goal: define the Jacobian of a function between groups (or between a group and a vector space) as an ordinary matrix acting on tangent vectors, and see it linearize a rotation acting on points.

For $f:\mathcal{M}\to\mathcal{N}$ the right Jacobian is the matrix that maps a small tangent step at $X$ to the resulting tangent step at $f(X)$:

$$ \frac{ {}^{X}\!Df}{DX} = \lim_{\tau\to0}\frac{f(X\oplus\tau)\ominus f(X)}{\tau}, \qquad f(X\oplus\tau) \approx f(X)\oplus \frac{ {}^{X}\!Df}{DX}\,\tau. $$

If $\mathcal{N}$ is a vector space, $\ominus$ is ordinary subtraction. The simplest useful case is rotating a point, $f(R) = Rp$. Perturbing on the right, $R\operatorname{Exp}(\tau)p \approx R(I + [\tau]_\times)p = Rp - R[p]_\times\tau$, so

$$ \frac{\partial(Rp)}{\partial\tau} = -R\,[p]_\times \quad(3\times3). $$

The demo perturbs a rotation by $\tau$ and compares where the points actually go (blue) with where the Jacobian predicts (hollow). The error shrinks quadratically in $\lVert\tau\rVert$, the signature of a correct first derivative.

Gray: points $Rp_i$. Blue: $R\operatorname{Exp}(\tau)p_i$. Hollow magenta: the linear prediction $Rp_i - R[p_i]_\times\tau$. Drag to orbit.

2

The right and left Jacobians of SO(3)

The correction that makes Exp(a + b) behave

🎯 Goal: meet $J_r$ and $J_l$, the Jacobians of Exp itself, and see them fix the mismatch between adding in the algebra and composing in the group.

Adding a small $\delta$ to a rotation vector $\phi$ is not the same as composing a small rotation $\operatorname{Exp}(\delta)$. The two are related by the right Jacobian $J_r(\phi)$, the derivative of $\operatorname{Exp}$ in the sense of section 1:

$$ \operatorname{Exp}(\phi + \delta) \approx \operatorname{Exp}(\phi)\operatorname{Exp}\!\bigl(J_r(\phi)\,\delta\bigr), \qquad \operatorname{Log}\!\bigl(\operatorname{Exp}(\phi)\operatorname{Exp}(\delta)\bigr) \approx \phi + J_r^{-1}(\phi)\,\delta. $$
$$ J_r(\phi) = I - \frac{1-\cos\theta}{\theta^2}[\phi]_\times + \frac{\theta-\sin\theta}{\theta^3}[\phi]_\times^2, \qquad J_r^{-1}(\phi) = I + \tfrac12[\phi]_\times + \Bigl(\frac1{\theta^2} - \frac{1+\cos\theta}{2\theta\sin\theta}\Bigr)[\phi]_\times^2. $$

The left Jacobian does the same job on the other side, $\operatorname{Exp}(\phi+\delta)\approx\operatorname{Exp}(J_l\delta)\operatorname{Exp}(\phi)$, and $J_l(\phi) = J_r(-\phi) = \operatorname{Exp}(\phi)J_r(\phi)$. The left Jacobian is exactly the $V$ matrix of Part 7. Both equal $I$ at $\phi = 0$ and drift away from it as the angle grows; $J_r^{-1}$ blows up as $\theta\to2\pi$. These are the closed-form sums of the BCH series from Part 4, for the case where one argument is small. The plot compares three ways to predict $\operatorname{Exp}(\phi+\delta)$ as $\lVert\phi\rVert$ grows.

Error in degrees against $\lVert\phi\rVert$, for a fixed small $\delta$ ($\lVert\delta\rVert$ set by the slider). Magenta: $\operatorname{Exp}(\phi)\operatorname{Exp}(\delta)$, which ignores the Jacobian. Blue: $\operatorname{Exp}(\phi)\operatorname{Exp}(J_r\delta)$.

3

The elementary Jacobians, verified

Six building blocks for every residual

🎯 Goal: own a short table of derivatives from which any residual's Jacobian can be assembled, and check each entry numerically at a random point.

These are right Jacobians (right perturbations on inputs and outputs), following Solà et al. For $SO(3)$, $\operatorname{Ad}_R = R$. Each "check" button draws a random rotation, point and tangent vector, evaluates the analytic formula, estimates the same matrix by central differences in the tangent space, and reports the largest difference. Anything below about $10^{-7}$ is agreement.

OperationJacobianResult

For $SE(3)$ the same table holds with $6\times6$ blocks: $\operatorname{Ad}_T$ from Part 8, $J_r(\tau)$ with the $Q$ block of Barfoot, and the action Jacobian $\partial(Tp)/\partial\tau = [\,R\ \ -R[p]_\times\,]$. The last rows check two of these as well.

4

The chain rule on two real residuals

A pose-graph edge and a reprojection error

🎯 Goal: assemble the Jacobian of a real residual by chaining table entries, exactly as an optimizer's hand-written factor does, and verify it.

Jacobians compose like ordinary derivatives: $J_{f\circ g} = J_f\,J_g$. Two residuals cover most of SLAM and structure from motion.

Rotation pose-graph edge. A relative measurement $Z \approx R_1^\top R_2$ gives the residual $r = \operatorname{Log}(Z^\top R_1^\top R_2)$. Chaining the Log, compose and inverse rules gives

$$ \frac{\partial r}{\partial\delta_2} = J_r^{-1}(r), \qquad \frac{\partial r}{\partial\delta_1} = -J_l^{-1}(r)\,Z^\top. $$

Reprojection (bundle adjustment). A camera with pose $T_{WC}$ sees a world point $p_W$ at pixel $z$. The camera-frame point is $p_C = T_{WC}^{-1}p_W$, and the residual is $r = \pi(p_C) - z$ with pinhole projection $\pi$. Perturbing the pose on the right:

$$ \frac{\partial p_C}{\partial\tau} = \bigl[\,-I\ \ \ [p_C]_\times\,\bigr], \qquad \frac{\partial\pi}{\partial p_C} = \begin{bmatrix} f/Z & 0 & -fX/Z^2\\ 0 & f/Z & -fY/Z^2\end{bmatrix}, \qquad \frac{\partial r}{\partial\tau} = \frac{\partial\pi}{\partial p_C}\frac{\partial p_C}{\partial\tau}\ \ (2\times6). $$
5

Numerical Jacobians and the step size

Truncation error versus round-off

🎯 Goal: choose a finite-difference step sensibly, and use numerical Jacobians the way professionals do: as a test for analytic ones.

A central difference in the tangent space, $\bigl(f(X\oplus he_k)\ominus f(X\ominus\ldots)\bigr)/2h$, has truncation error proportional to $h^2$ and round-off error proportional to $\varepsilon_{\text{mach}}/h$. The total is smallest near $h\approx\varepsilon_{\text{mach}}^{1/3}\approx 10^{-5}$, where roughly 10 of the 16 digits survive. That is plenty to test an analytic Jacobian, but too slow and too noisy to use inside a large optimizer, and useless at a point where the function is not smooth. The standard practice is to write the analytic Jacobian, then keep a numerical check in the test suite, exactly like the buttons above. The plot shows the V-shaped error curve for $J_r$ itself.

$\log_{10}\lVert J_{\text{numeric}}(h) - J_r\rVert$ against $\log_{10}h$, for forward (magenta) and central (blue) differences.

6

Check your understanding

0/5 answered