1.2.5 · D1Calculus & Optimization Basics

Foundations — The Jacobian matrix

2,483 words11 min readBack to topic

Why this page exists

The parent note throws a lot of notation at you very fast: , , , , , . If any one of those symbols is a fog to you, the whole topic collapses. So below we take every symbol the parent uses and give it three things: a plain-words meaning, a picture, and the reason the topic needs it. Read top to bottom — each block is a rung you stand on to reach the next.


1. A number line, and what means

The picture: a horizontal line stretching left and right forever, with in the middle. A single real number is one dot sitting on that line.

Why the topic needs it: every input and every output in the Jacobian story is built out of real numbers. Before we can stack numbers into vectors we must name the pool they come from.


2. Vectors and the spaces

  • : one number, one dot on a line.
  • : two numbers , a point (or arrow) on a flat sheet.
  • : three numbers, a point in the room you are sitting in.

We write such a list as a vector and put it in bold: . Its individual numbers are the components — same letter, subscript for the slot.

Figure — The Jacobian matrix

The picture (figure above): a vector is an arrow from the origin to a point. In the arrow points 3 right and 2 up. The word "vector" and the word "point" describe the same list of numbers — one emphasises the arrow, one emphasises the tip.

Why the topic needs it: the Jacobian describes machines that take a vector in and give a vector out. Without the idea of there is nothing to be multi-dimensional about.


3. A function between vector spaces:

The output is itself a list, so is really ordinary scalar functions bundled together:

Each is one output component — a single dial-reading of the output — and it is allowed to depend on all the inputs.

Figure — The Jacobian matrix

The picture (figure above): a box with input dials on the left and output bulbs on the right. Every dial may wire to every bulb. That web of wires is exactly what the Jacobian will measure.

Why the topic needs it: this is the object the Jacobian is about. The whole note answers "how does this box respond when I nudge the dials?"


4. Slope of one variable: the ordinary derivative

The picture: zoom into the curve until it looks like a straight line. Its steepness is . A big means a steep climb; a negative means going downhill; means flat.

Why we use a slope at all (WHY this tool): the derivative answers the question "if I nudge by a tiny amount , how much does change?" The answer is . This single fact — change slope nudge — is the seed the entire Jacobian grows from. We pick the derivative and not, say, the average value, because we care about local response to a small push, which is precisely what a slope encodes.


5. Many inputs, one output: partial derivatives

Now let one output depend on several inputs. If I want its slope, I face a puzzle: slope in which direction? Wiggling is a different push than wiggling .

Figure — The Jacobian matrix

The picture (figure above): the graph of is a landscape — a hilly surface over the flat floor. is the slope you feel walking due east (only changes). is the slope walking due north. Same spot, two different steepnesses, because a hill can be flat one way and steep another.

Why the topic needs it: every single entry of the Jacobian is one partial derivative — output , nudged by input . Partials are the atoms the table is built from.


6. Bundling the partials of one output: the gradient

For output there are partials — one per input. Collect them into a single list.

The picture: back on the hill of §5, the gradient is an arrow drawn on the flat floor pointing in the steepest-uphill direction, and its length is how steep that is. It packs "east-slope" and "north-slope" into one arrow.

Why the topic needs it: the parent says "row of the Jacobian is ." So one gradient, tipped on its side, becomes one row of the table. Stack of them and you have the whole Jacobian. See the deeper note Gradient and directional derivative for the "steepest ascent" story.


7. Weighted sums as a dot product

When we nudge all inputs at once by a small step , the change in is the sum of each partial times its own nudge:

So the messy sum above is exactly the tidy dot product — the row-gradient of output dotted with the nudge.

Why the topic needs it: this is the single algebra move (Step 2 of the parent's derivation) that turns "a weighted sum of nudges" into "a row times a vector." Recognising it is what lets separate sums collapse into one clean matrix equation.


8. Stacking rows into a matrix, and multiplying by a vector

The picture: the inner numbers and touch and cancel; the outer numbers and survive as the shape of the answer. If the inner numbers don't match, the multiplication is illegal.

Why the topic needs it: the master formula is a matrix–vector product. It also powers the composition rule that becomes Backpropagation and Jacobian–vector products.


9. Two square-matrix extras: and

The picture: the unit square gets pushed into a parallelogram; is that parallelogram's area. If , the square collapses to a line — the map squashes a dimension flat.

Why the topic needs it: the parent's polar example uses as the area-scaling factor — the whole reason shows up in integration.


10. The prerequisite map

Real numbers R

Vectors and R to the n

Vector function f from R n to R m

Derivative and slope

Partial derivative

Gradient of one output

Dot product row times h

Matrix and matrix vector product

The Jacobian matrix

Determinant and diag

Read it as: number line feeds vectors, vectors plus derivatives feed partials, partials bundle into gradients, gradients-as-rows dot the nudge, and matrix multiplication ties it all into the Jacobian.


11. Where each piece reappears later


Equipment checklist

Test yourself — cover the right side and see if you can answer each before revealing.

What does mean in plain words?
An ordered list of real numbers — a point/arrow in -dimensional space.
Why do we write some letters in bold like ?
Bold marks a whole vector (a list); plain marks a single number.
What does describe?
A machine taking a list of numbers and returning a list of numbers.
What is in one phrase?
The slope of the graph — how much changes per tiny nudge in .
What does the curly in promise?
All variables except are held frozen while we take the slope.
What is ?
The column vector of all partial derivatives of the single output .
What does the transpose do to ?
Tips the column into a row, — which becomes one row of the Jacobian.
How do you compute ?
Dot each row of with ; the results stack into the output vector.
Why must the inner dimensions match in ?
You dot rows of length with a vector of length ; mismatched lengths make the dot product undefined.
When is even defined, and what does mean?
Only when is square (); it is the local area/volume scaling factor of the map.
What does look like?
A square matrix with on the diagonal and zeros everywhere else.