Stokes' theorem
Statement
Let \( S \) be an oriented, piecewise-smooth, compact surface with boundary \( \partial S \) in \( \mathbb{R}^3 \), oriented compatibly with \( S \) via the right-hand rule (unit normal \( \mathbf{n} \) and boundary traversal linked as in the right-hand rule), and let \( \mathbf{F} \) be a vector field of class \( C^1 \) on an open set containing \( S \). Then \[ \oint_{\partial S} \mathbf{F} \cdot d\mathbf{r} = \iint_S (\nabla \times \mathbf{F}) \cdot \mathbf{n}\, dA. \]
Why it matters
Stokes' theorem is the archetype of a class of results — the fundamental theorem of calculus, Green's theorem, the divergence theorem — that convert an integral over a region into an integral over its boundary, one dimension down. It is the statement, in the language of vector calculus, that curl measures the local rotational tendency of a field in exactly the sense that makes local circulation sum coherently to a global boundary circulation.
Beyond its computational use (trading a hard line integral for an easy surface integral, or vice versa), Stokes' theorem is the physical bedrock of Faraday's law of induction and Ampère's law in electromagnetism, and it is the \( n=2 \) case of the general Stokes theorem for differential forms, \( \int_M d\omega = \int_{\partial M} \omega \), which unifies all of these classical theorems.
Hypotheses
Proof
Result
Reading. The total rotational tendency of \( \mathbf{F} \), summed over the surface via the curl, equals the net circulation of \( \mathbf{F} \) around the surface's edge. Microscopic swirl aggregates to macroscopic circulation, and all internal cancellation between adjacent patches happens automatically.
Scope. Applies to any compatibly-oriented, piecewise-smooth, compact oriented surface with piecewise-smooth boundary in \( \mathbb{R}^3 \), for any \( C^1 \) vector field defined on a neighbourhood of the surface. It specialises to Green's theorem when \( S \) is a flat region in the \( xy \)-plane, and it is itself the \( \mathbb{R}^3 \), degree-2 case of the general Stokes theorem for differential forms on oriented manifolds-with-boundary.
Corollaries & converses
- Curl fields have zero flux through closed surfaces. If \( \Sigma \) is closed (no boundary) and bounds a solid \( V \), splitting \( \Sigma \) into two surfaces sharing a common boundary curve and applying Stokes to each with opposite orientations shows \( \oiint_\Sigma (\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = 0 \); consistent with \( \nabla\cdot(\nabla\times\mathbf{F})\equiv 0 \) via the divergence theorem.
- Circulation is a surface-independent (topological) quantity. If \( S_1, S_2 \) share the same boundary \( \partial S \) with compatible orientation, then \( \iint_{S_1}(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = \iint_{S_2}(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA \), since both equal \( \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} \); this is why "flux through the surface" is loosely spoken of as "flux through the loop."
- Path-independence criterion. If \( \nabla\times\mathbf{F} = \mathbf{0} \) on a simply-connected domain, every closed curve bounds a surface (by simple-connectedness) on which \( \nabla\times\mathbf{F} \equiv 0 \), so \( \oint \mathbf{F}\cdot d\mathbf{r} = 0 \) for all closed loops, hence \( \mathbf{F} \) is conservative there.
- The converse fails in general. \( \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r}=0 \) for one particular \( S \) does not imply \( \nabla\times\mathbf{F}=\mathbf{0}\) on \( S \) — cancellation of positive and negative curl contributions can produce zero net circulation with nonzero curl present (e.g. any \( \mathbf{F} \) with curl odd under a symmetry of \( S \)).
Fails without
- Without \( C^1 \) regularity of \( \mathbf{F} \): take \( \mathbf{F} = \dfrac{(-y,x,0)}{x^2+y^2} \) on the punctured plane and let \( S \) be the unit disc in the \( xy \)-plane (which contains the singular point at the origin). Then \( \nabla\times\mathbf{F} = \mathbf{0} \) everywhere \( \mathbf{F} \) is defined, so the surface integral would naively be \( 0 \), yet \( \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} = 2\pi \) around the unit circle. The theorem does not apply because \( \mathbf{F} \) is not \( C^1 \) (not even defined) at the origin \( \in S \); no contradiction arises, but a student who ignores the hypothesis derives \( 2\pi = 0 \).
- Without orientability: attempt to apply the theorem to a Möbius strip with \( \mathbf{F} \) a generic \( C^1 \) field. Following a continuous unit normal once around the strip returns it reversed, so "\( \iint_S(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA \)" is not well-defined (the sign of \( \mathbf{n} \) is ambiguous at every point after transport around the core circle) — the right-hand side of the theorem cannot even be written down, regardless of the left-hand side.
- Without compatible orientation of \( \partial S\) and \( \mathbf{n} \): take \( S \) the upper unit hemisphere with \( \mathbf{n} \) pointing outward (upward), but parametrise \( \partial S \) (the equator) clockwise when viewed from above instead of counterclockwise. For \( \mathbf{F} = (-y,x,0)/2 \) (so \( \nabla\times\mathbf{F} = (0,0,1) \)), the surface integral gives \( \iint_S \mathbf{n}\cdot(0,0,1)\,dA = \pi \) (area of unit disc projection), but the wrongly-oriented line integral gives \( -\pi \): the two sides disagree by a sign purely because the linking convention was violated.
Common errors
- Choosing the surface normal \( \mathbf{n} \) and the boundary traversal direction independently ("outward normal" and "counterclockwise from above" chosen without checking consistency), rather than deriving the boundary orientation from \( \mathbf{n} \) via the right-hand rule — this silently flips the sign of one side.
- Applying the theorem to a surface that is not simply an oriented 2-manifold-with-boundary — e.g. treating the boundary of a solid region (a closed surface, \( \partial S=\emptyset \)) as if it had a genuine curve boundary, then wondering why the "line integral side" is missing.
- Forgetting that Stokes' theorem gives surface-independence only when \( \nabla\times\mathbf{F}\) is defined and \( C^0 \) (curl integrable) everywhere between the two candidate surfaces — using it to "swap" a hard surface for an easy one when the field is singular somewhere in the region swept out.
- Computing \( \nabla\times\mathbf{F} \) correctly but then dotting with the wrong normal (e.g. using \( \mathbf{r}_v \times \mathbf{r}_u \) instead of \( \mathbf{r}_u\times\mathbf{r}_v \)), silently reversing orientation and the sign of the answer.
- Confusing Stokes' theorem with the divergence theorem — trying to convert a surface integral of curl into a volume integral of divergence; \( \nabla\cdot(\nabla\times\mathbf{F})=0 \) identically, so this conflation always (uselessly) gives zero.
Discussion
The theorem is usually attributed to Sir George Gabriel Stokes, who set it as a Smith's Prize examination question at Cambridge in 1854 — but the result was apparently communicated to him by Lord Kelvin (William Thomson) in a letter of 1850, making the attribution one of mathematics' well-known misnomers, alongside e.g. l'Hôpital's rule. Its physical roots are in Kelvin and Stokes' work on hydrodynamics and electromagnetism, where circulation and vorticity were natural quantities well before the abstract manifold-theoretic language existed.
The deep reason the proof works is that curl is, in a precise sense, the operator dual to "taking a boundary": Green's theorem (used as the engine of the proof above) is itself already a discrete shadow of the same idea in one dimension lower, and the patching argument of Step 1 — cancel shared edges, keep only the outer boundary — is the combinatorial heart of Stokes' theorem for chains, which is what makes the generalisation to arbitrary dimensions (see below) so natural.
In the language of differential forms, define the 1-form \( \omega = P\,dx+Q\,dy+R\,dz \) associated to \( \mathbf{F} \); then \( d\omega \) is exactly the 2-form corresponding to \( \nabla\times\mathbf{F} \) under the standard musical isomorphisms on \( \mathbb{R}^3 \), and the theorem becomes the single identity \( \int_{\partial S}\omega = \int_S d\omega \) — the general Stokes theorem for oriented manifolds-with-boundary. Green's theorem is the case \( \dim=2 \), the divergence theorem is obtained by taking \( \omega \) a 2-form and \( d\omega \) a 3-form, and the fundamental theorem of calculus is the case \( \dim=1 \), \( \int_a^b f'(x)\,dx = f(b)-f(a) \), with \( \partial[a,b] = \{b\} - \{a\}\) as a signed 0-chain.
Common misconception: that Stokes' theorem "only" concerns rotating fluids or magnetic circuits. Its content is purely about the algebra of exterior differentiation and boundaries; the fluid-dynamical and electromagnetic pictures are illustrative special cases, not the theorem's domain of validity, which is exactly the differential-topological setting described above.
Worked examples
Reading. Direct evaluation of the line integral around the equator would require parametrising \( (2\cos t, 2\sin t, 0) \) and is only marginally harder here, but the point is that Stokes lets us replace the curved hemisphere by the flat disc it bounds — the same trick becomes essential when the surface is genuinely awkward to parametrise.
Reading. Three separate line-segment computations of a cubic-in-coordinates field are replaced by one constant-integrand surface integral over a flat triangle — this is the typical payoff of Stokes' theorem in practice.
Problems
- Verify Stokes' theorem directly (compute both sides independently) for \( \mathbf{F}=(-y,x,0) \) and \( S \) the disc \( x^2+y^2\leq1,\ z=0 \) with upward normal.
Solution
Curl: \( \nabla\times\mathbf{F} = (0,0,\partial_x x - \partial_y(-y)) = (0,0,2) \). Surface integral: \( \iint_S (0,0,2)\cdot(0,0,1)\,dA = 2\cdot\pi(1)^2 = 2\pi \).
Boundary \( \partial S \): unit circle, \( \mathbf{r}(t)=(\cos t,\sin t,0) \), \( t\in[0,2\pi] \), counterclockwise (matches upward normal by right-hand rule). \( \mathbf{F}(\mathbf{r}(t)) = (-\sin t,\cos t,0) \), \( \mathbf{r}'(t)=(-\sin t,\cos t,0) \). \( \mathbf{F}\cdot\mathbf{r}' = \sin^2t+\cos^2t=1 \). So \( \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} = \int_0^{2\pi}1\,dt = 2\pi \). Both sides equal \( 2\pi \). ✓
- Let \( \mathbf{F} = (3y, -xz, yz^2) \) and let \( S \) be the surface of the paraboloid \( z = x^2+y^2 \) below \( z=1 \), oriented with upward-pointing (i.e. outward-from-the-bowl, roughly downward-and-outward) normal component... more precisely take the normal with negative \( z \)-component so that it agrees with the boundary circle \( x^2+y^2=1,\ z=1 \) traversed counterclockwise viewed from above. Use Stokes' theorem, replacing \( S \) by an easier surface with the same boundary, to evaluate \( \oint_{\partial S}\mathbf{F}\cdot d\mathbf{r} \).
Solution
By the surface-independence corollary, replace the paraboloid by the flat disc \( D:x^2+y^2\leq1,\ z=1 \) with upward normal \( (0,0,1) \) (matching the same boundary orientation).
\( \nabla\times\mathbf{F} = (\partial_y(yz^2)-\partial_z(-xz),\ \partial_z(3y)-\partial_x(yz^2),\ \partial_x(-xz)-\partial_y(3y)) = (z^2+x,\ 0,\ -z-3) \).
On \( D \), \( z=1 \): \( \nabla\times\mathbf{F} = (1+x,\,0,\,-4) \), dotted with \( (0,0,1) \) gives \( -4 \). So \( \iint_D (\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = -4\cdot\pi(1)^2 = -4\pi \).
- Explain, using Stokes' theorem, why a \( C^1 \) vector field \( \mathbf{F} \) with \( \nabla\times\mathbf{F}=\mathbf{0} \) on all of \( \mathbb{R}^3 \) must have \( \oint_C \mathbf{F}\cdot d\mathbf{r}=0 \) for every closed curve \( C \) that bounds a surface.
Solution
Any closed curve \( C \) in \( \mathbb{R}^3 \) bounds some piecewise-smooth oriented surface \( S \) (e.g. take a "cone" from \( C \) to any interior point, or a Seifert-type surface for more complicated curves; in \( \mathbb{R}^3 \), being simply connected, every closed curve bounds). By Stokes' theorem, \( \oint_C \mathbf{F}\cdot d\mathbf{r} = \iint_S (\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = \iint_S \mathbf{0}\cdot\mathbf{n}\,dA = 0 \), since \( \nabla\times\mathbf{F}\equiv\mathbf{0} \) by hypothesis. This is exactly the path-independence corollary stated above, applied with domain \( = \mathbb{R}^3 \) (simply connected).
- A student computes \( \iint_S(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA \) two different ways for two different surfaces \( S_1 \) (upper hemisphere of radius 1) and \( S_2 \) (flat disc), both with boundary the unit circle in the \( xy \)-plane and outward/upward normals respectively, using \( \mathbf{F}=(y,-x,e^{xz}) \), and gets different nonzero answers. Identify the error, or show there is none.
Solution
Compute \( \nabla\times\mathbf{F} = (\partial_y e^{xz} - \partial_z(-x),\ \partial_z y - \partial_x e^{xz},\ \partial_x(-x)-\partial_y y) = (0,\ -ze^{xz},\ -2) \). This is smooth everywhere ( \( \mathbf{F}\in C^1 \) on all of \( \mathbb{R}^3\) ), and both \( S_1,S_2 \) are compact, piecewise-smooth, oriented compatibly with the same boundary curve. All hypotheses of the surface-independence corollary hold, so the two surface integrals MUST agree; there is no legitimate way to get different answers, and the student has made a computational error (most likely a normal-vector sign error or an arithmetic slip in one of the two integrals) — not a failure of the theorem. Redo the hemisphere computation carefully, in particular checking the sign convention for \( \mathbf{n} = \mathbf{r}_u\times\mathbf{r}_v/|\cdot| \) versus \( \mathbf{r}_v\times\mathbf{r}_u/|\cdot|\).
- Let \( S \) be an oriented surface with two boundary components \( C_1 \) (outer) and \( C_2 \) (inner, e.g. \( S \) is an annulus-like surface, such as a hemisphere with a small disc removed near the pole). State how Stokes' theorem generalises to this case, and use it to explain why \( \iint_S(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = \oint_{C_1}\mathbf{F}\cdot d\mathbf{r} - \oint_{C_2}\mathbf{F}\cdot d\mathbf{r} \) for suitably (and oppositely) oriented \( C_1, C_2 \), rather than a single boundary integral.
Solution
The proof's patching step (Step 1) generalises directly: triangulate/patch \( S \) into smooth pieces; the total boundary \( \partial S \) of a surface with a hole consists of two disjoint curves. The induced-orientation rule (right-hand rule, surface on the left) forces \( C_1 \) to be traversed counterclockwise (as seen from the \( \mathbf{n} \) side) while \( C_2 \), bounding the removed hole, is traversed clockwise relative to the same viewpoint — equivalently \( \partial S = C_1 - C_2 \) as an oriented boundary (a signed sum of curves, in the same sense that \( \partial[a,b]=\{b\}-\{a\}\)). Applying Stokes' theorem verbatim to this \( S \) with \( \partial S = C_1 \cup(-C_2) \) gives \( \iint_S(\nabla\times\mathbf{F})\cdot\mathbf{n}\,dA = \oint_{C_1}\mathbf{F}\cdot d\mathbf{r} + \oint_{-C_2}\mathbf{F}\cdot d\mathbf{r} = \oint_{C_1}\mathbf{F}\cdot d\mathbf{r} - \oint_{C_2}\mathbf{F}\cdot d\mathbf{r} \), exactly as claimed — no new theorem is needed, only the correct bookkeeping of the boundary orientation, which is the same idea used to prove Green's theorem for multiply-connected regions.