Jacobians on Lie groups
Every estimator in robotics and vision, whether Gauss–Newton, Levenberg–Marquardt, the EKF or bundle adjustment, needs the derivative of a residual with respect to a pose. A pose is not a vector, so "the derivative with respect to $R$" needs a definition. The one that works is the tangent-space derivative: perturb with $\oplus$, measure with $\ominus$, divide by the step. With it, derivatives on groups behave exactly like ordinary ones: they are matrices, they obey the chain rule, and a short table of elementary cases covers almost every residual in practice. This part builds that table and lets you verify every entry numerically.
What a derivative means on a group
Perturb with ⊕, measure with ⊖
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)$:
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
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.
The right and left Jacobians of SO(3)
The correction that makes Exp(a + b) behave
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:
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)$.
The elementary Jacobians, verified
Six building blocks for every residual
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.
| Operation | Jacobian | Result |
|---|
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.
The chain rule on two real residuals
A pose-graph edge and a reprojection error
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
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:
Numerical Jacobians and the step size
Truncation error versus round-off
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.