Stokes theorem

Stokes's theorem is the last of the three great integral theorems in the vector-calculus unit, and it is the most general: it turns a line integral of a vector field around a closed curve into a surface integral of the field's curl over any surface that curve bounds. It follows Green's theorem (a flat-region special case) and Gauss's divergence theorem (which relates flux to divergence over a volume), and it closes the loop between circulation, rotation, and conservative fields. The theorem lets you replace a hard boundary computation with an easier one over a well-chosen surface, or vice versa. This article restates the theorem precisely, sketches why it is true by reducing it to Green's theorem patch by patch, verifies it on the same unit-disc example used in the Pass-1 note, and extends the reasoning to a triangular surface where choosing the flat patch beats parametrizing three edges by hand.

The core insight

The circulation of a vector field around a closed curve CC equals the flux of its curl through any oriented surface SS bounded by CC, so ∮CF⃗⋅dr⃗=∬S(∇×F⃗)⋅n^ dS\oint_C \vec F\cdot d\vec r = \iint_S(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS for whichever bounding surface is easiest to integrate over.

The core idea

Let SS be an oriented, piecewise-smooth open surface with unit normal n^\hat{\mathbf n}, bounded by a closed curve C=∂SC=\partial S. The orientation of CC must match n^\hat{\mathbf n} by the right-hand rule: curl the right-hand fingers along CC's direction of travel, and the thumb points along n^\hat{\mathbf n}. If F⃗\vec F has continuous first partial derivatives on an open region containing SS, Stokes's theorem states

∮CF⃗⋅dr⃗=∬S(∇×F⃗)⋅n^ dS.\oint_C \vec F\cdot d\vec r = \iint_S (\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS.

where: F⃗\vec F is the vector field, C=∂SC=\partial S is the closed boundary curve traversed with orientation tied to n^\hat{\mathbf n}, SS is any oriented surface having CC as its boundary, and ∇×F⃗\nabla\times\vec F is the curl of F⃗\vec F, a measure of the field's local rotation. Three consequences make this more than a formula to memorize. First, the right side depends only on the boundary curve CC, not on which particular surface SS spans it — a flat disc and a bulging dome sharing the same rim give the same flux integral, so always pick the simplest surface available. Second, setting SS flat in the xyxy-plane with n^=k^\hat{\mathbf n}=\hat k collapses Stokes's theorem exactly to Green's theorem, so Green's theorem is the special case and Stokes's is the general curved-surface statement. Third, if F⃗\vec F is irrotational (∇×F⃗=0\nabla\times\vec F=\mathbf 0) on a simply connected domain, the right side vanishes for every closed CC, which recovers the earlier path-independence result ∮CF⃗⋅dr⃗=0\oint_C\vec F\cdot d\vec r=0 for conservative fields — Stokes's theorem is the underlying reason that fact holds, not a coincidence.

Figure
A bulging dome and a flat disc sharing the same rim curve C, both surfaces shaded to show they give the same flux integral of the curl
Same rim curve C, any spanning surface gives the same flux of curl F bulging dome S1 flat disc S2 = boundary curve C (same rim) boundary curve C (same rim)

Derivation

Derivation AStokes's theorem as patchwork Green's theorem

Show that Stokes's theorem for a curved surface SS follows from applying the already-established Green's theorem to a fine mesh of tiny flat patches covering SS and summing the results, because the line-integral contributions along every shared internal edge cancel and only the outer boundary CC survives.

Step 1. Cover SS with a fine mesh of small, nearly flat patches S1,S2,…,SnS_1,S_2,\dots,S_n, each bounded by a small closed curve CiC_i oriented consistently with the surface normal by the right-hand rule, exactly as a topographic map tiles a curved hillside with small flat tiles.

Step 2. On each patch, treat SiS_i as flat enough that Green's theorem applies locally in the tangent plane, giving ∮CiF⃗⋅dr⃗≈∬Si(∇×F⃗)⋅n^ dS\oint_{C_i}\vec F\cdot d\vec r \approx \iint_{S_i}(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS to leading order as the patch shrinks, since Stokes's theorem reduces to Green's theorem for a flat piece.

Step 3. Sum this approximate identity over all nn patches: ∑i∮CiF⃗⋅dr⃗≈∑i∬Si(∇×F⃗)⋅n^ dS\sum_i \oint_{C_i}\vec F\cdot d\vec r \approx \sum_i \iint_{S_i}(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS. The right side is just the Riemann sum for ∬S(∇×F⃗)⋅n^ dS\iint_S(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS, so it converges to that integral as the mesh is refined.

Step 4. On the left side, every edge shared between two adjacent patches is traversed once in each direction by the two patches' boundary curves (their orientations are opposite along the shared edge), so those interior contributions cancel exactly in the sum. Only the edges lying on the outer boundary ∂S=C\partial S=C are never shared, so they survive uncancelled.

Step 5. What remains on the left after all interior cancellation is exactly ∮CF⃗⋅dr⃗\oint_C\vec F\cdot d\vec r, the line integral around the single outer boundary curve. Combining with Step 3 in the limit of infinitely fine patches gives ∮CF⃗⋅dr⃗=∬S(∇×F⃗)⋅n^ dS\oint_C\vec F\cdot d\vec r = \iint_S(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS, which is Stokes's theorem.

Worked example

Problem. Verify Stokes's theorem for F⃗(x,y,z)=−y ı^+x ȷ^+0 k^\vec F(x,y,z) = -y\,\hat\imath + x\,\hat\jmath + 0\,\hat k, where SS is the disc x2+y2≤1, z=0x^2+y^2\le1,\ z=0 with upward normal n^=k^\hat{\mathbf n}=\hat k, and CC is its boundary circle, oriented counterclockwise (consistent with n^=k^\hat{\mathbf n}=\hat k by the right-hand rule).

Step 1. Compute the curl with F1=−y, F2=x, F3=0F_1=-y,\ F_2=x,\ F_3=0. The ı^\hat\imath-component is ∂F3/∂y−∂F2/∂z=0−0=0\partial F_3/\partial y-\partial F_2/\partial z = 0-0=0, the ȷ^\hat\jmath-component is ∂F1/∂z−∂F3/∂x=0−0=0\partial F_1/\partial z-\partial F_3/\partial x = 0-0=0, and the k^\hat k-component is ∂F2/∂x−∂F1/∂y=1−(−1)=2\partial F_2/\partial x-\partial F_1/\partial y = 1-(-1)=2. So ∇×F⃗=(0,0,2)\nabla\times\vec F=(0,0,2), a constant vector.

Step 2. Evaluate the surface-integral side: ∬S(∇×F⃗)⋅n^ dS=∬S2 dS=2⋅(area of unit disc)=2π\iint_S(\nabla\times\vec F)\cdot\hat{\mathbf n}\,dS = \iint_S 2\,dS = 2\cdot(\text{area of unit disc}) = 2\pi.

Step 3. Parametrize CC: x=cos⁡t, y=sin⁡t, z=0x=\cos t,\ y=\sin t,\ z=0 for t∈[0,2π]t\in[0,2\pi], counterclockwise. Then F1=−sin⁡t, F2=cos⁡tF_1=-\sin t,\ F_2=\cos t, and x′(t)=−sin⁡t, y′(t)=cos⁡tx'(t)=-\sin t,\ y'(t)=\cos t.

Step 4. Evaluate the line-integral side: ∮CF⃗⋅dr⃗=∫02π[(−sin⁡t)(−sin⁡t)+(cos⁡t)(cos⁡t)]dt=∫02π(sin⁡2t+cos⁡2t) dt=∫02π1 dt=2π\oint_C\vec F\cdot d\vec r = \int_0^{2\pi}\left[(-\sin t)(-\sin t)+(\cos t)(\cos t)\right]dt = \int_0^{2\pi}(\sin^2t+\cos^2t)\,dt = \int_0^{2\pi}1\,dt = 2\pi. Both sides equal 2π2\pi, so Stokes's theorem checks out here, and the constant curl (0,0,2)(0,0,2) means the flux integral is simply twice the disc's area for any flat surface bounded by this circle.

Competitive stretch

Problem. Use Stokes's theorem to evaluate ∮CF⃗⋅dr⃗\oint_C\vec F\cdot d\vec r where F⃗(x,y,z)=−y ı^+x ȷ^+z k^\vec F(x,y,z)=-y\,\hat\imath+x\,\hat\jmath+z\,\hat k and CC is the boundary of the triangle with vertices (1,0,0),(0,1,0),(0,0,1)(1,0,0),(0,1,0),(0,0,1), oriented counterclockwise when viewed from the positive octant.

Step 1. Rather than parametrizing three separate edges, pick the flat triangular surface SS itself, part of the plane x+y+z=1x+y+z=1, as the bounding surface, since Stokes's theorem allows any surface with boundary CC.

Step 2. Compute the curl with F1=−y, F2=x, F3=zF_1=-y,\ F_2=x,\ F_3=z: only the k^\hat k-component is nonzero, ∂F2/∂x−∂F1/∂y=1−(−1)=2\partial F_2/\partial x-\partial F_1/\partial y=1-(-1)=2, so ∇×F⃗=(0,0,2)\nabla\times\vec F=(0,0,2) again.

Step 3. Write SS as z=1−x−yz=1-x-y over the triangular region R: x≥0, y≥0, x+y≤1R:\ x\ge0,\,y\ge0,\,x+y\le1 in the xyxy-plane. Since the first two curl components are zero, the flux integrand reduces to just 22, and RR has legs of length 11 and area 12\tfrac12.

Step 4. Integrate: ∬R2 dA=2⋅12=1\iint_R 2\,dA=2\cdot\tfrac12=1, so ∮CF⃗⋅dr⃗=1\oint_C\vec F\cdot d\vec r=1, obtained entirely from a flat-surface integral without parametrizing any of the triangle's three edges.

Common traps

  • Orientation mismatch between CC and n^\hat{\mathbf n}: the right-hand-rule link between the boundary curve's direction and the surface normal must hold, or the sign of one side of the theorem flips.
  • Choosing a hard surface when an easier one bounded by the same curve exists — the flux integral does not depend on which surface is used, so always pick the simplest one, as in the triangle example above.
  • Confusing Stokes's curl-surface identity with Gauss's divergence-volume identity: Stokes relates a line integral to a surface integral of curl; Gauss relates a closed-surface integral to a volume integral of divergence — they are not interchangeable.
  • Forgetting that F⃗\vec F must have continuous first partial derivatives on a region containing SS, and that SS's boundary must be exactly the single closed curve CC given, not a surface with an extra hole (like an annulus, which has two boundary curves).

Ask the tutor: Want to try Stokes's theorem on a hemispherical cap instead of a flat disc, or get help choosing the easiest bounding surface for a tricky boundary curve?

Why does it matter that the flux integral does not depend on the choice of surface

Because it turns Stokes's theorem into a practical shortcut, not just a statement of equality. If a line integral around an awkward curve is hard to parametrize directly, you can instead pick any convenient surface bounded by that curve, such as a flat disc or triangle rather than a bulging or twisted one, and compute the curl's flux there. The triangle example above shows this concretely: choosing the flat triangular patch avoided parametrizing three separate edges by hand.

How is Stokes theorem different from the divergence theorem I also study in this unit

They relate different pairs of objects. Stokes's theorem connects a line integral around a boundary curve to a surface integral of the curl over any surface spanning that curve. Gauss's divergence theorem connects a surface integral of flux over a closed surface (no boundary curve, since it seals up) to a volume integral of the divergence inside. Stokes needs an open surface with a rim; Gauss needs a closed surface enclosing a solid region. Mixing the two up is a common exam slip.

Do I have to check both sides every time I use Stokes theorem

No, only when a problem explicitly asks you to verify the theorem, as in the disc example. Most exam problems ask you to evaluate one side using the other because it is easier, exactly as in the triangle example, where computing the surface integral over the flat patch was far quicker than parametrizing three line segments. Verification problems exist mainly to build confidence that both sides genuinely agree.

Before this

Where this leads