The gradient from 2.1 acts on a scalar field and produces a vector. The two operators in this lesson act on a vector field. The divergence∇⋅v produces a scalar that measures local outflow; the curl∇×v produces a vector that measures local rotation. Together they are the workhorse first-order vector operators of fluid dynamics, electromagnetism, and acoustics.
This lesson develops both, ends with the two algebraic identities (∇×∇ϕ=0 and ∇⋅∇×A=0) that the rest of the bookshelf leans on, and the late-19th-century notation war that gave us these operators in their modern form.
The divergence
For a vector field v(r), the divergence is a scalar:
∇⋅v=∂x∂vx+∂y∂vy+∂z∂vz.
It measures the net outflow per unit volume: how much v is spreading out from a point.
field:
∇·F at probe = 2.00 — arrows on the disc boundary in red are *outflowing* (positive flux), in blue are *inflowing*. Net imbalance is the divergence.
The interactive gives divergence a concrete picture. Pick a field, slide the probe to any point. A small disc is drawn around the probe; the field arrows on the disc’s boundary are coloured by whether they point outward (red, contributing positively to flux) or inward (blue, contributing negatively). The disc itself is shaded by the local divergence — red for a source, blue for a sink, cream for divergence-free. Try the variable field F=(x2,0) and slide along the x-axis: divergence is zero at the origin and grows linearly with x.
The continuity equation∂tρ+∇⋅(ρv)=0 says that any local change in density is exactly the negative of the divergence of the mass flux — a direct consequence of this outflow interpretation. Conservation of mass written as a local PDE is the continuity equation.
The divergence theorem (also called Gauss’s theorem) makes the picture global:
∫V(∇⋅F)dV=∮∂VF⋅dA.
The integral of the divergence over a volume equals the flux of F across the volume’s boundary. This is what lets us swap a local statement (“source per unit volume”) for a global one (“total flux out of a region”). It is used in essentially every continuum-mechanics derivation in the Sound book.
It measures local rotation. Concretely: imagine a tiny paddle wheel placed in the flow with its axis perpendicular to the page. The wheel spins if and only if the curl in that direction is nonzero, and the rate of spin is proportional to the curl.
field:
(∇×F)z at probe = 2.00 — arrows tangent to the loop running CCW are red; CW are blue. Net circulation per unit area is the curl. The rotating arm inside the loop spins at a rate proportional to the curl, in the same sense.
The interactive shows curl as a circulation around a small loop. Pick a field; slide the probe. The arrows on the loop are coloured by whether they point with the loop’s counter-clockwise direction (red) or against it (blue). If they mostly agree with CCW the curl is positive; if they mostly oppose it, negative. A small rotating arm inside the loop spins at the rate the curl predicts, in the direction it predicts.
A field with ∇×v=0 everywhere is called irrotational. Small-amplitude sound in an ideal fluid is irrotational, which lets us write v=∇ϕ for a velocity potentialϕ — a move the Sound book uses repeatedly throughout chapters 4 and 5.
The Stokes theorem is the curl-analogue of the divergence theorem:
∫S(∇×F)⋅dA=∮∂SF⋅dℓ.
The flux of the curl through a surface equals the line integral of F around the boundary. We use this in deriving Faraday’s law in electromagnetism (not on this bookshelf), in proving the irrotational-decomposition (Helmholtz) theorem, and in any setting where local circulation has to be related to global line integrals.
Two identities worth memorising
Two algebraic identities, both consequences of the commutativity of mixed partials:
∇×(∇ϕ)=0 — gradients are curl-free.
∇⋅(∇×A)=0 — curls are divergence-free.
These two identities are why velocity potentials work in irrotational flow, and why magnetic fields have a vector potential. We will need the first one immediately in Sound 4.5 when deriving the wave equation; it lets us replace the velocity field v by a single scalar potential ϕ and reduce the system from three coupled fields to one.
▶Proof that ∇ × (∇φ) = 0
In Cartesian components, the curl of the gradient ∇ϕ is
[∇×(∇ϕ)]i=ϵijk∂j(∂kϕ)=ϵijk∂j∂kϕ,
using the Levi-Civita symbol ϵijk (antisymmetric in any pair of indices) and the Einstein summation convention. The mixed partials commute for smooth ϕ: ∂j∂kϕ=∂k∂jϕ. So ∂j∂kϕ is symmetric in j and k.
But the contraction of an antisymmetric tensor (ϵijk in j,k) with a symmetric one (∂j∂kϕ in j,k) is zero: ϵijkSjk=−ϵikjSkj=−ϵijkSjk (relabel dummy indices), so it equals its own negative, hence zero. Therefore ∇×(∇ϕ)=0 identically.
The same argument with Al in place of ϕ gives ∇⋅(∇×A)=ϵijk∂i∂jAk=0.
These are algebraic identities — they hold without integration and without any boundary conditions, purely because the second partials commute.
The converse of these identities is the Helmholtz decomposition: any sufficiently nice vector field v can be written as v=∇ϕ+∇×A, with the irrotational (∇ϕ) and solenoidal (∇×A) pieces separately. This is one of the central decomposition theorems of vector calculus; in fluid mechanics it’s exactly the split between potential flow (irrotational) and vortex motion (solenoidal).
History
⏳The history— The vectors that fought a war
Vector calculus as we use it — gradient, divergence, curl, the ∇ operator — was assembled between 1853 and the 1890s out of two competing formalisms.
William Rowan Hamilton invented quaternions in 1843 (allegedly carving the formula i2=j2=k2=ijk=−1 into the stone of Brougham Bridge in Dublin). He intended them as the natural algebra for three-dimensional rotations and physical quantities, and spent the rest of his life evangelising for them. James Clerk Maxwell’s Treatise on Electricity and Magnetism (1873) was written in a hybrid quaternion notation: the operator we now call ∇ was Hamilton’s “nabla” (named after a Hebrew harp shaped like the symbol).
In the 1880s, J. Willard Gibbs (at Yale) and Oliver Heaviside (in England, working independently) extracted a stripped-down “vector algebra” from Hamilton’s quaternions — keeping the dot and cross products, abandoning the quaternion arithmetic — and used it to reformulate Maxwell’s equations into the form we now see. A pitched war broke out in the late-19th-century mathematical journals between the quaternion adherents (Peter Guthrie Tait was the loudest) and the new vector-calculus camp (Gibbs, Heaviside). The vector-calculus side won decisively. By 1900, physics and engineering had abandoned quaternions; today they survive only in computer graphics (for rotation interpolation) and in pure mathematics. The notation ∇ and the calculus you use here is the residue of Gibbs and Heaviside’s victory.
What’s next
The next lesson, 2.3 — The Laplacian and harmonic functions, develops the second-order operator ∇2 — the divergence of the gradient — that turns out to be the single most important operator in wave physics. The wave equation, the heat equation, Laplace’s equation, the Helmholtz equation, the Schrödinger equation: all five canonical linear PDEs from Foundations 6 are built on the Laplacian.