The Jacobian
Forward kinematics
answers the easy question: given the joint angles, where does the hand end up? The map
f takes a joint vector \theta
(all the angles of the arm) and returns the end-effector pose
x (the hand's position, and often its orientation too):
x \;=\; f(\theta).
Inverse kinematics wants the reverse — "put the hand here, what angles do I need?"
— and that map has no tidy formula for a real chain. So animators don't invert
f directly. They invert its local linear approximation,
take a small step, and repeat. That linear approximation is the Jacobian, and it is
the single most important object in all of IK. This page is about what it is, the gorgeous
geometric shortcut for building it, and the cliff-edge — the singularity — where it
falls apart.
The Jacobian is a bundle of partial derivatives
The map f has several outputs (the coordinates of
x) and several inputs (the joints in \theta).
The Jacobian collects every partial derivative "output i
with respect to input j" into one matrix:
J \;=\; \frac{\partial f}{\partial \theta} \;=\; \begin{bmatrix} \dfrac{\partial x_1}{\partial \theta_1} & \cdots & \dfrac{\partial x_1}{\partial \theta_n} \\[1.2em] \vdots & \ddots & \vdots \\[0.6em] \dfrac{\partial x_m}{\partial \theta_1} & \cdots & \dfrac{\partial x_m}{\partial \theta_n} \end{bmatrix}.
- The Jacobian is the best linear map from small joint changes to small
end-effector changes near the current pose:
dx = J\,d\theta.
- Dividing by time gives the velocity form:
\dot{x} = J\,\dot{\theta} — end-effector velocity equals
J times joint velocities.
- It is configuration-dependent: J is recomputed at
every pose, because the arm's geometry — and therefore its derivatives — changes as it moves.
Read dx = J\,d\theta out loud: "nudge the joints by
d\theta, and the hand moves by J\,d\theta."
That is the promise the Jacobian makes, and it is exactly linear — true only for
infinitesimal steps, which is why IK takes small ones.
The beautiful fact: each column is one joint's contribution
A matrix times a vector is a weighted sum of the matrix's columns. So
\dot{x} = J\,\dot{\theta} says the hand's velocity is a blend of the
columns of J, one per joint, each weighted by that joint's speed. Freeze
every joint but the j-th and spin it at unit rate: the hand traces out
exactly column j.
For a revolute joint with rotation axis a (a unit vector) located at
point p, the end-effector at x_{\text{end}}
sweeps a circle about that axis, so its column of the Jacobian is the cross product
J_j \;=\; a \times \left(x_{\text{end}} - p\right).
The lever arm x_{\text{end}} - p points from the joint to the hand;
crossing it with the axis gives the instantaneous circular velocity — perpendicular to both, exactly
the direction the hand is being carried.
This is a genuinely lovely result: no messy differentiation needed for a chain of revolute joints —
just walk the skeleton, and for each joint take one cross product of its axis with the vector to the
hand. Stack those columns side by side and you have built J.
The picture below shows a two-link planar arm and the two column-vectors — the hand velocity you'd get
from wiggling the shoulder alone (blue) versus the elbow alone (orange).
Worked example: the 2×2 Jacobian of a planar arm
Two links of length L_1, L_2, shoulder angle
\theta_1, elbow angle \theta_2. Forward
kinematics places the hand at
x = L_1\cos\theta_1 + L_2\cos(\theta_1+\theta_2), \qquad y = L_1\sin\theta_1 + L_2\sin(\theta_1+\theta_2).
Differentiate each output by each input. Writing s_1 = \sin\theta_1,
s_{12} = \sin(\theta_1+\theta_2) and likewise for cosines:
J = \begin{bmatrix} \dfrac{\partial x}{\partial \theta_1} & \dfrac{\partial x}{\partial \theta_2} \\[1em] \dfrac{\partial y}{\partial \theta_1} & \dfrac{\partial y}{\partial \theta_2} \end{bmatrix} = \begin{bmatrix} -L_1 s_1 - L_2 s_{12} & -L_2 s_{12} \\[0.6em] \;\;L_1 c_1 + L_2 c_{12} & \;\;L_2 c_{12} \end{bmatrix}.
Now the punchline. Take the determinant and let the angle-addition identity do the work:
\det J = \left(-L_1 s_1 - L_2 s_{12}\right)\!\left(L_2 c_{12}\right) - \left(-L_2 s_{12}\right)\!\left(L_1 c_1 + L_2 c_{12}\right) = L_1 L_2\,\big(c_1 s_{12} - s_1 c_{12}\big).
The bracket is \sin\big((\theta_1+\theta_2) - \theta_1\big) = \sin\theta_2,
so it all collapses to a single clean expression:
\det J \;=\; L_1 L_2 \sin\theta_2.
- It depends only on the elbow angle \theta_2, not on
\theta_1 — the whole arm can swing around and the conditioning is
unchanged.
- It vanishes exactly when \sin\theta_2 = 0, i.e.
\theta_2 = 0 (arm fully straight) or
\theta_2 = \pi (fully folded back).
Plug in numbers: L_1 = 2, L_2 = 1.5,
\theta_2 = 90^\circ gives
\det J = 2 \cdot 1.5 \cdot \sin 90^\circ = 3 — a wide-open, healthy pose.
Push \theta_2 \to 0 and \det J \to 0: the arm
straightens and the Jacobian goes rank-deficient.
The singularity: when the columns line up
When \det J = 0 the matrix is singular — its two columns
have become parallel. Geometrically, on a straight arm both joints push the hand in
the same direction (along the arm's perpendicular): the hand can move along the reach, but it
has momentarily lost a degree of freedom — there is a direction (straight out along
the arm) it simply cannot travel at that instant, no matter how you spin the joints. The reachable
velocities collapse from a full plane down to a single line.
This is where naive IK dies. To move the hand we solve
d\theta = J^{-1} dx, but J^{-1} contains a
1/\det J. As \det J \to 0 the required joint
velocities explode toward infinity — the solver asks the elbow to snap through a
huge angle for a tiny hand motion, and the animation flails or spikes. Drag the slider below and
watch \det J (and the manipulability
\sqrt{\det(JJ^{\mathsf T})} = |\det J|, a "how far from singular am I"
score) sink to zero at \theta_2 = 0 and \pi.
The zeros never move — they sit at \theta_2 = 0, \pi, 2\pi for
any link lengths, because \sin\theta_2 owns them. Between the
zeros the arm is well-conditioned; the peak of manipulability is the "sweet spot" pose (here the
right-angle elbow) where the hand is most freely steerable.
Why IK linearises, step by step
Because there's no closed-form inverse of f, iterative IK does this loop:
\text{error } e = x_{\text{target}} - f(\theta) \;\longrightarrow\; \text{solve } J\,\Delta\theta = e \;\longrightarrow\; \theta \leftarrow \theta + \Delta\theta \;\longrightarrow\; \text{rebuild } J \;\longrightarrow\; \text{repeat.}
Each pass treats the arm as if it were linear — trusts the Jacobian's promise
dx = J\,d\theta for one small step, moves, then throws that
J away and computes a fresh one at the new pose. It is
Newton's method,
lifted to many dimensions: follow the local slope toward the goal, re-measure the slope, follow again.
Convergence is quick and smooth — until the arm nears a singularity, where
J becomes uninvertible and the step blows up. Taming that blow-up is the
job of the next lesson.
The trap is that a pose can look perfectly innocent — a nearly-straight arm reaching for something
just past its comfortable range — yet be a hair away from \det J = 0. As
\det J \to 0, the inverse J^{-1} = \tfrac{1}{\det J}\,\text{adj}\,J
has that 1/\det J factor blow up, so
\Delta\theta = J^{-1} e demands enormous joint velocities for a tiny target
move. The rig snaps, jitters, or wind-mills its joints — the classic IK "flail." Never invert
J naively. The standard fix is damped least squares
(the Levenberg–Marquardt idea): solve
\Delta\theta = J^{\mathsf T}\!\left(JJ^{\mathsf T} + \lambda^2 I\right)^{-1} e
instead, where the \lambda^2 term keeps the matrix invertible even when
\det J = 0 — trading a little accuracy for a velocity that stays finite and
the motion stays smooth. That is exactly why damped least squares exists, and it's the very next
lesson: Damped least squares (DLS).
In first-year calculus the derivative of f(x) is one number: a slope. But
forward kinematics has several inputs (the joints) and several outputs (the hand's
coordinates), so its derivative can't be a single number — it must record how every output
responds to every input. That's precisely a matrix of partial derivatives, and it is the
honest multi-dimensional generalisation of "the slope." Everything you know still holds: a tangent
line becomes a tangent linear map, and Newton's "follow the slope" becomes "solve
J\,\Delta\theta = e." A square J even has a
determinant, and — just like a 1\times 1 derivative hitting zero at a
critical point — \det J = 0 is where the map momentarily stops being
locally invertible.