1. Vector fields
Picture every point in space carrying a little arrow. Standing in a river, you feel the current — its direction and speed depend on where you are. A weather map's wind arrows are the same idea: at each location, an arrow. That assignment — point in, arrow out — is a vector field, and almost everything in vector calculus is a question about one: how much of it flows through a surface (flux), how much it swirls around a point (curl), how much it spreads out from a source (divergence). It's the language physicists reach for whenever they describe fluid flow, electromagnetism, or heat diffusion.
A function $\mathbf{F} \colon \mathbb{R}^n \to \mathbb{R}^n$ that assigns a vector to every point. In three dimensions you write $\mathbf{F}(x,y,z) = \langle P(x,y,z),\ Q(x,y,z),\ R(x,y,z) \rangle$. Imagine an arrow planted at every point of space.
The mental picture matters. Wind across a map, water flowing in a stream, the electric field around a charge, the gravitational pull near a planet — each of these is a rule that says "at this point, here's the local direction and strength." A vector field is that rule made precise.
From an algebraic field you can extract two scalars and one vector by differentiating: how much the field is spreading out at a point (divergence), how much it is swirling at a point (curl), and — if the field happens to be the gradient of something — what the underlying scalar landscape is.
2. The three differential operators
One symbol — the nabla $\nabla = \langle \partial_x,\ \partial_y,\ \partial_z \rangle$ — does triple duty. The three operations differ only in what kind of object you feed it and which product you use.
Gradient — already met
For a scalar field $f$, the gradient turns it into a vector field:
$$ \nabla f = \langle f_x,\ f_y,\ f_z \rangle. $$It points in the direction of steepest increase of $f$, and its magnitude is the rate of that increase. We covered this in Partial derivatives; here it returns as the bridge between scalar landscapes and vector fields.
Divergence — a scalar
A scalar. Reads "how much is the field a source or sink at this point": positive where the field flows outward, negative where it flows inward, zero where what comes in goes back out.
Imagine a tiny box centered at the point. Divergence measures the net outflow per unit volume in the limit as the box shrinks. A field with $\nabla \cdot \mathbf{F} > 0$ at $\mathbf{p}$ acts like there's a tiny faucet at $\mathbf{p}$; with $\nabla \cdot \mathbf{F} < 0$ it acts like a drain. Solenoidal fields ($\nabla \cdot \mathbf{F} = 0$ everywhere) are incompressible — what enters any region also leaves.
Example: $\mathbf{F}(x,y,z) = \langle x, y, z \rangle$ (the field that radiates straight out from the origin). Then $\nabla \cdot \mathbf{F} = 1 + 1 + 1 = 3$ — a uniform source everywhere.
Curl — a vector
A vector. Reads "how much is the field rotating at this point, and around what axis": magnitude is twice the local angular speed of an infinitesimal paddlewheel; direction is the axis it spins about (right-hand rule).
The determinant mnemonic captures the same formula:
$$ \nabla \times \mathbf{F} \;=\; \begin{vmatrix} \hat{\imath} & \hat{\jmath} & \hat{k} \\ \partial_x & \partial_y & \partial_z \\ P & Q & R \end{vmatrix}. $$Example: $\mathbf{F}(x,y,z) = \langle -y, x, 0 \rangle$ (the field of a rigid rotation around the $z$-axis). Then $\nabla \times \mathbf{F} = \langle 0, 0, 2 \rangle$ — pointing up the rotation axis, with magnitude $2$ (twice the angular speed of $1$). Irrotational fields ($\nabla \times \mathbf{F} = \mathbf{0}$) have no local swirling; on a simply connected region they are exactly the gradient fields.
One picture, two readings
Divergence and curl are independent: a field can have any combination of the two. The gradient $\nabla f$ is the third leg — it's the operator that builds a vector field from a scalar. Two identities tie them together and you will eventually rely on them without thinking:
$$ \nabla \times (\nabla f) = \mathbf{0}, \qquad \nabla \cdot (\nabla \times \mathbf{F}) = 0. $$In words: the curl of a gradient is zero (gradient fields don't swirl), and the divergence of a curl is zero (swirl fields don't have sources). Both follow from equality of mixed partials.
3. Line integrals and work
Now we add up. The simplest thing you can add up along a curve is a vector field's component along the direction of travel — the work it does on a particle moving through it.
where $\mathbf{r}\colon [a,b] \to \mathbb{R}^n$ is any smooth parametrisation of the curve $C$. The dot product picks out the component of $\mathbf{F}$ tangent to $C$ at each point and weights it by speed.
This is what physicists call work. If $\mathbf{F}$ is a force field and $\mathbf{r}(t)$ is the path of a particle, $\int_C \mathbf{F} \cdot d\mathbf{r}$ is the work done by the force over the path. Push a box across a frictionless floor in the direction the force is pushing: positive work. Drag it sideways to the push: zero work. Pull against the force: negative work.
The notation $d\mathbf{r}$ is shorthand for $\mathbf{r}'(t)\, dt$ — a tiny tangent displacement. Two consequences fall out:
- The integral is independent of the parametrisation as long as orientation is preserved.
- Reversing the direction of travel negates the integral: $\int_{-C} \mathbf{F} \cdot d\mathbf{r} = -\int_C \mathbf{F} \cdot d\mathbf{r}$.
There is also a scalar line integral $\int_C f\, ds$ — adding a scalar weighted by arc length, no dot product, no direction. It's used for masses of wires and average values along a curve, but the vector version is the one that drives the rest of the chapter.
4. Conservative fields and the FTC for line integrals
Sometimes a vector field is itself the gradient of some scalar: $\mathbf{F} = \nabla f$. Such a field is called conservative, and the scalar $f$ is its potential. Gravity and electrostatics both produce conservative fields — the potential energy you remember from physics is exactly $f$.
If $\mathbf{F} = \nabla f$ on a region containing the curve $C$ from point $A$ to point $B$, then
$$ \int_C \mathbf{F} \cdot d\mathbf{r} \;=\; f(B) - f(A). $$The integral depends only on the endpoints, not on the path.
This is the same shape as the original fundamental theorem of calculus — $\int_a^b f'(x)\, dx = f(b) - f(a)$ — promoted one dimension up. The "derivative" is the gradient; the "boundary" of a curve is its two endpoints (with signs); the integral of the derivative over the curve equals the values of the function on the boundary.
How to tell whether a field is conservative
Compute the curl. If $\nabla \times \mathbf{F} = \mathbf{0}$ and the domain is simply connected (no holes you can't shrink away), then $\mathbf{F}$ is conservative. To actually find the potential $f$, integrate one component at a time, using the next component to pin down the integration constant.
Quick example: $\mathbf{F} = \langle 2x, 2y \rangle$. The curl (in 2D, the scalar $Q_x - P_y$) is $0 - 0 = 0$, so a potential exists; integrating $f_x = 2x$ gives $f = x^2 + g(y)$, and matching $f_y = 2y$ forces $g'(y) = 2y$, so $f = x^2 + y^2$ (up to a constant). The work from $(0,0)$ to $(1,1)$ along any path is $f(1,1) - f(0,0) = 2$.
The field $\mathbf{F} = \langle -y/(x^2+y^2),\ x/(x^2+y^2) \rangle$ has zero curl everywhere it's defined, but its line integral around the unit circle is $2\pi$, not zero. The domain (plane minus origin) isn't simply connected. Curl-free is only enough on holes-free regions.
5. Surface integrals and flux
For surfaces, the natural thing to add up is the part of a vector field that pokes through perpendicularly — the flux. Picture water flowing past a fishing net: flux measures how much water passes through per unit time.
where $\hat{\mathbf{n}}$ is the unit normal to $S$ (a choice that orients the surface). The integrand $\mathbf{F} \cdot \hat{\mathbf{n}}$ is the normal component — how much of the field is "going through" at each patch.
For a closed surface — like a sphere — the conventional choice is the outward normal, and flux measures net outflow: how much more is leaving than entering. That orientation is what makes the divergence theorem read so cleanly.
As with line integrals, there's also a scalar surface integral $\iint_S f\, dS$, used for areas and centres of mass. Flux is the one that drives the theorems.
6. One big idea: boundary = bulk of derivative
Now the magic. Three different-looking theorems — Green's in the plane, Stokes' on surfaces, the divergence theorem in space — are all expressing the same sentence:
Integrating a field along the boundary of a region equals integrating its derivative throughout the region itself.
You've already seen this idea twice. The fundamental theorem of calculus says $\int_a^b f'(x)\, dx = f(b) - f(a)$: bulk integral of the derivative on the left, "boundary values" on the right. The FTC for line integrals does the same for gradients along a path. The next three theorems do it for the other two operators — curl and divergence — in higher dimensions.
Region $D$ in the plane ↔ its boundary curve $\partial D$. Curl-like derivative.
Surface $S$ in space ↔ its boundary curve $\partial S$. The full curl.
Solid region $E$ ↔ its boundary surface $\partial E$. Divergence.
In differential-forms language all three (and the FTC) collapse into one statement, the generalised Stokes' theorem: $\int_{\partial \Omega} \omega = \int_\Omega d\omega$. Keep that as a slogan — but the three concrete cases below are what you'll actually use.
The proofs all follow the same physical intuition: cut the region into infinitesimal pieces, observe that adjacent pieces share boundaries with opposite orientations so internal contributions cancel, and only the outer boundary survives. We'll see the picture for Green's; the others are the same idea in higher dimensions.
7. Green's theorem
Let $D$ be a region in the plane whose boundary $C = \partial D$ is a piecewise-smooth simple closed curve, oriented positively (counterclockwise, so the region stays on your left). For continuously differentiable $P(x,y)$ and $Q(x,y)$:
$$ \oint_C P\, dx + Q\, dy \;=\; \iint_D \left( \frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y} \right) dA. $$The integrand on the right is the 2D version of curl: it measures how much the field $\langle P, Q \rangle$ would spin a paddlewheel placed at that point.
The proof picture
Chop $D$ into a fine grid of tiny rectangles. For each rectangle, the boundary integral $\oint P\, dx + Q\, dy$ around it is approximately $(Q_x - P_y)\, dA$ — that's literally the definition of those partials. Now sum over rectangles: every internal edge appears in two adjacent rectangles with opposite orientations, so the contributions cancel exactly. Only the outer boundary $C$ survives on the left, and the sum of $(Q_x - P_y)\, dA$ becomes the double integral on the right.
Canonical example: area as a boundary integral
Choose $P = -y/2$ and $Q = x/2$. Then $Q_x - P_y = 1/2 + 1/2 = 1$, and Green's theorem gives
$$ \frac{1}{2}\oint_C (x\, dy - y\, dx) \;=\; \iint_D 1\, dA \;=\; \text{area}(D). $$The area of a region is encoded entirely in a single integral around its boundary. For a circle of radius $R$ parametrised as $\mathbf{r}(t) = (R\cos t, R\sin t)$:
$$ \frac{1}{2}\oint_C (x\, dy - y\, dx) \;=\; \frac{1}{2}\int_0^{2\pi} \big(R\cos t \cdot R\cos t - R\sin t \cdot (-R\sin t)\big)\, dt \;=\; \frac{1}{2}\int_0^{2\pi} R^2\, dt \;=\; \pi R^2. $$This is how planimeters — the mechanical devices surveyors used to trace map outlines and read off the enclosed area — work physically.
8. Stokes' theorem
Green's theorem promoted to three dimensions. Let $S$ be a piecewise-smooth oriented surface in $\mathbb{R}^3$ whose boundary $\partial S$ is a simple closed curve $C$, oriented compatibly with $S$ (right-hand rule: curl your fingers along $C$, thumb points along the chosen normal of $S$).
$$ \oint_C \mathbf{F} \cdot d\mathbf{r} \;=\; \iint_S (\nabla \times \mathbf{F}) \cdot d\mathbf{S}. $$Circulation around the boundary equals total flux of curl through the surface. The left side is what a stick floating on a swirling fluid would feel along the rim; the right is the sum of all the tiny swirls inside the surface. Once again, adjacent infinitesimal circulations cancel, leaving only the boundary.
A surprising corollary: the flux of curl depends only on the boundary, not on which surface you stretch across that boundary. You can integrate over a hemisphere, a flat disk, or a stretched-out balloon — same answer, as long as the rim is the same.
Canonical example: curl through the unit disk
Take $\mathbf{F} = \langle -y, x, 0 \rangle$ and let $S$ be the unit disk in the $xy$-plane, oriented with $\hat{\mathbf{n}} = \hat{\mathbf{k}}$. Its boundary $C$ is the unit circle, parametrised counterclockwise as $\mathbf{r}(t) = (\cos t, \sin t, 0)$ for $t \in [0, 2\pi]$.
Boundary side:
$$ \oint_C \mathbf{F} \cdot d\mathbf{r} \;=\; \int_0^{2\pi} \langle -\sin t, \cos t, 0 \rangle \cdot \langle -\sin t, \cos t, 0 \rangle\, dt \;=\; \int_0^{2\pi} 1\, dt \;=\; 2\pi. $$Surface side: $\nabla \times \mathbf{F} = \langle 0, 0, 2 \rangle$, and $(\nabla \times \mathbf{F}) \cdot \hat{\mathbf{k}} = 2$, so
$$ \iint_S (\nabla \times \mathbf{F}) \cdot d\mathbf{S} \;=\; \iint_{\text{disk}} 2\, dA \;=\; 2 \cdot \pi \;=\; 2\pi. $$The two sides match, as the theorem promises.
9. The divergence theorem
The same idea, one dimension up again. Let $E$ be a solid region in $\mathbb{R}^3$ with piecewise-smooth boundary surface $\partial E = S$, oriented with the outward normal. For continuously differentiable $\mathbf{F}$:
$$ \iint_{\partial E} \mathbf{F} \cdot d\mathbf{S} \;=\; \iiint_E (\nabla \cdot \mathbf{F})\, dV. $$Net flux out of a closed surface equals the total source strength inside. If the field is solenoidal ($\nabla \cdot \mathbf{F} = 0$), no net flow crosses any closed surface — what comes in goes out.
The proof idea mirrors Green's: chop the solid into infinitesimal boxes; each box's flux is approximately $(\nabla \cdot \mathbf{F})\, dV$; faces shared between adjacent boxes have opposite outward normals and cancel; only the true outer surface survives.
Canonical example: outward flow through the unit ball
Take $\mathbf{F} = \langle x, y, z \rangle$ and let $E$ be the closed unit ball, $S$ the unit sphere with outward normal $\hat{\mathbf{n}} = \mathbf{F}/|\mathbf{F}| = \mathbf{F}$ on the surface where $|\mathbf{F}| = 1$.
Volume side: $\nabla \cdot \mathbf{F} = 3$ everywhere, so
$$ \iiint_E 3\, dV \;=\; 3 \cdot \frac{4}{3}\pi \;=\; 4\pi. $$Surface side: $\mathbf{F} \cdot \hat{\mathbf{n}} = |\mathbf{F}| = 1$ on the unit sphere, so
$$ \iint_S \mathbf{F} \cdot d\mathbf{S} \;=\; \iint_S 1\, dS \;=\; 4\pi. $$Both sides give $4\pi$. The physical reading: the radial field $\langle x, y, z \rangle$ has a uniform source density of $3$ throughout the ball; that source density piled up inside the ball exactly matches what's pouring out through its surface.
Gauss's law in electrostatics — the total electric flux through any closed surface equals (charge enclosed)/$\varepsilon_0$ — is the divergence theorem applied to the electric field. The integral form and the differential form of Maxwell's equations are related by exactly this theorem.
10. Common pitfalls
Green's needs counterclockwise. Stokes' needs the right-hand rule between $C$ and $\hat{\mathbf{n}}$. The divergence theorem needs the outward normal. Reversing any of them flips the sign of your answer — and it's an easy mistake to miss because the magnitudes look right.
$\nabla \times \mathbf{F} = \mathbf{0}$ on a domain with a hole (annulus, plane minus origin) does not guarantee a global potential. You need a simply connected domain. The classic counterexample $\langle -y/(x^2+y^2),\ x/(x^2+y^2)\rangle$ catches almost everyone the first time.
$\iint_S f\, dS$ adds a scalar weighted by area. $\iint_S \mathbf{F} \cdot d\mathbf{S}$ adds the normal component of a vector field. They have different units, different signs, and answer different questions. Re-read the integrand before computing.
If you only have part of a closed surface, you can't apply Gauss's theorem directly. Common trick: close it up with a flat disk or another simple cap, apply the theorem to the closed surface, then subtract the flux through your added cap. Forgetting to add the cap is a perennial bug.