A gradient is a vector of partial derivatives for a function with one output. What replaces it when a function has several outputs at once — and what replaces the second derivative, which told you whether a 1D curve was bending up or down?
Drag the point around the bowl. Below it sits a small grid — the Jacobian of a different, vector-valued function evaluated at that same spot. Watch its four numbers shift as you move; unlike the single gradient arrow, this matrix has one row per output.
For a function , the Jacobian stacks the gradient of each output as a row:
- — the two output components of .
- — the Jacobian: every first partial derivative of every output, evaluated at .
For a single scalar function , the Hessian plays the analogous role for second derivatives — the matrix of every way of differentiating twice:
- — the Hessian of the scalar function at : its matrix of second partials.
- The Jacobian generalizes the gradient
For a scalar function ( has one output), the Jacobian is the gradient, just written as a row instead of a vector — nothing new, only more rows once there's more than one output.
- The Hessian generalizes the second derivative
Just as meant "curving upward" in one dimension, the Hessian's sign pattern says the same thing in two: a positive definite Hessian (both the top-left entry and the determinant positive) means curves upward in every direction — a genuine bowl.
- The Jacobian's determinant measures local stretching
Where , is locally invertible — near that point, doesn't collapse two different inputs onto the same output. Where , that guarantee breaks down.
Hessian is positive definite — f curves upward in every direction, a genuine bowl.
The Hessian of here never changes — is a fixed quadratic bowl, so its curvature is the same everywhere. The Jacobian of genuinely depends on where you are, which is exactly why it needs to be recomputed at every point instead of stated once.
Let and .
- Evaluate F and its Jacobian at (2, 3)
Differentiate each output with respect to each input:
That gives the general Jacobian
Now evaluate both and at :
- Its determinant
- The Hessian of f is constant
First partials:
Differentiate each of those again:
giving
everywhere — with no left in any entry, since is a fixed quadratic. Its determinant is and its top-left entry is , so is positive definite: a true bowl with one minimum, at the origin.
At the point (1, 4), compute the determinant of the Jacobian of F(x,y) = (x² + y, x + y²).
The Jacobian and Hessian are both just organized bookkeeping — a matrix instead of a vector or scalar — for derivatives you already know how to take. The Jacobian will resurface the moment backpropagation has to push gradients through a layer with more than one output; the Hessian will resurface the moment an optimizer wants to reason about curvature instead of just slope, which is exactly where the next chapter, Taylor series, picks up.