Linear Algebra
11.912 min read

The Jacobian Matrix

For a scalar function f:RnRf: \mathbb{R}^n \to \mathbb{R}, the derivative at a point is a 1×n1 \times n row vector of partial derivatives. The Jacobian matrix generalizes this to vector-valued functions f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m.

If f(x)=(f1(x),,fm(x))\mathbf{f}(\mathbf{x}) = (f_1(\mathbf{x}), \ldots, f_m(\mathbf{x})), then the Jacobian is the m×nm \times n matrix whose (i,j)(i,j) entry is fi/xj\partial f_i / \partial x_j:

Df(a)=Jf(a)=[f1/x1f1/xnfm/x1fm/xn]x=aD\mathbf{f}(\mathbf{a}) = J\mathbf{f}(\mathbf{a}) = \begin{bmatrix} \partial f_1/\partial x_1 & \cdots & \partial f_1/\partial x_n \\ \vdots & \ddots & \vdots \\ \partial f_m/\partial x_1 & \cdots & \partial f_m/\partial x_n \end{bmatrix}_{\mathbf{x}=\mathbf{a}}

Row ii of the Jacobian is the gradient of component fif_i. Column jj of the Jacobian is the vector of partial derivatives with respect to xjx_j — how each output changes when input xjx_j changes.

Formal View

Definition 11.10 — Jacobian Matrix
Let f:DRnRm\mathbf{f}: D \subseteq \mathbb{R}^n \to \mathbb{R}^m with component functions f1,,fmf_1, \ldots, f_m. The Jacobian matrix of f\mathbf{f} at a\mathbf{a} is
Jf(a)=[Tf1(a)Tfm(a)]Rm×nJ\mathbf{f}(\mathbf{a}) = \begin{bmatrix} \nabla^T f_1(\mathbf{a}) \\ \vdots \\ \nabla^T f_m(\mathbf{a}) \end{bmatrix} \in \mathbb{R}^{m \times n}
where each row is the gradient (transposed) of one output component.

Also written Df(a)Df(\mathbf{a}), f/x(a)\partial\mathbf{f}/\partial\mathbf{x}(\mathbf{a}), or Jf(a)J_\mathbf{f}(\mathbf{a}).

Theorem 11.3 — LLA via Jacobian
If f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m is differentiable at a\mathbf{a}, then
f(a+h)f(a)+Jf(a)h\mathbf{f}(\mathbf{a}+\mathbf{h}) \approx \mathbf{f}(\mathbf{a}) + J\mathbf{f}(\mathbf{a})\,\mathbf{h}
with error o(h)o(\|\mathbf{h}\|). The Jacobian is the unique m×nm \times n matrix satisfying this approximation.

Interactive Visualization

Matrix-Vector Multiplication

Why This Matters

The Jacobian is the fundamental object of multivariable calculus — it encodes all first-order information about a vector-valued map.

  • Neural network backpropagation computes Jacobians to propagate gradients through layers
  • Robotics: Jacobians relate joint velocities to end-effector velocities
  • The determinant of the Jacobian (Jacobian determinant) gives volume scaling factors in change-of-variables for integrals

Quiz

Question 1

For f:R3R2\mathbf{f}: \mathbb{R}^3 \to \mathbb{R}^2, what is the shape of the Jacobian matrix JfJ\mathbf{f}?

Question 2

The (i,j)(i,j) entry of Jf(a)J\mathbf{f}(\mathbf{a}) is:

Common Mistakes

  • Transposing the Jacobian — rows correspond to output components, columns to input variables.
  • Confusing the Jacobian (matrix) with the gradient (vector) — the gradient is the Jacobian only for scalar-valued functions, and it is a column vector, not a row vector.
  • Computing entries as fj/xi\partial f_j/\partial x_i instead of fi/xj\partial f_i/\partial x_j — the first index is the output, the second is the input.