Jacobian vs Gradient
Both are collections of partial derivatives. A gradient is for functions with one output; a Jacobian is for functions with many — and a gradient is simply a Jacobian with one row.
Both are collections of derivatives. The difference is the shape of what you are differentiating.
A gradient is for functions with one output. A Jacobian is for functions with many. That is it — and a gradient is precisely a Jacobian that happens to have a single row.
The shapes
For a function producing one number, the gradient collects one partial derivative per input:
The ∇ symbol is "nabla" or just "grad". Each entry answers: if I nudge this one input, how much does the output move? Together they point in the direction of steepest increase — which is why gradient descent goes the opposite way.
For a function producing m outputs from n inputs, you need that same row for every output. Stack them and you have the Jacobian, an grid:
Row i, column j answers: how much does output i move when input j is nudged? Row i on its own is the gradient of output i.
Why deep learning mostly says "gradient"
Training minimises a loss, and a loss is always a single number. One output, many inputs — that is the gradient case, every time. Hence the vocabulary: gradient descent, gradient clipping, vanishing gradients.
Jacobians are still there, just not spoken about. Every intermediate layer maps many numbers to many numbers, so each layer has a Jacobian. Backpropagation is a chain of Jacobian multiplications — with one convenient detail:
Because the final loss is a single number, backprop propagates a row vector backwards through those Jacobians rather than ever building them. A full Jacobian for a layer with 10,000 inputs and outputs would have 100 million entries. Frameworks compute vector-Jacobian products instead, which is why training is affordable at all.
Where each shows up
- Gradient — training loss, optimisation, feature attribution. Anything that scores a model with one number.
- Jacobian — normalising flows, sensitivity analysis, robotics, physics simulation. Anywhere a vector maps to a vector and you need every cross-term.
- Hessian — worth naming here: the matrix of second derivatives of a one-output function. It describes curvature rather than slope. Second-order optimisers use it; most training does not, because it is and n is in the billions.
Quick reference
| Inputs | Outputs | Shape | Notation | |
|---|---|---|---|---|
| Derivative | 1 | 1 | scalar | |
| Gradient | many | 1 | vector (n) | |
| Jacobian | many | many | matrix (m×n) | |
| Hessian | many | 1 | matrix (n×n) |
The short version
- Both are just organised collections of partial derivatives.
- Gradient: one output, so one row. Points uphill.
- Jacobian: many outputs, so one row each.
- A gradient is a one-row Jacobian; the Jacobian is the general case.
- Deep learning says "gradient" because a loss is one number — but Jacobians are what backprop multiplies, without ever building them.
Related
- Gradient descent, by hand — the gradient put to work, with the chain rule in full.
- The dot product — the operation underneath all this matrix arithmetic.
- The maths you actually need — the four ideas this is one of.