Ch.09
Jacobian Matrix: First Derivatives of Multivariable Vector Functions
Math diagram by chapter
Select a chapter to see its diagram below. View the flow of intermediate math at a glance.
Jacobian: when multiple inputs move, what about the output?
Ch.08 gradient for one output; Ch.09 Jacobian for several. Animation: left input → right output. First warp (), then linear patch ().
1. Input grid2. f: warp3. Small ▱4. J: linear
Red grid = coordinates, green arrow = map, orange ▱ = small patch under , purple ▱ = approximation. Similar ▱ shapes mean .
Picture a huge factory machine with many dials (inputs) and many gauges on the dashboard (outputs). Nudge dials 1 and 2 together—how much do gauges 3 and 4 move?
Ch.08 gradient was a single compass when there is only one output (e.g. loss)—the steepest uphill direction. The Jacobian matrix () is the ultimate sensitivity dashboard: one table capturing every tiny interaction between all inputs and all outputs.
Our world and deep-learning models look like wrinkled, unpredictable nonlinear surfaces from far away. Zoom in at one point, though, and the surface looks like straight lines and flat planes. The Jacobian mimics that instant as a parallelogram grid (local linear approximation)—the mathematical tool that lets huge neural networks trace error and tune themselves.
Jacobian Matrix: When Multiple Inputs Move, What Happens to the Output?
① Gradient vs Jacobian — one result vs many
Ch.08 gradient is when there is one answer: “If I study 10 more minutes, how much does my score go up?” The Jacobian is when there are several answers: “If I nudge the shoulder and elbow a little, how much do the hand’s X and Y each move?”—all in one table. Ch.08 = one compass; Ch.09 = a big table linking many dials to many gauges.
② Reading one cell — “dial j → needle i”
looks scary but means simply: “If I turn input a little, how much does output move?” Rows = outputs, columns = inputs. In a 2×2 example, row 1 lists how the first output reacts to each input.
③ — “nudge in → about this much out”
If inputs move a tiny bit (), outputs move a tiny bit too (). Roughly: output change ≈ Jacobian × input change. A winding road looks curved from far away, but near one point it looks like a short straight line—that is what the top vs bottom panels show.
④ Backprop — multiply tables to send error backward
A network has many layers. When the last layer says “wrong,” that signal must travel backward so we know what to fix. Each layer has a small Jacobian table; we multiply them (). Think table × table × table, like linking LEGO blocks in reverse.
⑤ — how much area grew · robot-arm warning
A small square patch becomes a parallelogram; tells how many times the area scaled (Ch.05 determinant). → 6× area. If a robot arm is fully straight, — a paralysis (singularity) warning: it cannot move even 1 mm in some directions.
1. Vector-valued functions: many input sticks, many output screens
Until now we often had scalar functions—turn many dials but only one number (loss) comes out. But pixel coordinates, hundreds of neuron values in a hidden layer, and similar outputs arrive as vectors far more often. When inputs feed outputs at once, we call that machine a vector-valued function . Nudge one input stick and dozens of output screens wiggle together—each by a different amount.
2. Local linearization: Earth looks flat under a magnifier
Like the top panel of the visual, real change warps grids into complex curves (nonlinear). What if we zoom in thousands of times near one point? Curves look like short straight lines; curved surfaces like flat planes. Calculus lives in that narrow local patch; the Jacobian is the slope table for that flattened map.
3. Definition: the ultimate change summary
looks heavy, but means simply: “If I turn dial one notch, how many notches does gauge move?” Write every such number in row , column . Then many small dial turns produce output change via one clean line: .
4. Link to Ch.08 gradient: compasses stacked into a tower
With one output, is a single row—the gradient as a row vector. With three outputs, stack three gradient rows. The Jacobian is every output’s gradient, row by row, in one big compass collection.
5. Geometry: squashed area scale ()
A small square input patch becomes a parallelogram under . (Ch.05) tells how many times the area grew or shrank—like clay stretching. means unit square area becomes 6×.
In one line: The Jacobian is the ultimate sensitivity dashboard—how all dials move all gauges. Locally, straightens complex change; in deep learning it is the mathematical heart of backprop through stacked layers.
Deep learning is a factory woven from Jacobians. After ReLU, sigmoid, and other nonlinearities, data bends—but backprop uses local linearization to compute each layer’s Jacobian. Ch.08 gradient was a compass for the final loss only; between layers we need matrices capturing how thousands of neurons influence one another.
Learning is nothing but the chain rule in action: keep multiplying Jacobian matrices one after another. GAN generators that create human-like faces and autoencoders that compress data both ask, “If I twist the latent noise I fed in just a little, how does the image in front of me warp and change?”—and read the answer through the Jacobian to decide which way to learn.
1. Backpropagation: error flowing upstream
To shrink loss, propagate error from the last layer back to the inputs. With dozens of layers, multiply local Jacobians like stepping stones ()—even in huge models you get full sensitivity and can update weights.
2. Normalizing flows: density stretch and squeeze
Generative AI can “knead” simple clay (a Gaussian) into a detailed sculpture (a complex data distribution). Stretch space 2× and density halves. corrects probability when volume changes—the same picture as Ch.05 determinants.
3. Robot arms and singular (frozen) poses
Imagine a shoulder-and-elbow arm. The Jacobian answers: “If I rotate a joint 1°, how much does the hand move in X and Y?” If the arm is fully straight, : the arm cannot move even 1 mm in some directions—a singularity (paralysis) warning in real robotics.
When solving, follow these steps
① Table size — how many outputs? inputs?
With outputs and inputs, is an table. Rows = outputs, columns = inputs (gauge number / dial number).
② Fill each cell — "dial j → needle i"
Cell holds "if input moves a tiny bit, how much does output change?" The formal name is partial derivative (), but think one reaction size.
③ Small moves — tiny input → tiny output
When inputs change just a little (), output change () is roughly × input change: .
④ One output? Ch.08 gradient
If there is only one result (), is Ch.08 gradient laid on its side ().
3-step workflow:
① check size →
② fill partials →
③ if functions compose, multiply
- In wordsJacobian
- Meaning, size
- In wordsLocal approx
- Meaning
- In wordsGradient
- Meaning:
- In wordsChain
- Meaning
- In wordsdet J
- Meaningarea/volume scale (Ch.05)
- In wordsBackprop
- Meaning
| In words | Meaning |
|---|---|
| Jacobian | , size |
| Local approx | |
| Gradient | : |
| Chain | |
| det J | area/volume scale (Ch.05) |
| Backprop |
① rows=outputs.
② linear ⇒ .
③ small .
④ singular ⇒ collapse one way.
Worked examples
Ex 1 — 2×2 J
Problem: . Find .
Solution: , . .
Ex 2 — at a point
Problem: at . Find .
Solution: , others 0; . .
Ex 3 — linear
Problem: . Find .
Solution: (same everywhere).
Ex 4 — chain
Problem: , . Find (1×1).
Solution: , , .
Ex 5 — det J
Problem: . Unit square area?
Solution: → 6×.
Ex 6 — linear layer
Problem: . Find .
Solution: linear map, so .
Practice
When , Jacobian matches putting gradient in a row.
1 / 5