Jacobian matrix

Level UniversityDifficulty ★★★★★Concept⌖ Open in the map

What is it?

For F:ℝn→ℝmF : \R^n \to \R^m, the m×nm \times n matrix of all partial derivatives ∂Fi/∂xj\partial F_i/\partial x_j: the best linear approximation of FF near a point. Its determinant measures how FF stretches volumes.

Why does it exist?

When both input and output are vectors, "the derivative" has to say how each output responds to each input: an m×nm \times n table of rates. Arranged as a matrix it composes by multiplication (chain rule), inverts when FF is locally invertible, and its determinant gives the change-of-variables factor in integrals.

Intuition

Zoom in on a smooth map until it looks linear: the Jacobian is that linear map. A tiny square at xx is mapped to a tiny parallelogram spanned by the columns of JJ; its area is ∣det⁡J∣|\det J| times the square's. For a robot arm, column jj is how fast the hand moves when joint jj turns.

Formal definition

JF(x)=(∂F1∂x1⋯∂F1∂xn⋮⋮∂Fm∂x1⋯∂Fm∂xn),F(x+h)=F(x)+JF(x) h+o(∥h∥).J_F(x) = \begin{pmatrix} \frac{\partial F_1}{\partial x_1} & \cdots & \frac{\partial F_1}{\partial x_n} \\ \vdots & & \vdots \\ \frac{\partial F_m}{\partial x_1} & \cdots & \frac{\partial F_m}{\partial x_n}\end{pmatrix}, \qquad F(x + h) = F(x) + J_F(x)\,h + o(\norm h).

Inverse function theorem: if m=nm = n and det⁡JF(a)≠0\det J_F(a) \ne 0, FF is invertible near aa with JF−1=JF−1J_{F^{-1}} = J_F^{-1}.

Formulas

(JF)ij=∂Fi∂xj(J_F)_{ij} = \frac{\partial F_i}{\partial x_j}
p˙=J(q) q˙\dot p = J(q)\,\dot q
robot velocity kinematics
pY(y)=pX(x) ∣det⁡JF(x)∣−1,y=F(x)p_Y(y) = p_X(x)\,\big|\det J_F(x)\big|^{-1}, \quad y = F(x)
densities under an invertible map (normalizing flows)

Example

Polar coordinates F(r,θ)=(rcos⁡θ,rsin⁡θ)F(r, \theta) = (r\cos\theta, r\sin\theta): J=(cos⁡θ−rsin⁡θsin⁡θrcos⁡θ)J = \begin{pmatrix}\cos\theta & -r\sin\theta\\ \sin\theta & r\cos\theta\end{pmatrix}, det⁡J=r\det J = r. That rr is the familiar factor in dx dy=r dr dθ\dd x\,\dd y = r\,\dd r\,\dd\theta.

Why does it matter?

Robotics lives on Jacobians (velocity kinematics, inverse kinematics, singularities where det⁡J=0\det J = 0). Newton's method for systems inverts one per step. Normalizing flows need cheap log⁡∣det⁡J∣\log|\det J|. Autodiff frameworks never build Jacobians explicitly: they compute Jacobian–vector (JVP) and vector–Jacobian (VJP) products.

Where it shows up in computing

  • Robot Jacobian (velocity kinematics)★★★★★fundamentalRobotics and control

    Maps joint velocities to end-effector velocities; its singularities are configurations where the arm loses mobility.

  • Inverse kinematics★★★★★fundamentalRobotics and control

    IK solvers iterate Δq=J+Δp\Delta q = J^{+}\Delta p (pseudo-inverse) or damped least squares.

  • Kalman filter★★★★★frequentRobotics and control

    The extended Kalman filter propagates covariances with the Jacobians of the dynamics and measurement models.

Where it shows up in AI

  • Generative models★★★★★fundamentalAI and machine learning

    Normalizing flows compute exact likelihoods via log⁡pX=log⁡pZ+log⁡∣det⁡J∣\log p_X = \log p_Z + \log|\det J|, designing layers with cheap determinants.

  • Automatic differentiation★★★★★fundamentalAI and machine learning

    AD computes JVPs (forward mode) and VJPs (reverse mode) without materializing JJ.

Where is it used?

Computing topics reachable from here, through the chain of ideas that leads to them:

What depends on it

Exercises

1Computation

Compute the Jacobian of F(x,y)=(x2−y2, 2xy)F(x, y) = (x^2 - y^2,\ 2xy) and its determinant. Where is FF not locally invertible?

Solution

J=(2x−2y2y2x)J = \begin{pmatrix}2x & -2y\\ 2y & 2x\end{pmatrix}, det⁡J=4(x2+y2)\det J = 4(x^2 + y^2). Only at the origin (FF is z↦z2z \mapsto z^2 in complex form).

2Applied

A 2-link planar arm with lengths ℓ1,ℓ2\ell_1, \ell_2 has hand position p=(ℓ1cos⁡q1+ℓ2cos⁡(q1+q2), ℓ1sin⁡q1+ℓ2sin⁡(q1+q2))p = (\ell_1\cos q_1 + \ell_2\cos(q_1+q_2),\ \ell_1\sin q_1 + \ell_2\sin(q_1+q_2)). When is det⁡J=0\det J = 0?

Solution

det⁡J=ℓ1ℓ2sin⁡q2\det J = \ell_1\ell_2\sin q_2: zero when q2=0q_2 = 0 or π\pi — arm fully stretched or folded. There the hand cannot move radially.

↑ ↓ to navigate · ↵ · Esc