Calculus
Stokes' Theorem
Surface integral of curl = line integral around the rim
Stokes' theorem says the surface integral of curl equals the line integral around the boundary: ∬_S (∇×F)·dS = ∮_∂S F·dr. It generalises Green's theorem to oriented surfaces in 3D, underpins Faraday's and Ampère's laws, and is the gateway to the unified differential-forms version that subsumes every classical integral identity.
- Statement∬_S (∇×F)·dS = ∮_∂S F·dr
- HypothesesS oriented, piecewise-smooth, ∂S simple closed curve
- Orientationn̂ and ∂S match by right-hand rule
- Reduces toGreen's theorem when S is flat
- DiscoveredKelvin 1850; Stokes' 1854 exam question
- Applies inFaraday's law, Ampère–Maxwell law, fluid circulation
Watch the 60-second explainer
A condensed visual walkthrough — narrated, captioned, under a minute.
The statement
Let S be an oriented, piecewise-smooth surface in ℝ³ bounded by a simple, piecewise-smooth, positively oriented curve C = ∂S. Let F = ⟨P, Q, R⟩ have continuous first partials on an open set containing S. Then
∬_S (∇×F) · dS = ∮_C F · dr.
The left-hand side adds up the swirl of F across the entire surface; the right-hand side is the circulation of F around the rim. The two are always equal, no matter which surface you choose to span the curve.
Picture a butterfly net. The wire hoop is ∂S; the mesh is S. Stokes' says total mesh-curl equals net circulation around the hoop. Bend the mesh — make it bowl-shaped, dome-shaped, anything attached to the same hoop — and the integral over the mesh does not change. That is the surface-independence theorem and it is the workhorse identity in electromagnetism.
Worked example — using Stokes' to compute a hard line integral
Let F = ⟨−y, x, z²⟩ and let C be the unit circle in the xy-plane, oriented counterclockwise from above. Compute ∮_C F·dr.
Direct computation works, but Stokes' is faster. Choose S to be the flat unit disk x² + y² ≤ 1, z = 0, with normal n̂ = k̂. Compute the curl:
∇×F = ⟨ ∂(z²)/∂y − ∂x/∂z , ∂(−y)/∂z − ∂(z²)/∂x , ∂x/∂x − ∂(−y)/∂y ⟩ = ⟨0, 0, 2⟩.
Then (∇×F)·n̂ = 2, and ∬_S 2 dA = 2 · π = 2π. By Stokes', ∮_C F·dr = 2π — without parametrising the cubic z² term ever.
Worked example — surface independence
Same F = ⟨−y, x, z²⟩, same boundary C (unit circle in xy-plane). Now use the upper hemisphere x² + y² + z² = 1, z ≥ 0, oriented with outward normal. Stokes' guarantees the answer is still 2π — but let's verify.
On the hemisphere parametrised by spherical coordinates, dS = ⟨sin φ cos θ, sin φ sin θ, cos φ⟩ sin φ dφ dθ. The curl is constant ⟨0, 0, 2⟩, so
(∇×F)·dS = 2 cos φ · sin φ dφ dθ = sin(2φ) dφ dθ.
Integrate over θ ∈ [0, 2π], φ ∈ [0, π/2]:
∬ = 2π ∫_0^{π/2} sin(2φ) dφ = 2π · 1 = 2π.
Same answer. Different surface, same boundary, same curl integral — exactly as Stokes' predicts.
Worked example — Stokes' specialises to Green's
Take F = ⟨P(x, y), Q(x, y), 0⟩ and let S be a flat region D in the xy-plane with normal n̂ = k̂. Then
(∇×F)·k̂ = ∂Q/∂x − ∂P/∂y,
F·dr = P dx + Q dy.
Stokes' theorem reduces, term by term, to ∮_C P dx + Q dy = ∬_D (∂Q/∂x − ∂P/∂y) dA — the planar circulation form of Green's. Green's is literally Stokes' on a flat surface. The 2D theorem inherits its hypotheses (orientation, smoothness, simple connectedness) from this reduction.
Stokes' vs Green's vs the divergence theorem
The "fundamental trio" of vector calculus, side by side:
| Green's theorem | Stokes' theorem | Divergence theorem | |
|---|---|---|---|
| Region | Plane region D | Surface S in ℝ³ | Solid V in ℝ³ |
| Boundary | Curve ∂D | Curve ∂S | Surface ∂V |
| Boundary integral | ∮ P dx + Q dy | ∮ F·dr | ∬ F·dS |
| Interior integrand | ∂Q/∂x − ∂P/∂y | (∇×F)·n̂ | ∇·F |
| Differential operator | 2D curl | 3D curl | Divergence |
| Topological hypothesis | D simply connected | S has well-defined orientation | V bounded with outward n̂ |
| Generalises to | Stokes' in 3D | Differential forms ∫_∂Ω ω = ∫_Ω dω | Same generalised Stokes' |
All three are special cases of the same generalised Stokes' theorem on differential forms — ∫_∂Ω ω = ∫_Ω dω. The fundamental theorem of calculus, ∫_a^b f'(x) dx = f(b) − f(a), is the 1D version, and the geometric content is the same: an antiderivative integrated over a region equals the original function on the boundary.
Orientation — getting the sign right
Stokes' is sign-sensitive. The rule that ties the surface normal to the boundary direction is the right-hand rule: point your right thumb along n̂; your fingers curl in the direction the boundary is traversed.
Concretely, if you stand on S with your head pointing in the n̂ direction and walk along ∂S, the surface should be on your left. Reverse n̂ and you must reverse the direction of traversal — otherwise both sides of the equation pick up a minus and the identity is violated by a factor of −1.
Worked check on Example 1: with n̂ = k̂ on the disk, the boundary is the unit circle traversed counterclockwise as seen from +z — exactly the convention we used. Both sides came out to +2π. Pick n̂ = −k̂ (downward) and the line integral has to be reversed (clockwise from above), and both sides become −2π. The identity holds either way; mismatching them does not.
Stokes' theorem in Maxwell's equations
Maxwell's equations in differential form are local; their integral siblings are global. Stokes' is what translates between them.
- Faraday's law. Differential: ∇×E = −∂B/∂t. Integrate over a surface S and apply Stokes': ∮_∂S E·dr = −d/dt ∬_S B·dS = −dΦ_B/dt. The voltage induced around a wire loop equals minus the rate of change of magnetic flux through any surface spanning the loop. This is what makes a generator a generator.
- Ampère–Maxwell law. Differential: ∇×B = μ₀ J + μ₀ ε₀ ∂E/∂t. Stokes' converts to ∮ B·dr = μ₀ I_enc + μ₀ ε₀ dΦ_E/dt. Used to compute the magnetic field around long wires, solenoids and coaxial cables.
The surface-independence of Stokes' is what reconciles these laws with the experimental fact that magnetic flux through "any surface bounded by the loop" gives the same induced EMF — early experimentalists worried this might be ambiguous; Stokes' guarantees it is not.
Stokes' in fluids — Kelvin's circulation theorem
For an inviscid incompressible fluid moving along a closed material loop C(t), Kelvin showed that
dΓ/dt = 0, where Γ = ∮_{C(t)} v·dr.
The circulation is conserved as the loop is carried with the flow. Stokes' rewrites Γ as ∬_S (∇×v)·dS — the integrated vorticity. So vorticity in an ideal fluid is preserved as a flux through any spanning surface, an idea that pervades the design of helicopter rotors, vortex tubes and tornado modelling.
Conservation laws via Stokes'
Combining Stokes' with the identity ∇·(∇×G) = 0 produces conservation statements automatically. If a current density J satisfies J = ∇×G for some "vector potential" G, then any flux of J through a closed surface vanishes (divergence theorem applied to ∇·J = ∇·∇×G = 0). Magnetic flux conservation, ∮∮ B·dS = 0 over a closed surface, is the textbook example: B = ∇×A for the magnetic vector potential A means total magnetic flux through any closed surface is identically zero — a global statement enforced by Stokes' and a single line of vector identity.
Who was Stokes (and Kelvin)
The classical statement was first written down by Lord Kelvin (William Thomson) in a private letter to George Gabriel Stokes in 1850. Stokes, who held the Lucasian chair at Cambridge, set it as a question on the 1854 Smith's Prize examination — and the name "Stokes' theorem" stuck. James Clerk Maxwell, one of the candidates that year, remembered it forever. The differential-forms generalisation that subsumes Green's, classical Stokes' and the divergence theorem under a single ∫_∂Ω ω = ∫_Ω dω was developed in the 20th century by Élie Cartan and Hermann Weyl.
Common mistakes
- Mismatched orientation. n̂ on S and the direction of ∂S must agree by the right-hand rule. Choosing the wrong sign on either side flips the answer. When in doubt, parametrise both consistently and check on a simple test case.
- Forgetting that ∂S must be closed. Stokes' applies only when the boundary is a simple closed curve (or a disjoint union thereof). For a surface with no boundary — a closed sphere, say — both sides vanish trivially, but the theorem is vacuous, not informative.
- Using a surface that crosses a singularity of F. If F (or its curl) blows up somewhere on S, surface independence fails. The classic example is a magnetic-monopole-like field; you must remove the singular point and use a more general "Stokes' on a manifold with multiple boundary components."
- Confusing surface and line orientation. ∂S inherits its direction from n̂, not the other way around. Pick n̂ first; the boundary direction follows. Common student error: parametrise C clockwise, then choose n̂ upward — and lose a sign on the answer.
- Believing surface independence holds when it does not. Two surfaces with the same boundary give the same ∬(∇×F)·dS only if F has continuous curl on a region containing both. If you stretch a surface around a current-carrying wire, you cross J — and the integral picks up the enclosed current. This is the source of the "Maxwell's correction" story.
- Treating Stokes' as just Green's "in 3D." Surface integrals are not just heavier double integrals; they are oriented and depend on the embedding. The geometry of a curved S — its parametrisation, normal, area element — must enter the calculation.
Frequently asked questions
What does Stokes' theorem say in plain words?
The total amount of swirl across a surface equals the circulation around its rim. Sum the curl of F over every point of the surface and you get exactly the line integral of F around the boundary curve. Boundary captures interior, lifted from the plane (Green's) to surfaces in space.
Does the surface matter, or only its boundary?
Only the boundary, provided the curl is defined and continuous everywhere on any surface spanning it. ∮_∂S F·dr depends solely on the boundary curve, so any two surfaces sharing the same boundary give the same surface integral of curl. This "surface independence" is the basis of every magnetic-flux argument.
How is Stokes' related to Green's?
Take Stokes' theorem with S a flat region in the xy-plane. The normal is k̂, so (∇×F)·n̂ reduces to ∂Q/∂x − ∂P/∂y, and ∮ F·dr becomes ∮ P dx + Q dy. The full 3D theorem collapses to Green's. Green's is Stokes' on a flat surface.
What is the right-hand orientation rule?
Choose a unit normal n̂ on S. Curl the fingers of your right hand around the boundary; if they go in the direction of traversal of ∂S, your thumb should match n̂. Equivalently, walk along ∂S with n̂ pointing "up" from your head — the surface stays on your left. Get this wrong and you flip the sign.
What does Stokes' say about Faraday's law?
Faraday's law says ∮ E·dr = −dΦ_B/dt. Apply Stokes' to the left side: ∮ E·dr = ∬ (∇×E)·dS. The right side is −d/dt ∬ B·dS = ∬ (−∂B/∂t)·dS. Equality of integrands gives the differential form ∇×E = −∂B/∂t. Stokes' is what bridges the integral and differential statements of Maxwell.
Is there a generalised Stokes' theorem?
Yes — and it is one of the deepest theorems in mathematics. ∫_∂Ω ω = ∫_Ω dω for a smooth differential form ω on an oriented manifold Ω. The fundamental theorem of calculus, Green's, classical Stokes' and the divergence theorem are all special cases. The generalisation is what unifies them under a single statement.