# Stokes' Theorem

**Stokes' theorem** is a generalization of Green’s theorem to higher dimensions. While Green's theorem equates a two-dimensional area integral with a corresponding line integral, Stokes' theorem takes an integral over an \( n \)-dimensional area and reduces it to an integral over an \( (n-1) \)-dimensional boundary, including the 1-dimensional case, where it is called the Fundamental Theorem of Calculus. This allows a proof by induction.

In many applications, "Stokes' theorem" is used to refer specifically to the *classical Stokes' theorem*, namely the case of Stokes' theorem for \( n = 3 \), which equates an integral over a two-dimensional surface (embedded in \(\mathbb R^3\)) with an integral over a one-dimensional boundary curve. This article follows that convention and focuses on the classical Stokes' theorem. A discussion of the generalized theorem is left to the references at the end of this article.

Many parts of classical physics rely on Stokes' theorem to make different equivalent formulations of physical laws, most notably Maxwell's equations governing electromagnetism.

## Motivation

Suppose some surface \( S \) is bounded by a closed path \( C \). Consider a line integral through a vector field \( \mathbf{F} \) taken about \( C \)

\[\int_C \mathbf{F} \cdot d\mathbf{s},\]

which will be termed the *circulation*.

If the surface is divided into two closed paths, it is easy to see that the sum of the circulation of each path is the same as for the undivided path \( C \). No matter where the "cut" is made to divide up the surface, the line integral over the boundary between the divided regions is traversed in opposite directions in the calculation of each circulation. Meanwhile, the total line integral over the paths that were originally part of \( C \) remains unchanged.

By the same reasoning, one can conjecture that the total circulation never changes, no matter how many divisions of the surface are made. For many closed paths \( C_i \), one can write

\[ \int_C \mathbf{F} \cdot d\mathbf{s} = \sum_i \int_{C_i} \mathbf{F} \cdot d\mathbf{s} \]

Clearly, the circulation of each patch depends on some extent to its size. One can continue to divide the surface indefinitely, such that area \(a_i\) of each patch becomes arbitrarily small. As the area of each patch vanishes to a point, one obtains a local vector-valued property at each point on the surface called the *curl*, denoted \( \nabla \times \mathbf{F} \):

\[ (\nabla \times \mathbf{F}) \cdot \hat{\mathbf{n}} = \lim_{a_i \rightarrow 0} \left( \frac{1}{a_i} \int_{C_i} \mathbf{F} \cdot d\mathbf{s} \right). \]

The dot product with the normal unit vector \( \hat{\mathbf{n}} \) is taken so that one only has to be concerned with the normal component of the curl.

If the integral of the curl is taken over the entire surface, then one simply ends up with

\[ \int_S \nabla \times \mathbf{F} \cdot d\mathbf{a}. \]

But the sum over all of the circulations is simply the circulation over the entire surface \[\int_C \mathbf{F} \cdot d\mathbf{s}.\]

Stokes' theorem asserts that both are equal:

\[ \boxed{\displaystyle\int_C \mathbf{F} \cdot d\mathbf{s} = \displaystyle\int_S \nabla \times \mathbf{F} \cdot d\mathbf{a}.} \]

Thus, instead of computing a line integral over the boundary of a surface, one can instead compute the curl of the vector field taken over the entire surface, or vice versa.

## Curl in Cartesian Coordinates

To compute the curl in some choice of coordinates, one considers how the circulation vanishes with respect to the area of a small patch in the desired coordinates. Consider the simple case of Cartesian coordinates, for which the natural choice of small surface is a rectangular patch.

Suppose one has such a patch whose lower left corner is the point \( (x, y) \). To first order, the line integral of a vector field \( \mathbf{F} = F_x \hat{\mathbf{x}} + F_y \hat{\mathbf{y}} + F_z \hat{\mathbf{z}} \) over some horizontal path \( \Delta x \) is simply \( (\partial F_y/\partial x) \Delta x \). Thus, if one moves in a counterclockwise direction, traversing first \( \Delta x \) horizontally, \( \Delta y \) vertically, \( -\Delta x \) horizontally, and finally \( -\Delta y \) vertically, one finds that the line integral over the boundary of the patch over some vector field \( \mathbf{F} \) simply reduces to

\[ \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \Delta x \Delta y. \]

The same computation done over all three directions \( x \), \( y \), and \( z \) yields

\[ \nabla \times \mathbf{F} = \left( \frac{\partial F_z}{\partial y} - \frac{\partial F_y}{\partial z} \right) \hat{\mathbf{x}} + \left( \frac{\partial F_x}{\partial z} - \frac{\partial F_z}{\partial x} \right) \hat{\mathbf{y}} + \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \hat{\mathbf{z}}, \]

which is the expression for the curl in Cartesian coordinates. In the matrix notation, the curl of the function \(\mathbf F\) can also be denoted as follows:

\[\nabla \times \mathbf F = \begin{vmatrix} \mathbf x & \mathbf y & \mathbf z\\ \dfrac{\partial}{\partial x} & \dfrac{\partial}{\partial x} & \dfrac{\partial}{\partial x}\\ M & N & P\\ \end{vmatrix}\]

The reason for the choice of notation \( \nabla \times \) lies in some slight abuse of notation. One can "define" \( \nabla \) as the following quantity:

\[ \nabla = \frac{\partial}{\partial x} \hat{\mathbf{x}} + \frac{\partial}{\partial y} \hat{\mathbf{y}} + \frac{\partial}{\partial z} \hat{\mathbf{z}}, \]

in which case the curl can then be computed by taking the "cross product" of \( \nabla \) with \( \mathbf{F} \).

Find the curl of \[ \mathbf{F}(x,y,z) = (x+y) \hat{\mathbf{x}} + (y+z) \hat{\mathbf{y}} + (x+z) \hat{\mathbf{z}}. \]

Using the expression for the curl in Cartesian coordinates, one finds that

\[ \nabla \times \mathbf{F} = (0 - 1) \hat{\mathbf{x}} + (0 - 1) \hat{\mathbf{y}} + (0 - 1) \hat{\mathbf{z}} = -(\hat{\mathbf{x}} + \hat{\mathbf{y}} + \hat{\mathbf{z}}). \]

A field is

conservativeif and only if its curl vanishes everywhere. Show that\[ \mathbf{F}(x, y) = - \frac{y}{x^2 + y^2} \hat{\mathbf{x}} + \frac{x}{x^2 + y^2} \hat{\mathbf{y}} \]

is conservative.

By inspection, the curl is zero in the \( \hat{\mathbf{x}} \) and \( \hat{\mathbf{y}} \) components. It remains to compute the \( \hat{\mathbf{z}} \) component

\[ \left( \frac{\partial F_y}{\partial x} - \frac{\partial F_x}{\partial y} \right) \hat{\mathbf{z}} = \left(\frac{y^2 - x^2}{(x^2 + y^2)^2} - \frac{y^2 - x^2}{(x^2 + y^2)^2} \right) \hat{\mathbf{z}} = 0. \]

Therefore \( \nabla \times \mathbf{F} = 0 \), and \( \mathbf{F} \) is conservative.

(In general, for a two-dimensional field, it suffices to check whether \( \partial F_y/\partial x = \partial F_x/\partial y \).)

Let \( C \) be a counterclockwise circular path of radius \( R \) in the \( xy \) plane and centered about the origin, and let \( \mathbf{F} \) be a field defined by

\[ \mathbf{F}(x, y) = - \frac{y}{x^2 + y^2} \hat{\mathbf{x}} + \frac{x}{x^2 + y^2} \hat{\mathbf{y}}. \]

Compute the line integral

\[ \displaystyle\int_C \mathbf{F} \cdot d\mathbf{s}. \]

By Stokes' theorem,

\[\displaystyle\int_C \mathbf{F} \cdot d\mathbf{s} = \displaystyle\int_S \nabla \times \mathbf{F} \cdot d\mathbf{a}.\]

But by the previous example, we know that \( \nabla \times \mathbf{F} = 0 \), so the integral evaluates to zero.

In general, the line integral of a conservative field (field whose curl vanishes everywhere) over any closed path must be zero as a consequence of Stokes' theorem.

## Application to Maxwell's Equations

In classical electromagnetism, one may wish to reframe statements about regional properties of a system (e.g., total current that flows through a loop) in terms of local statements in space (e.g., the current density at a point). The divergence theorem Stokes' theorem is able to do this naturally by changing a line integral over some region into a statement about the curl at each point on that surface.

Ampère's law states that the line integral over the magnetic field \( \mathbf{B} \) is proportional to the total current \(I_\text{encl} \) that passes through the path over which the integral is taken:

\[ \int_{\text{loop}} \mathbf{B} \cdot d\mathbf{s} = \mu_0 I_\text{encl}. \]

This is the so-called *integral form* of Ampère's law.

To express Ampère's law in a *local* form, one can use Stokes' theorem to rewrite the line integral \( \int \mathbf{B} \cdot d\mathbf{s} \) in terms of the surface integral of the curl of \( \mathbf{B} \):

\[ \int_\text{loop} \mathbf{B} \cdot d\mathbf{s} = \int_\text{surface} \nabla \times \mathbf{B} \cdot d\mathbf{a}. \]

But Ampère's law says that

\[ \int_\text{loop} \mathbf{B} \cdot d\mathbf{s} = \mu_0 I_\text{encl} = \mu_0 \int_\text{surface} \mathbf{J} \cdot d\mathbf{a}, \]

where \( \mathbf{J} \) is the *current density*. It is the generalized, continuous version of the current \( I \). Of course, the surface integral in both equations can be taken over any chosen closed surface, so the integrands must be equal:

\[ \nabla \times \mathbf{B} = \mu_0 \mathbf{J}. \]

This is the *differential form* of Ampère's law, which is much easier to use when doing analytic electrodynamics calculations.

Similarly, Faraday's law states the following relationship between the electric field \( \mathbf{E} \) and the magnetic field \( \mathbf{B} \), which varies in time \( t \):

\[ \int_\text{loop} \mathbf{E} \cdot d\mathbf{s} = - \frac{d}{dt} \int_S \mathbf{B} \cdot d\mathbf{a}. \]

One can invoke Stokes' theorem on the left side to equate the two integrands:

\[ \int_S \nabla \times \mathbf{E} \cdot d\mathbf{a} = - \frac{d}{dt} \int_S \mathbf{B} \cdot d\mathbf{a}. \]

Again, one argue that since the relationship must hold true for any arbitrary surface \( S \), it must be the case that the two integrands are equal, and therefore

\[ \nabla \times \mathbf{E} = -\frac{d\mathbf{B}}{dt}. \]

This is the *differential form* of Faraday's law.

## References

[1] Edwards, C.H. *Advanced Calculus of Several Variables.* Dover, 1994.

[2] Purcell, E.M. *Electricity and Magnetism.* Third edition. Cambridge University Press, 2013.

[3] Spivak, Michael. *Calculus.* Fourth edition. Publish or Perish, 2008.

[4] Stewart, James. *Calculus.* Seventh edition. Brooks Cole, 2012.