Stokes’ theorem: formula, orientation, and worked examples

Stokes’ theorem lets us calculate the same quantity using a surface or its boundary curve. One side may be much easier to integrate than the other, so choosing the setup can save a lot of work. Let’s connect the formula to the orientation, then use it in both directions.

Stokes’ theorem connects curl and circulation

∮CF·dr=∬S(∇×F)·ndS

Here S is an oriented surface, C is its closed boundary, F is a vector field, and n is the chosen unit normal. The left side measures circulation around C; the right side is the flux of curl F through S.

For the standard theorem, S is piecewise smooth, C is a simple closed piecewise-smooth boundary with the matching positive orientation, and the components of F have continuous first partial derivatives on an open region containing S.

Match the boundary direction to the normal

Use the right-hand rule: point your right thumb along the surface normal, and your curled fingers give the positive direction around the boundary. For an upward-oriented graph, the boundary is counterclockwise when viewed from above. Reversing the normal reverses the matching boundary direction.

Matching a surface normal to its boundary directionViewed from above a flat circular surface, an upward normal points out of the page, shown as a circled dot. The boundary arrow travels counterclockwise. The direction of the arrow agrees with the upward normal by the right-hand rule.Upward normal: out of the pagenCounterclockwise boundaryViewed from the positive z-axis
Point your right thumb along the normal; your fingers curl in the matching boundary direction.

Example 1: Replace a surface integral with a line integral

Let’s use the vector field

F(x,y,z)=⟨y+2,-z2,2xy⟩

Let S be the cap z=3-x2-y2 above the plane z = −1, oriented upward. At the boundary, z = −1, so

x2+y2=4z=-1

C is a circle of radius 2. The upward orientation makes its direction counterclockwise as viewed from the positive z-axis. A matching parametrization is

r(t)=⟨2cost,2sint,-1⟩

with 0 ≤ t ≤ 2π. Differentiate r and substitute the curve into F.

r′(t)=⟨-2sint,2cost,0⟩
F(r(t))=⟨2sint+2,-1,8cost·sint⟩

The dot product simplifies to

F(r(t))·r′(t)=-4sin2t-4sint-2cost

Stokes’ theorem turns the surface integral into this integral around the boundary:

∫02π(-4sin2t-4sint-2cost)dt

Over one complete period, the sine and cosine terms integrate to 0, and the integral of sin²t is π. The result is

∬S(∇×F)·ndS=-4π

Example 2: Replace a line integral with a surface integral

Now use

F(x,y,z)=⟨2xyz,x2+y2,2xyz⟩

Let C follow the rectangle with vertices (0, 0, 0), (0, 6, 0), (3, 6, 0), and (3, 0, 0), clockwise as viewed from the positive z-axis. Choose the flat rectangle in z = 0 as S. The matching normal points downward:

n=⟨0,0,-1⟩

The curl is

∇×F=⟨2xz,2xy-2yz,2x-2xz⟩

On the rectangle, z = 0, so the curl becomes ⟨0, 2xy, 2x⟩. Its dot product with the downward unit normal is −2x. Therefore,

∮CF·dr=∫03∫06-2xdydx
∫03-12xdx=-54

The clockwise direction is what makes the downward normal the correct choice here. Using the upward normal would correspond to the opposite traversal of C.

How does this relate to Green’s theorem?

Green’s theorem in circulation form is the planar case of Stokes’ theorem. When S lies in the xy-plane with the upward normal, the surface integral uses the vertical component of curl, giving the familiar two-dimensional relationship.

In either setting, we choose the side of the theorem that gives the simpler integral and keep the boundary direction consistent with the surface normal.