The Jacobian of a vector-valued function f : R n → R m \mathbf{f}: \mathbb{R}^n \to \mathbb{R}^m f : R n → R m is the m × n m \times n m × n matrix of all partial derivatives:
J = [ ∂ f 1 ∂ x 1 ⋯ ∂ f 1 ∂ x n ⋮ ⋱ ⋮ ∂ f m ∂ x 1 ⋯ ∂ f m ∂ x n ] J = \begin{bmatrix} \frac{\partial f_1}{\partial x_1} & \cdots & \frac{\partial f_1}{\partial x_n} \\ \vdots & \ddots & \vdots \\ \frac{\partial f_m}{\partial x_1} & \cdots & \frac{\partial f_m}{\partial x_n} \end{bmatrix} J = ∂ x 1 ∂ f 1 ⋮ ∂ x 1 ∂ f m ⋯ ⋱ ⋯ ∂ x n ∂ f 1 ⋮ ∂ x n ∂ f m
Intuition: the Jacobian is the best linear approximation of f \mathbf{f} f near a point: f ( x + δ ) ≈ f ( x ) + J δ \mathbf{f}(\mathbf{x} + \delta) \approx \mathbf{f}(\mathbf{x}) + J\delta f ( x + δ ) ≈ f ( x ) + J δ .
Special cases:
When m = 1 m = 1 m = 1 (scalar output): Jacobian reduces to the Gradient (as a row vector)
When n = 1 n = 1 n = 1 (scalar input): Jacobian is the derivative vector
In deep learning: each layer h l + 1 = f l ( h l ) \mathbf{h}_{l+1} = f_l(\mathbf{h}_l) h l + 1 = f l ( h l ) has a Jacobian J l = ∂ h l + 1 ∂ h l J_l = \frac{\partial \mathbf{h}_{l+1}}{\partial \mathbf{h}_l} J l = ∂ h l ∂ h l + 1 . Backpropagation multiplies these Jacobians via the Chain Rule (Multivariable) :
∂ L ∂ h l = ∂ L ∂ h l + 1 ⋅ J l \frac{\partial L}{\partial \mathbf{h}_l} = \frac{\partial L}{\partial \mathbf{h}_{l+1}} \cdot J_l ∂ h l ∂ L = ∂ h l + 1 ∂ L ⋅ J l
If Jacobian singular values are consistently < 1 < 1 < 1 → vanishing gradients. If > 1 > 1 > 1 → exploding gradients.
Useful Jacobians (the building blocks of backprop):
∂ ∂ x ( W x + b ) = W , ∂ ∂ b ( W x + b ) = I , ∂ ∂ z f ( z ) = diag ( f ′ ( z ) ) , ∂ ∂ u ( u ⊤ h ) = h ⊤ \frac{\partial}{\partial \mathbf{x}}(W\mathbf{x} + \mathbf{b}) = W, \quad
\frac{\partial}{\partial \mathbf{b}}(W\mathbf{x} + \mathbf{b}) = I, \quad
\frac{\partial}{\partial \mathbf{z}} f(\mathbf{z}) = \operatorname{diag}(f'(\mathbf{z})), \quad
\frac{\partial}{\partial \mathbf{u}}(\mathbf{u}^\top \mathbf{h}) = \mathbf{h}^\top ∂ x ∂ ( W x + b ) = W , ∂ b ∂ ( W x + b ) = I , ∂ z ∂ f ( z ) = diag ( f ′ ( z )) , ∂ u ∂ ( u ⊤ h ) = h ⊤
An element-wise activation has a diagonal Jacobian because h i = f ( z i ) h_i = f(z_i) h i = f ( z i ) depends only on z i z_i z i .
Jacobian determinant: ∣ det ( J ) ∣ |\det(J)| ∣ det ( J ) ∣ measures how the transformation locally scales volumes (used in normalizing flows and change of variables for probability distributions).
See also: Hessian Matrix , Gradient