Linear Algebra · Theory · M10
M10-T8 — Jacobians on Lie Groups
To optimise or filter poses we need derivatives with respect to the tangent vector. A handful of formulas, built on the adjoint, supply all of them.
A pose-graph optimiser, an error-state Kalman filter and a visual-odometry back end all need the derivative of some function of poses with respect to a small update. On a manifold that derivative is taken with respect to the tangent perturbation of the previous lessons, giving Jacobians with a clean algebra. This lesson collects the formulas, shows where they come from, and checks them numerically.
Learning objectives
After this lesson, you should be able to:
- Define the derivative of a function of a pose with respect to a right (or left) tangent perturbation.
- Derive and use ∂(Rp)/∂δ, the composition and inverse Jacobians, via the adjoint.
- State the right and left Jacobians of SO(3), Jr(ω) and Jl(ω), and their small-angle limits.
- Assemble the Jacobian of a pose-graph residual and verify Jacobians numerically.
Introduction and motivation
In EKF-SLAM or pose-graph optimisation, the observation of a landmark in a camera frame depends on the robot pose through p_c = R_cwᵀ(p_w − t). The solver needs ∂p_c/∂δ for a small pose update δ: a 3 × 6 matrix. Computed by hand with Euler angles this is a page of trigonometry and a source of bugs. In the Lie formulation it is two lines. The same few identities cover rotating a point, composing two poses, inverting a pose and differentiating the exponential.
The intuition
The idea is always: perturb the pose slightly in the tangent space (multiply by exp(δ)), see how the function changes to first order, and read off the matrix that maps δ to the change. Because the perturbation is a small rotation about some axis, its effect on a point is the cross product δ × (rotated point), which is a skew-matrix multiplication: that is where −R[p]ₓ comes from. Everything else follows by moving δ through other poses with the adjoint.
Interactive figure. A rotated box with a small perturbation on the right or left; the readout lists the equivalent perturbation in the other convention, the adjoint, which converts between the Jacobians for right and left perturbations. This figure needs JavaScript to be interactive.
Geometric and physical interpretation
Geometric view. The derivative of f: SO(3) → ℝᵐ at R in direction δ is lim_{h→0} (f(R exp(hδ)) − f(R))/h: a linear map from the 3-dimensional tangent space to ℝᵐ, i.e. an m × 3 matrix. It depends on the chart (left or right) only by the adjoint factor R. Physical view. Rotating a body by a tiny δ about its own axes moves a point at body position p by R(δ × p) = −R[p]ₓδ: velocity equals angular velocity cross radius. The Jacobian of the point with respect to attitude is therefore the skew matrix of the lever arm, rotated into the right frame.
The mathematics
- f(R)
- a function of a rotation (or pose), e.g. R p, R₁R₂ or R⁻¹.
- ∂f/∂δ
- the derivative with respect to a right perturbation: lim (f(R exp([hδ]ₓ)) − f(R))/h.
- Jr(ω), Jl(ω)
- the right and left Jacobians of SO(3): exp(ω + δ) ≈ exp(ω)exp(Jrδ) ≈ exp(Jlδ)exp(ω).
- Ad_R = R
- the adjoint of SO(3); of SE(3) it is Ad_T = [[R, [t]ₓR], [0, R]].
Right-perturbation Jacobians
∂(R p)/∂δ = − R [p]ₓ, ∂(R₁R₂)/∂δ₁ = R₂ᵀ, ∂(R₁R₂)/∂δ₂ = I, ∂(R⁻¹)/∂δ = − R
What it means. The results are matrices acting on the tangent perturbation. For composition the entries are in the tangent space of the result: the perturbation of the first factor is rotated by R₂ᵀ (the adjoint of R₂⁻¹).
Left-perturbation counterparts
∂(R p)/∂δl = − [R p]ₓ, ∂(R₁R₂)/∂δl,1 = I (in world axes), ∂(R⁻¹)/∂δl = − Rᵀ
What it means. The left Jacobian of a rotated point is minus the skew matrix of the rotated point itself, with no extra R. The two conventions differ by exactly the adjoint: ∂/∂δl = (∂/∂δr) Rᵀ.
Jacobians of the exponential
Jr(ω) = I − ((1 − cos θ)/θ²)[ω]ₓ + ((θ − sin θ)/θ³)[ω]ₓ², Jl(ω) = Jr(−ω) = Jr(ω)ᵀ, Jr ≈ I − ½[ω]ₓ
What it means. They tell how the tangent perturbation of the rotation vector turns into a tangent perturbation at the resulting rotation. For small ω they tend to the identity, which is why small-angle formulas look like ordinary calculus.
∂(Rp)/∂δ = −R[p]ₓ (right), −[Rp]ₓ (left); ∂(R₁R₂)/∂δ₁ = R₂ᵀ, ∂/∂δ₂ = I; ∂R⁻¹/∂δ = −R; exp(ω+δ) ≈ exp(ω)exp(Jrδ). The left and right Jacobians differ by the adjoint.
Step-by-step derivation: the table from the adjoint
- Rotating a point. Perturb on the right:
R exp([δ]ₓ)p ≈ R(I + [δ]ₓ)p = Rp + R[δ]ₓp = Rp − R[p]ₓδ(since[δ]ₓp = δ × p = −p × δ = −[p]ₓδ). Hence∂(Rp)/∂δ = −R[p]ₓ. - Left perturbation.
exp([δ]ₓ)Rp ≈ Rp + δ × (Rp) = Rp − [Rp]ₓδ, so∂(Rp)/∂δ_l = −[Rp]ₓ. Check the consistency−[Rp]ₓR = −R[p]ₓ(usingR[p]ₓRᵀ = [Rp]ₓ), i.e. left = right × Rᵀ. - Composition. A right perturbation of the first factor:
(R₁exp(δ))R₂ = R₁R₂ · R₂ᵀexp(δ)R₂ = R₁R₂ exp([R₂ᵀδ]ₓ)(adjoint identity). In the tangent space of the product the change isR₂ᵀδ: JacobianR₂ᵀ. A right perturbation of the second factor:R₁(R₂exp(δ)) = (R₁R₂)exp(δ): JacobianI. - Inverse.
(R exp(δ))⁻¹ = exp(−δ)R⁻¹ = R⁻¹ · R exp(−δ)Rᵀ ·… = R⁻¹ exp([−Rδ]ₓ), so the perturbation of the inverse in its own right tangent space is−Rδ: Jacobian−R. - Right Jacobian. Define
J_r(ω)byexp(ω + δ) ≈ exp(ω)exp(J_r(ω)δ), equivalentlyJ_r(ω)δ = log(exp(ω)ᵀexp(ω + δ))to first order. Differentiating the series of exp givesJ_r(ω) = Σₙ (−1)ⁿ[ω]ₓⁿ/(n + 1)!, which sums with the cycle of powers toI − (1 − cos θ)/θ²[ω]ₓ + (θ − sin θ)/θ³[ω]ₓ². The left Jacobian replaces ω by −ω, giving the transpose; the two satisfyJ_l = R J_r. - Inverse Jacobian. For small ω,
J_r⁻¹ ≈ I + ½[ω]ₓandJ_r⁻¹(ω) = I + ½[ω]ₓ + (1/θ² − (1 + cos θ)/(2θ sin θ))[ω]ₓ²in general. It appears in the derivative of the logarithm:∂log(R exp(δ))/∂δ = J_r⁻¹(log R). - Pose-graph residual. For an edge with measurement Z between poses i and j,
r = log(Zᵀ R_iᵀ R_j). Perturb j on the right:R_j exp(δ_j)givesr ≈ r₀ + J_r⁻¹(r₀)δ_j. Perturb i on the right:(R_iexp(δ_i))ᵀR_j = exp(−δ_i)R_iᵀR_j = R_iᵀR_j exp(−R_jᵀR_iδ_i), so∂r/∂δ_i = −J_r⁻¹(r₀)R_jᵀR_i. At a solution (r₀ ≈ 0) these areIand−R_jᵀR_i(= −Ad of the relative pose). - Chain rule and checking. Compose these building blocks with the chain rule of Module 8. Always verify with central differences using the manifold plus:
(f(x ⊞ hδ) − f(x ⊞ −hδ))/2hwithh ≈ 10⁻⁶; the error should be about 10⁻⁹ for a correct Jacobian.
SE(3) versions. For a pose T = (R, t) and a point p, a right perturbation ξ = (δv, δθ) gives ∂(Tp)/∂ξ = [R, −R[p]ₓ], a 3 × 6 matrix; composition and inverse use Ad_{T₂⁻¹} and −Ad_T in place of R₂ᵀ and −R. The structure is the same.
Covariance connection. An uncertain pose with tangent covariance Σ maps to an uncertain point with covariance J Σ Jᵀ (Module 9) using the matrix above: the uncertainty ellipse of a landmark seen from an uncertain camera has the lever-arm shape: larger for far points.
A worked example: numbers for the table
Let ω = (0.3, −0.2, 0.5), R = exp([ω]ₓ) (the rotation of the earlier lessons) and p = (1, 0.5, −0.3).
- Right Jacobian of Rp.
−R[p]ₓ = [[−0.207, −0.143, −0.928], [0.086, 0.198, 0.615], [0.538, −1.015, 0.103]]. A central finite difference withh = 10⁻⁶gives the same matrix to 10⁻⁹ ✓. - Left Jacobian of Rp.
−[Rp]ₓ = [[0, 0.096, −0.956], [−0.096, 0, 0.645], [0.956, −0.645, 0]](hereRp = (0.645, 0.956, 0.096), and the skew matrix is built from these components), a different matrix, related by right = left × R. - Right Jacobian of exp.
J_r(ω) = [[0.953, 0.232, 0.121], [−0.252, 0.944, 0.129], [−0.072, −0.162, 0.979]]; a numerical derivative oflog(exp(ω)ᵀexp(ω + δ))reproduces it to 10⁻⁹. Forω = (0, 0, 1),J_r = [[0.841, 0.460, 0], [−0.460, 0.841, 0], [0, 0, 1]], withsin 1 = 0.841,(1 − cos 1) = 0.460: andJ_l = J_rᵀ. - Left versus right.
J_l = R J_randJ_l = J_rᵀhold to 10⁻¹⁶. - Composition. With
R₁ = exp(0.2, 0.1, −0.3), perturbingR₁on the right byδ = 10⁻⁶e₁: the product moves byR₂ᵀδin the tangent space of the product, not by δ. - Pose-graph edge. Take two poses
R_i = exp(0.3, −0.2, 0.5)andR_j = exp(−0.1, 0.4, 0.2)and a perfect measurementZ = R_iᵀR_j. Thenr = 0and a finite difference ofrwith respect to a right perturbation of i in the first axis gives(−0.748, −0.231, −0.622), the first column of−R_jᵀR_i✓.
Robotics application
Pose-graph and bundle-adjustment solvers. Ceres, g2o and GTSAM all construct residual Jacobians from these building blocks (“local parameterisation” or “retraction”), solving for δ and updating by exp; see pose graphs, nonlinear least squares and robust optimisation.
Error-state Kalman filters. The transition and measurement Jacobians of the ESKF are built from −R[a]ₓ-type terms (the gravity and accelerometer coupling) and from Jr in the reset step; see the error-state Kalman filter, IMU preintegration and extrinsic calibration.
LiDAR registration. The Jacobian of a transformed point with respect to the pose update [I, −[Rp]ₓ] (left) is the building block of point-to-plane ICP: its rows are stacked to form JᵀJ; see ICP fundamentals and scan registration.
Manipulators and mobile robots. The geometric Jacobian of Module 8 is the Lie-group Jacobian of the end-effector pose with respect to joint angles; visual servoing uses the same ∂(Tp)/∂ξ.
Engineering implications and limitations
Practical rules
- Check every Jacobian numerically. Use central differences with the manifold plus (perturb with exp), h ≈ 10⁻⁶, and require agreement to about 10⁻⁷; do it in unit tests.
- Fix the side, then derive. Right and left Jacobians differ by the adjoint; if your library uses left and you derived right, the solver still runs but converges slowly or diverges.
- Use closed forms with series fallbacks. Jr and Jr⁻¹ involve 0/0 as θ → 0; use I − ½[ω]ₓ and I + ½[ω]ₓ for small angles.
- Drop Jr⁻¹ near convergence. At small residuals Jr⁻¹ ≈ I; many back ends use this approximation, which is exact at the solution.
- Do not differentiate through Euler angles. The singularity enters the Jacobian; differentiate in the tangent space instead.
- Keep dimensions straight. Residual dimension × 3 (or 6) per pose; assemble the sparse structure of the pose graph from these blocks.
Limits
All formulas are first-order and local; they are valid when the perturbation is small and the linearisation point is the current estimate. Near θ = π the logarithm and Jr⁻¹ become ill-conditioned, and large residuals make the approximation Jr⁻¹ ≈ I inaccurate.
Common misconceptions
“The Jacobian of Rp with respect to the rotation is [p]ₓ.”
It is −R[p]ₓ for a right perturbation and −[Rp]ₓ for a left one: the sign and the rotation matter.
“The Jacobian of R₁R₂ with respect to R₁ is R₂.”
In the tangent space of the product it is R₂ᵀ (right perturbation): the perturbation is transported by the adjoint of R₂⁻¹.
“Jr is the identity, so I can ignore it.”
Only for small rotation vectors (Jr ≈ I − ½[ω]ₓ). For angles of 30° or more the difference is 10 % or more.
“Differentiating with respect to the nine matrix entries is easier.”
It gives a 9-dimensional derivative for a 3-dimensional problem, a rank-deficient system and drift off the group; use the 3-dimensional tangent derivative.
Engineering takeaways
- Differentiate by perturbing in the tangent space: R → R exp([δ]ₓ); Jacobians are m × 3 (SO(3)) or m × 6 (SE(3)).
- Right: ∂(Rp)/∂δ = −R[p]ₓ; left: −[Rp]ₓ; composition ∂/∂δ₁ = R₂ᵀ, ∂/∂δ₂ = I; inverse −R; the two sides differ by the adjoint.
- Jr(ω) = I − (1 − cos θ)/θ²[ω]ₓ + (θ − sin θ)/θ³[ω]ₓ², Jl = Jrᵀ = RJ_r, Jr ≈ I − ½[ω]ₓ for small ω.
- A pose-graph residual r = log(ZᵀR_iᵀR_j) has Jacobians Jr⁻¹(r) and −Jr⁻¹(r)RjᵀR_i, approximately I and −RjᵀR_i near the solution.
- Verify with central differences on the manifold; match convention, series and units.
References and further reading
Primary papers and authoritative documentation.
- Solà, Deray and Atchuthan, A micro Lie theory for state estimation in robotics: A micro Lie theory for state estimation in robotics: Jacobians on Lie groups, the adjoint and the right/left Jacobians
- Barfoot, State Estimation for Robotics (author-hosted first edition, free to read): chapter 7, perturbing rotations and poses, and the Jacobians J and J⁻¹
- Solà, Quaternion kinematics for the error-state Kalman filter: Quaternion kinematics for the error-state Kalman filter: Jacobians of the error-state dynamics
- Modern Robotics (Lynch and Park), free preprint: chapter 5, the Jacobian in screw form and the adjoint representation
Knowledge check
Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.
Question 1
For R = I and p = (1, 0, 0), write ∂(Rp)/∂δ (right) and say what it means physically.
Explanation
−R[p]ₓ = −[p]ₓ = −[[0, 0, 0], [0, 0, −1], [0, 1, 0]] = [[0, 0, 0], [0, 0, 1], [0, −1, 0]]. A small rotation δ moves the point (1, 0, 0) by (0, δ₃, −δ₂): a turn about z moves it in +y, a turn about y moves it in −z, and a turn about x does nothing (the point is on the x-axis).
Question 2
Show that for composition ∂(R₁R₂)/∂δ₂ = I (right perturbation).
Explanation
(R₁R₂)exp([δ]ₓ) = R₁(R₂exp([δ]ₓ)): a right perturbation of R₂ is, by definition, a right perturbation of the product with the same vector, so the Jacobian is the identity.
Question 3
For ω = (0, 0, 0.1) estimate Jr(ω) to first order and its effect on the perturbation δ = (0.01, 0, 0).
Explanation
Jr ≈ I − ½[ω]ₓ, with [ω]ₓ = [[0, −0.1, 0], [0.1, 0, 0], [0, 0, 0]]. Jr δ = δ − ½ ω × δ = (0.01, 0, 0) − ½(0, 0.001, 0) = (0.01, −0.0005, 0): a 5 % sideways change, from the 0.1 rad rotation.
What’s next
That completes the course: from vectors and matrices, through least squares, eigenvalues and the SVD, to rotations, kinematics, uncertainty and the calculus of poses. The track page links the labs that will exercise these ideas, and the SLAM and UAV tracks apply them end to end.
Related content
Nothing below is required to finish this lesson.
- BeforeM10-T7: Perturbations on Manifolds
Perturb a pose by a small tangent vector, on the left or on the right, and use it to define errors.
Get notified when the next lesson and new labs are released.
One email per new lesson or lab.