Linear Algebra
13.212 min read

The Jacobian for Vector-Valued Functions

The derivative of a vector-valued function f:RnRm\mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m at a point a\mathbf{a} is the Jacobian matrix Jf(a)Rm×nJ\mathbf{f}(\mathbf{a}) \in \mathbb{R}^{m \times n}. Row ii of this matrix is the gradient (transposed) of the ii-th component function fif_i.

The Jacobian is defined by the best linear approximation property: 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}\|) as h0\mathbf{h} \to \mathbf{0}. The Jacobian is the unique m×nm\times n matrix satisfying this.

Computing the Jacobian: fill row ii with the partial derivatives of fif_i with respect to x1,,xnx_1, \ldots, x_n. Entry (i,j)(i,j) is fi/xj\partial f_i / \partial x_j.

Formal View

Definition 13.2 — Jacobian Matrix of a Vector-Valued Function
The Jacobian matrix of f=(f1,,fm)T:DRnRm\mathbf{f} = (f_1,\ldots,f_m)^T: D \subseteq \mathbb{R}^n \to \mathbb{R}^m at a\mathbf{a} is:
Jf(a)=[f1/x1f1/xnfm/x1fm/xn]x=aRm×nJ\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}} \in \mathbb{R}^{m\times n}

Special cases: m=1m=1 gives a 1×n1\times n row vector (gradient transposed); n=mn=m gives an n×nn\times n square matrix whose determinant is the Jacobian determinant.

Example 13.2 — Computing a Jacobian
For f(x,y)=(x2+y2,xy)T\mathbf{f}(x,y) = (x^2+y^2, xy)^T:
Jf=[2x2yyx]J\mathbf{f} = \begin{bmatrix} 2x & 2y \\ y & x \end{bmatrix}
At (1,2)(1,2): Jf(1,2)=[2421]J\mathbf{f}(1,2) = \begin{bmatrix}2&4\\2&1\end{bmatrix}.

Interactive Visualization

Matrix-Vector Multiplication

Why This Matters

The Jacobian is the multivariable derivative and appears in the chain rule, change-of-variables, and all first-order analysis of nonlinear maps.

  • Backpropagation in neural networks computes Jacobians of layer-wise functions
  • Change of variables in integration uses the Jacobian determinant
  • Inverse function theorem: a map is locally invertible iff its Jacobian is invertible

Quiz

Question 1

For f(x,y,z)=(x2z,y+z2)T\mathbf{f}(x,y,z) = (x^2z, y+z^2)^T, the Jacobian JfJ\mathbf{f} is a matrix of size:

Question 2

For f(x,y,z)=(x2z,y+z2)T\mathbf{f}(x,y,z) = (x^2z, y+z^2)^T at the point (1,1,1)(1,1,1), the (1,3)(1,3) entry of JfJ\mathbf{f} (row 1, col 3) is:

Common Mistakes

  • Transposing the Jacobian — rows correspond to output components, columns to input variables.
  • Computing fj/xi\partial f_j/\partial x_i instead of fi/xj\partial f_i/\partial x_j.
  • Forgetting that the Jacobian is evaluated at a specific point, not a general formula (though the formula is useful).