Vector fields
A scalar function ate a point and returned a number. A vector field eats a point and returns an arrow. That one change of output — one number becomes two — is what turns slope into flow, and it is the object the rest of this volume is about. Drag a probe through a field, drop a particle into it, and watch where the arrows send it.
An arrow at every point
From $f:\mathbb{R}^2\to\mathbb{R}$ to $F:\mathbb{R}^2\to\mathbb{R}^2$
Volume I was entirely about scalar functions: a rule that takes a point and returns a single number, the height of a graph. Temperature at a location, height on a map, cost of a model — one number out. A vector field is the same idea with a richer output: at every point it returns a vector, which we draw as an arrow with a direction and a length.
Two scalar functions, $P$ and $Q$, supply the horizontal and vertical components; the field is one object that packages both. Pick a preset below — a constant drift, an outward source, a rotation, a shear, a saddle — then drag the probe. The readout names the arrow the field attaches to that exact point.
An arrow at every grid point. Arrow direction and colour encode the field; the bold arrow is the field vector at the draggable probe.
Streamlines: following the arrows
The field as a differential equation
A field is static, but it invites motion. Drop a particle at a point and let its velocity be the field's arrow there. The path it traces is a streamline, and it is defined by an ordinary differential equation:
At every instant the velocity vector is the field's arrow at the current position — the curve is tangent to the field everywhere. We draw it by numerically stepping along the unit field, so the picture shows the shape of the flow rather than its speed; magnitude is the probe's job, not the line's.
Switch the preset and watch the qualitative behaviour change: under rotation a streamline closes into an orbit, while a radial source pushes every trajectory out to the boundary. Drag the seed, or add a ring or grid of seeds around it, then press play to send particles down the lines.
Streamlines (thin) through a draggable seed (magenta), with animated particles flowing along the field. The seed's own streamline is drawn bold.
Fields add
Superposition, and the spiral
Arrows at the same point add like arrows anywhere else, so fields can be combined pointwise. If $F_1$ and $F_2$ are fields and $\alpha,\beta$ are numbers, their weighted sum is the field
This is why the subject stays linear even though a single field can look complicated. Mix a source with a rotation and the outflow and the swirl combine into a spiral: the radial component pushes the particle out while the rotational component carries it around. Choose each component and set its weight; the two coloured arrows at the probe are the contributions, and the dark one is their sum.
Sum field of component A (weight α) and component B (weight β). Two streamlines and the combined arrow at the probe show the result.
How a field changes: outflow and rotation
A first look at divergence and curl
Part 3 of Volume I differentiated a scalar function and got a field (its gradient). The reverse question — how do we differentiate a field? — has two answers, and both are local: shrink a tiny loop or box around a point and ask what the arrows do across its boundary.
The divergence is net outflow per unit area — does the box gain or lose fluid? The curl is net circulation per unit area — does a tiny paddlewheel spin? Both are the field's derivative, and Part 3 turns these limits into two-line formulas you can compute by hand. Here we only measure them numerically by sampling arrows a hair apart, colour the arrows by which one is larger, and read the two numbers at the probe.
Arrows coloured by the selected local measure — magenta for positive, teal for negative, grey near zero. Drag the probe to sample it.
Where this shows up
Everywhere a quantity has both a size and a direction
The derivative of any scalar function of several variables is a vector field: it is the gradient $\nabla f$, and following it downhill is exactly gradient descent. That is the whole of Nonlinear Optimization, whose pictures are gradient fields on a loss surface. Streamlines are on their own an ODE, $\dot p = F(p)$, which is the subject of Part 12: Differential equations — the numerical stepper you watch here is the same Euler/RK4 idea. And the two local measures previewed above get their full treatment, with the box probe and the paddlewheel, in Part 3: Divergence and curl.
Notation to carry forward
| Notation | Reads as | Where it comes up |
|---|---|---|
f(x, y) | A scalar function — one number out | Volume I throughout |
F(x, y) = (P, Q) | A vector field — an arrow at every point | This part; every field below |
F(p) | The arrow attached to the point p | Probes, streamlines, work |
dp/dt = F(p) | A streamline: the path that is tangent to the field everywhere | This part; Part 12 (ODEs) |
αF₁ + βF₂ | Superposition — fields add pointwise | This part; linear systems |
∇·F, ∇×F | Divergence (outflow) and curl (rotation): the two derivatives of a field | Part 3; Part 4 (the big theorems) |
∇f | The gradient field of a scalar function — a field made by differentiating a scalar | Optimization; conservative fields (Part 2) |
Further reading
- 3Blue1Brown, Divergence and curl — the same arrows, outflow and paddlewheel, animated.
- MIT 18.02SC, Multivariable Calculus — the course that runs alongside this volume, fields and all.
- Khan Academy, Multivariable calculus — extra practice on vector fields and streamlines.