Stokes' Theorem Explained Step by Step: Formula and Solved Examples
By Dr. Muhammad Amjad Khadim (PhD Mathematics) · Updated November 2026
Stokes' theorem has a reputation for being hard, but most of that reputation comes from notation rather than ideas. Underneath the symbols, it says something quite natural: if you want to know how much a vector field "swirls" around the edge of a surface, you can add up all the little swirls on the surface itself. In this guide I explain the theorem step by step, show you exactly how to set up the orientation (which is where most students lose marks), and work through several solved examples of the kind you will meet in Calc 3, engineering maths and physics courses in the US, UK and Canada.
Before you start, make sure you are comfortable computing the curl of a vector field. Our post on gradient, divergence and curl covers it, and you can check any curl calculation with the curl of a vector field calculator on our calculators page.
1. The statement of Stokes' theorem
2. The idea behind it
3. Getting the orientation right
4. Step-by-step method
5. Solved examples
6. Common mistakes
7. FAQs and practice problems
1. The Statement of Stokes' Theorem
Let S be a smooth, oriented surface with a boundary curve C, and let F be a vector field with continuous partial derivatives on an open region containing S. Then
The left-hand side is the circulation of F around the closed curve C: a line integral that measures how much F pushes you along as you travel round the loop. The right-hand side is the flux of the curl of F through the surface S. Here ∇ × F is the curl, and n is a unit normal to S chosen to match the direction of travel around C.
For F = (P, Q, R), the curl is
∇ × F = ( ∂R/∂y − ∂Q/∂z, ∂P/∂z − ∂R/∂x, ∂Q/∂x − ∂P/∂y ).
2. The Idea Behind It
Imagine the surface S is covered in a fine grid of tiny squares. The curl at each point tells you the circulation around a tiny loop there, per unit area. Now add up the circulation around every tiny square. Along every interior edge, two neighbouring squares travel in opposite directions, so their contributions cancel exactly. What survives is only the circulation along the outer edge, which is C. That is all Stokes' theorem says: the total of the little swirls equals the swirl around the rim.
An important consequence follows immediately. The right-hand side depends only on the boundary curve C, not on the particular surface you choose. Any two surfaces with the same boundary (and compatible orientation) give the same flux of the curl. This freedom is a powerful problem-solving tool, as Example 3 below shows.
Green's theorem, which you may have met first, is just Stokes' theorem for a flat region in the xy-plane, where n = k and only the k-component of the curl matters.
3. Getting the Orientation Right
The direction around C and the direction of n must agree according to the right-hand rule: curl the fingers of your right hand in the direction you travel around C, and your thumb points in the direction of n.
An equivalent rule that many students find easier: if you walk around C with your head pointing in the direction of n, the surface should always be on your left.
For a surface given as z = g(x, y), the upward normal vector element is
n dS = ( −∂g/∂x, −∂g/∂y, 1 ) dA
where dA = dx dy is an area element in the xy-plane. This formula saves a lot of work, because it avoids normalising n and computing dS separately.
4. Step-by-Step Method
- Identify C and S. Decide which integral is easier. Usually you are given one and asked to find it using the other.
- Compute the curl ∇ × F carefully.
- Choose the simplest surface with boundary C. A flat disc is often far easier than the curved surface in the question.
- Fix the orientation with the right-hand rule.
- Compute the surface integral using n dS = (−gx, −gy, 1) dA or the appropriate normal.
- Check signs against the direction of C.
5. Solved Examples
Example 1: A circle in the xy-plane
Problem. Let F = −y i + x j + z k and let C be the circle x² + y² = 1 in the plane z = 0, traversed counterclockwise when viewed from above. Find ∮C F · dr using Stokes' theorem.
Curl: ∇ × F = (∂z/∂y − ∂x/∂z, ∂(−y)/∂z − ∂z/∂x, ∂x/∂x − ∂(−y)/∂y) = (0, 0, 2).
Surface: take the flat unit disc in the plane z = 0, with upward normal n = k (counterclockwise from above matches upward).
Integral: (∇ × F) · n = 2, so the surface integral is 2 × (area of disc) = 2π.
Direct check: with x = cos t, y = sin t, z = 0, we get F · dr = (−sin t)(−sin t) dt + (cos t)(cos t) dt = dt, so the circulation is ∫02π dt = 2π. Both sides agree.
Example 2: A triangle on a slanted plane
Problem. Let F = z i + x j + y k. Let C be the triangle with vertices (1, 0, 0), (0, 1, 0) and (0, 0, 1), traversed in that order. Find the circulation of F around C.
Curl: ∇ × F = (∂y/∂y − ∂x/∂z, ∂z/∂z − ∂y/∂x, ∂x/∂x − ∂z/∂y) = (1, 1, 1).
Surface: the triangle lies in the plane x + y + z = 1, so z = g(x, y) = 1 − x − y. Its projection onto the xy-plane is the triangle with vertices (1, 0), (0, 1), (0, 0), which is traversed counterclockwise, so we use the upward normal:
n dS = (−gx, −gy, 1) dA = (1, 1, 1) dA.
Integral: (∇ × F) · n dS = (1, 1, 1) · (1, 1, 1) dA = 3 dA. The projected triangle has area 1/2, so the circulation is 3 × 1/2 = 3/2.
You can verify this directly by splitting C into its three straight edges. Each edge contributes 1/2, giving the same total of 3/2, but it takes three separate parametrisations.
Example 3: Replacing a curved surface by a flat one
Problem. Using the same F as in Example 1, find ∬S (∇ × F) · n dS where S is the upper hemisphere x² + y² + z² = 1, z ≥ 0, with upward (outward) normal.
The boundary of the hemisphere is the unit circle in the xy-plane, traversed counterclockwise for the upward normal. That is exactly the curve C from Example 1. By Stokes' theorem, the answer is the circulation around C, which we already know is 2π. No surface parametrisation is needed at all.
This is the "surface independence" property in action: the hemisphere and the flat disc share a boundary, so they give the same flux of the curl.
Example 4: A negative circulation
Problem. Let F = y i + z j + x k and let C be the circle x² + y² = 4, z = 0, traversed counterclockwise from above. Find the circulation.
Curl: ∇ × F = (∂x/∂y − ∂z/∂z, ∂y/∂z − ∂x/∂x, ∂z/∂x − ∂y/∂y) = (−1, −1, −1).
Surface: the disc of radius 2 in the plane z = 0, with n = k. Then (∇ × F) · k = −1 and the area is 4π, so the circulation is −4π.
Check: x = 2 cos t, y = 2 sin t, z = 0 gives F · dr = y dx = (2 sin t)(−2 sin t) dt = −4 sin² t dt, and ∫02π −4 sin² t dt = −4π. The negative sign means the field pushes against the direction of travel overall.
Example 5: A field with zero curl
Let F = ∇(xyz) = (yz, xz, xy). Its curl is zero, because the curl of a gradient is always zero. By Stokes' theorem, the circulation of F around any closed curve is zero. This is the key link between Stokes' theorem and conservative vector fields, which we cover in a separate post. (For flux through a closed surface, the tool you want is the divergence theorem instead.)
6. Common Mistakes
- Wrong orientation. Always state which way C goes and which way n points, and check they obey the right-hand rule.
- Curl sign errors. The middle component is ∂P/∂z − ∂R/∂x, not the other way round.
- Using the theorem with a closed surface. A closed surface such as a whole sphere has no boundary, so the flux of the curl through it is zero. If a question gives you a closed surface, think of the divergence theorem instead.
- Forgetting the projection factor. If you use a unit normal, you need dS, not dA. Using n dS = (−gx, −gy, 1) dA avoids this.
- Ignoring singularities. F must be smooth on the whole surface. A field like (−y, x, 0)/(x² + y²) is undefined on the z-axis, so you cannot use a disc that crosses it.
7. FAQs
What is the difference between Stokes' theorem and the divergence theorem?
Stokes' theorem relates a surface integral of the curl to a line integral around the boundary curve. The divergence theorem relates a volume integral of the divergence to a flux integral over the closed boundary surface. One is about rotation, the other about expansion.
Why does Stokes' theorem not depend on the surface?
Because the right-hand side equals the line integral around C, which only depends on C. Mathematically, the difference between two surfaces with the same boundary is a closed surface, and the flux of a curl through a closed surface is zero since ∇ · (∇ × F) = 0.
Is Green's theorem a special case of Stokes' theorem?
Yes. For a flat region in the xy-plane with n = k, Stokes' theorem becomes ∮ P dx + Q dy = ∬ (∂Q/∂x − ∂P/∂y) dA, which is Green's theorem.
Where is Stokes' theorem used in physics?
It turns Faraday's law and Ampère's law from integral form into differential form in electromagnetism, and it is used to compute circulation and vorticity in fluid dynamics.
Practice Problems
- F = −y i + x j, C the circle x² + y² = 9, counterclockwise. (Answer: 18π)
- F = y i − x j, C the unit circle, counterclockwise. (Answer: −2π)
- F = x² i + y² j + z² k, any closed curve. (Answer: 0, since the curl is zero)
Test yourself further with our vector and tensor analysis MCQs with answers, and if you want an angle refresher for orientation questions, see how to find the angle between two vectors. For more reading, Paul's Online Notes has a clear section on Stokes' theorem, and the MathWorld entry gives the general form. For quick unit conversions in physics problems, try the free converters at PakMath.
Comments
Post a Comment