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 -dimensional area and reduces it to an integral over an -dimensional boundary.
In many applications, "Stokes' theorem" is used to refer specifically to the classical Stokes' theorem, namely the case of Stokes' theorem for , which equates an integral over a two-dimensional surface (embedded in ) 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.
Suppose some surface is bounded by a closed path . Consider a line integral through a vector field taken about
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 . 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 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 , one can write
Clearly, the circulation of each patch depends on some extent to its size. One can continue to divide the surface indefinitely, such that area 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 :
The dot product with the normal unit vector 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
But the sum over all of the circulations is simply the circulation over the entire surface
Stokes' theorem asserts that both are equal:
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.
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 . To first order, the line integral of a vector field over some horizontal path is simply . Thus, if one moves in a counterclockwise direction, traversing first horizontally, vertically, horizontally, and finally vertically, one finds that the line integral over the boundary of the patch over some vector field simply reduces to
The same computation done over all three directions , , and yields
which is the expression for the curl in Cartesian coordinates. In the matrix notation, the curl of the function can also be denoted as follows:
The reason for the choice of notation lies in some slight abuse of notation. One can "define" as the following quantity:
in which case the curl can then be computed by taking the "cross product" of with .
Find the curl of
Using the expression for the curl in Cartesian coordinates, one finds that
A field is conservative if and only if its curl vanishes everywhere. Show that
By inspection, the curl is zero in the and components. It remains to compute the component
Therefore , and is conservative.
(In general, for a two-dimensional field, it suffices to check whether .)
Let be a counterclockwise circular path of radius in the plane and centered about the origin, and let be a field defined by
Compute the line integral
By Stokes' theorem,
But by the previous example, we know that , 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.
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 is proportional to the total current that passes through the path over which the integral is taken:
This is the so-called integral form of Ampère's law.
But Ampère's law says that
where is the current density. It is the generalized, continuous version of the current . Of course, the surface integral in both equations can be taken over any chosen closed surface, so the integrands must be equal:
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 and the magnetic field , which varies in time :
One can invoke Stokes' theorem on the left side to equate the two integrands:
Again, one argue that since the relationship must hold true for any arbitrary surface , it must be the case that the two integrands are equal, and therefore
This is the differential form of Faraday's law.
 Edwards, C.H. Advanced Calculus of Several Variables. Dover, 1994.
 Purcell, E.M. Electricity and Magnetism. Third edition. Cambridge University Press, 2013.
 Spivak, Michael. Calculus. Fourth edition. Publish or Perish, 2008.
 Stewart, James. Calculus. Seventh edition. Brooks Cole, 2012.