Curl measures how much a field circulates round a tiny square, per unit area: the spin of a paddle wheel. Derive it, prove Green’s theorem for a rectangle, see why gradients have no curl, and find the rotation that makes two-player training circle.
M05.10.4L2 Intermediate25 minIn review (what this means)
The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.
Derive curl F = dQ/dx - dP/dy as the limit of the circulation round a small square divided by its area, and read it as the spin of a paddle wheel.
Prove Green’s theorem for a rectangle and check it on the unit disc for the rotation field and on the unit square for the cubic field.
Show that the curl of a gradient is zero by Schwarz’s theorem, and use the vortex on the punctured plane to explain why zero curl alone does not make a gradient.
Split a field’s Jacobian into symmetric and antisymmetric parts, and explain why a purely antisymmetric part makes simultaneous gradient play circle.
The question
Two networks trained against each other, as in a GAN, can chase each other round in circles instead of settling. The last two lessons detected circling with a whole loop: a field with work round a loop has no potential. Is there a number at each single point that measures how much the field turns, and how does it add up to the work round a loop?
From the last lesson
1. Define the divergence of \({\vect{F} = (P, Q)}\).
Show answer
\({\operatorname{div}\vect{F} = \pd{P}{x} + \pd{Q}{y}}\), the trace of the Jacobian: the net flux out of a tiny square per unit area.
Put a tiny paddle wheel in the flow, pinned at its centre so it can turn but not drift. If the field pushes harder on the blades on one side than the other, round the same way, the wheel spins.
M05.10.4-F1
A paddle wheel in two fields. In the rotation it spins anticlockwise; in the source the pushes have no turning effect, so it stays still while it is pushed.
The curl is the measure of that spin. Like the divergence it comes from a small square, but now we add the field’s push along the sides, round the square, instead of across them.
Build it up
Step 1. Circulation round a small square. Go round the square of side \(h\) centred at \({(a, b)}\) anticlockwise. Along the bottom we move in the \(+x\) direction, so the push that counts is \(P\); along the top we move in the \(-x\) direction and it is \({-P}\). On the right we move up, \({+Q}\); on the left down, \({-Q}\). Each side contributes about its push times \(h\).
M05.10.4-F2
The circulation round a small square, side by side. Right and left measure how \(Q\) changes with \(x\); bottom and top measure how \(P\) changes with \(y\), with a minus sign.
Step 2. Pair the opposite sides. Right plus left, and bottom plus top, are about
Step 3. Divide by the area. The circulation per unit area tends to \({\pd{Q}{x} - \pd{P}{y}}\). For the rotation \({(-y, x)}\) that is \({1 - (-1) = 2}\); for the source \({(x, y)}\) it is \({0 - 0 = 0}\).
Step 4. Straight arrows can still spin a wheel. The arrows need not go round for the curl to be non-zero. What matters is how they change across the wheel.
M05.10.4-F5
The shear \({(0, x)}\) has no arrow that turns, yet its curl is 1: the wheel’s right blade is pushed up and its left blade down.
The formal statement
NoteDefinition: curl in the plane
For \({\vect{F} = (P, Q)}\) with continuous partial derivatives, the (scalar) curl is
If \(S_h\) is the square of side \(h\) centred at \({(a, b)}\), run anticlockwise, then \({\frac{1}{h^2}\oint_{\partial S_h} \vect{F} \cdot d\vect{r} \to \operatorname{curl}\vect{F}(a, b)}\) as \({h \to 0}\), by the mean-value argument that proved the same limit for the divergence in M05.10.3.
For a rigid rotation \({\omega\,(-y, x)}\) at angular speed \(\omega\), the curl is \({2\omega}\): a paddle wheel carried along turns at \({\omega}\), half the curl. The running fields: the rotation has curl 2, the source 0, the bowl’s gradient \({(2x, 4y)}\) has \({0 - 0 = 0}\), and the cubic field \({(x^3 + y,\; xy^2)}\) has \({y^2 - 1}\).
NoteTheorem: Green’s theorem
Let \(D\) be a region bounded by a closed curve \(C\), run anticlockwise (with \(D\) on the left), and let \(P\) and \(Q\) have continuous partial derivatives on and inside \(C\). Then
The left side is the circulation \({\oint_C \vect{F} \cdot d\vect{r}}\) written in components.
Proof for a rectangle\({D = [a_1, a_2] \times [b_1, b_2]}\). Take the two terms of the double integral separately. Integrating \({\pd{Q}{x}}\) first in \(x\) uses the fundamental theorem of calculus:
The first piece is \({\int Q\,dy}\) up the right side; the second, with its minus sign, is \({\int Q\,dy}\) down the left side. On the top and bottom \({dy = 0}\), so this is all of \({\oint_C Q\,dy}\). In the same way, integrating \({\pd{P}{y}}\) first in \(y\),
which is \({\int P\,dx}\) rightwards along the bottom plus \({\int P\,dx}\) leftwards along the top: all of \({\oint_C P\,dx}\), since \({dx = 0}\) on the sides. Adding the two gives the theorem. ∎
For other regions, cut \(D\) into small rectangles: as with the flux in M05.10.3, the circulations along shared sides cancel, because the two neighbours run them in opposite directions.
Gradients have no curl. If \({\vect{F} = \nabla f}\) then \({P = f_x}\) and \({Q = f_y}\), so
\[
\operatorname{curl}\nabla f = f_{yx} - f_{xy} = 0
\]
whenever the second partial derivatives are continuous, by Schwarz’s theorem (M05.5.1). The converse needs a condition: on a region with no holes (simply connected), a field with zero curl is a gradient. This is stated here; Green’s theorem is the heart of the proof, since it makes every loop’s circulation the integral of a zero curl.
M05.10.4-F6
The Jacobian’s two parts. A purely antisymmetric Jacobian, curl without divergence, gives circles. Adding a symmetric pull towards the centre turns the circles into an inward spiral.
Curl is the antisymmetric part of the Jacobian. Write \({\mat{J}_{\vect{F}} = \mat{S} + \mat{A}}\) with \({\mat{S} = \tfrac12(\mat{J} + \mat{J}\T)}\) symmetric and \({\mat{A} = \tfrac12(\mat{J} - \mat{J}\T)}\) antisymmetric. In the plane
because \({J_{21} - J_{12} = \pd{Q}{x} - \pd{P}{y}}\). The symmetric part stretches and squeezes, and its trace is the divergence; the antisymmetric part is a pure rotation at angular speed \({\operatorname{curl}/2}\). A gradient field has Jacobian equal to the symmetric Hessian, so its antisymmetric part is zero. The descent-ascent field of the game \({xy}\) has \({\mat{J} = \mat{A}}\), with eigenvalues \({\pm i}\): nothing pulls it in, and it circles.
Curl in three dimensions. For \({\vect{F} = (P, Q, R)}\) the curl is a vector,
pointing along the axis a paddle wheel would spin about. The plane’s curl is its third entry. The rotation \({(-y, x, 0)}\) about the \(z\)-axis has curl \({(0, 0, 2)}\).
Worked example
Green’s theorem on the unit disc. For the rotation, lesson M05.10.2 found the circulation round the unit circle: \({2\pi}\). Its curl is 2 everywhere, so the double integral is \({2 \times \pi = 2\pi}\), twice the disc’s area. Both sides agree.
Green’s theorem on the unit square. For the cubic field \({\vect{F} = (x^3 + y,\; xy^2)}\) the curl is \({y^2 - 1}\). Go round the square \({[0, 1]^2}\) anticlockwise.
M05.10.4-F3
The worked example as a trace. Four sides, total circulation \({-2/3}\), the same as the integral of the curl over the square.
Inside, \({\iint (y^2 - 1)\,dA = \tfrac13 - 1 = -\tfrac23}\). The field turns clockwise on average over this square, because its curl is negative wherever \({\abs{y} < 1}\).
A small square. At \({(1, 0.5)}\) the curl is \({0.25 - 1 = -0.75}\). For the square of side \(h\) centred there, bottom plus top gives \({-h \cdot h = -h^2}\) (the \(y\) in \(P\) rises by \(h\) across the square), and right plus left gives \({h\int y^2\,dy = h^2(0.25 + h^2/12)}\). Divided by \({h^2}\): \({-0.75 + h^2/12}\), which tends to the curl.
Code
The circulation of small squares from scratch, against the curl formula.
import numpy as npfrom scipy.integrate import quaddef circulation_of_square(F, a, b, h):"""Anticlockwise circulation of F = (P, Q) round the square of side h centred at (a, b).""" lo_x, hi_x, lo_y, hi_y = a - h /2, a + h /2, b - h /2, b + h /2 bottom = quad(lambda x: F(x, lo_y)[0], lo_x, hi_x)[0] right = quad(lambda y: F(hi_x, y)[1], lo_y, hi_y)[0] top =-quad(lambda x: F(x, hi_y)[0], lo_x, hi_x)[0] left =-quad(lambda y: F(lo_x, y)[1], lo_y, hi_y)[0]return bottom + right + top + leftcubic =lambda x, y: (x **3+ y, x * y **2)print("unit square:", round(circulation_of_square(cubic, 0.5, 0.5, 1.0), 6))for h in (1.0, 0.5, 0.1, 0.01):print(f"h = {h}: circulation / area = {circulation_of_square(cubic, 1.0, 0.5, h) / h **2:.6f}")print("curl at (1, 0.5):", 0.5**2-1)
unit square: -0.666667
h = 1.0: circulation / area = -0.666667
h = 0.5: circulation / area = -0.729167
h = 0.1: circulation / area = -0.749167
h = 0.01: circulation / area = -0.749992
curl at (1, 0.5): -0.75
Now the vortex \({(-y, x)/(x^2 + y^2)}\): its curl, by central differences, is 0 at every point we try, yet its circulation round the unit circle is \({2\pi}\), and round a circle that misses the origin it is 0.
vortex =lambda x, y: np.array([-y, x]) / (x **2+ y **2)def curl_numeric(F, x, y, d=1e-5): dQ_dx = (F(x + d, y)[1] - F(x - d, y)[1]) / (2* d) dP_dy = (F(x, y + d)[0] - F(x, y - d)[0]) / (2* d)return dQ_dx - dP_dypoints = [(1.0, 0.0), (0.3, -0.8), (-1.5, 2.0)]print("curl of the vortex:", [round(curl_numeric(vortex, *p), 6) for p in points])def circle_circulation(F, cx, cy, r): integrand =lambda t: np.dot(F(cx + r * np.cos(t), cy + r * np.sin(t)), [-r * np.sin(t), r * np.cos(t)])return quad(integrand, 0, 2* np.pi)[0]print("round the unit circle:", round(circle_circulation(vortex, 0, 0, 1), 6)," round a circle missing the origin:", round(circle_circulation(vortex, 1.0, 0.9, 0.6), 6))J = np.array([[0.0, -1.0], [1.0, 0.0]]) # Jacobian of the descent-ascent field of x yS, A = (J + J.T) /2, (J - J.T) /2print("symmetric part:", S.tolist(), " eigenvalues of J:", np.linalg.eigvals(J))
curl of the vortex: [np.float64(-0.0), np.float64(-0.0), np.float64(0.0)]
round the unit circle: 6.283185 round a circle missing the origin: -0.0
symmetric part: [[0.0, 0.0], [0.0, 0.0]] eigenvalues of J: [0.+1.j 0.-1.j]
The vortex is the gradient of the polar angle \({\theta}\) on any region that does not wind round the origin, which is why its curl vanishes. But \(\theta\) jumps by \({2\pi}\) once round the origin, so no single potential exists on the punctured plane.
Frontier note: curl in the training of games
In a GAN the generator descends and the discriminator ascends one objective, so the joint update field generally has an antisymmetric part. Balduzzi and colleagues (2018) decompose the Jacobian of a game’s field into its symmetric part, which gradient steps handle as in ordinary optimisation, and its antisymmetric part, which makes them cycle; their bilinear example is the descent-ascent field of this module, with a matrix in place of the number. Methods that damp the rotation, from extra regularisation to updates that use the antisymmetric part explicitly, are taken up in DL06.6.
Explore
This module’s interactive, the field explorer, lives in lesson M05.10.3. Choose the cubic field and drag the small square up and down: the circulation per area changes sign close to \({y = \pm 1}\), where the curl \({y^2 - 1}\) does, and closer still as you shrink the square. Then choose the mix and set its rotation slider to 0: the curl reads 0 and the arrows turn green, because the field is then a gradient.
Pitfalls
M05.10.4-F4
Wrong beside right. Zero curl makes the circulation 0 round loops that enclose no hole; round the hole at the origin the vortex still circulates \({2\pi}\).
“The curl is zero everywhere, so the field is a gradient.”
Only on a region without holes. The vortex has curl 0 wherever it is defined, yet circulation \({2\pi}\) round the unit circle. Green’s theorem does not apply to the unit disc here, because the field is undefined at its centre. Check the region before concluding.
“The arrows go round in circles, so the curl is non-zero.”
The vortex’s arrows circle the origin and its curl is 0 away from it: they shrink outwards at just the rate that cancels the turning. The shear \({(0, x)}\) has no arrow that turns and curl 1. Curl measures how the arrows change across a tiny wheel, not the shape of the flow lines.
“Green’s theorem works in either direction round the curve.”
The boundary is run anticlockwise, with the region on the left. Run it clockwise and the line integral changes sign while the double integral does not: the unit square would give \({+2/3}\) for the cubic field against an integral of \({-2/3}\).
Check yourself
Recall
1. Define the curl of \({\vect{F} = (P, Q)}\) and say what limit it is.
Show answer
\({\operatorname{curl}\vect{F} = \pd{Q}{x} - \pd{P}{y}}\): the anticlockwise circulation round a tiny square divided by its area.
2. State Green’s theorem.
Show answer
\({\oint_C P\,dx + Q\,dy} = {\iint_D (Q_x - P_y)\,dA}\), with \(C\) run anticlockwise round \(D\).
3. Why is the curl of a gradient zero?
Show answer
\({\operatorname{curl}\nabla f = f_{yx} - f_{xy}}\), which is 0 by Schwarz’s theorem when the second partial derivatives are continuous.
4. Give a field with zero curl that is not a gradient, and say why it escapes the converse.
Show answer
The vortex \({(-y, x)/(x^2 + y^2)}\) on the plane without the origin. Its circulation round the unit circle is \({2\pi}\); the region has a hole, so the converse, which needs a region without holes, does not apply.
5. Which part of the Jacobian carries the curl, and what does it do to a flow?
Show answer
The antisymmetric part \({\tfrac12(\mat{J} - \mat{J}\T)}\), equal to \({\tfrac{\operatorname{curl}}{2}}\) times the quarter-turn matrix. It rotates the flow; on its own it makes flow lines circle.
Exercises
1.★ Compute the curl of \({\vect{F} = (xy,\; y^2 - x^2)}\), the field of exercise 1 in lesson M05.10.3.
Show solution
\({\pd{Q}{x} = -2x}\) and \({\pd{P}{y} = x}\), so \({\operatorname{curl}\vect{F} = -3x}\): the field turns clockwise to the right of the \(y\)-axis and anticlockwise to its left.
2.★★ Use Green’s theorem with \({\vect{F} = \tfrac12(-y, x)}\) to show that the area inside any closed curve \(C\) is \({\tfrac12\oint_C (x\,dy - y\,dx)}\), and use it to find the area of the ellipse \({(a\cos t, b\sin t)}\).
Show solution
The curl is \({\tfrac12 - (-\tfrac12) = 1}\), so Green’s theorem gives \({\tfrac12\oint_C (x\,dy - y\,dx)} = {\iint_D 1\,dA}\), the area. On the ellipse \({dx = -a\sin t\,dt}\) and \({dy = b\cos t\,dt}\), so
The area is \({\tfrac12 \int_0^{2\pi} ab\,dt} = {\pi ab}\).
3.★★★ The damped game field \({\vect{F} = (-\varepsilon x - y,\; x - \varepsilon y)}\) of lesson M05.10.1 has \({\varepsilon > 0}\). Find its Jacobian, the symmetric and antisymmetric parts, its divergence and its curl. Then find its circulation round the unit circle in two ways.
The divergence is \({\operatorname{tr}\mat{J} = -2\varepsilon}\), a sink; the curl is \({1 - (-1) = 2}\). By Green, the circulation is \({2 \times \pi = 2\pi}\). Directly, on \({(\cos t, \sin t)}\) the field is \({(-\varepsilon\cos t - \sin t,\; \cos t - \varepsilon\sin t)}\), and its dot product with \({(-\sin t, \cos t)}\) is
\[
\begin{aligned}
&\varepsilon\cos t\sin t + \sin^2 t \\
&\quad + \cos^2 t - \varepsilon\sin t\cos t = 1 ,
\end{aligned}
\]
which integrates to \({2\pi}\). The damping changes the divergence, not the curl: the flow still turns, but it now also sinks to the centre.
Summary card
Curl is the circulation round a tiny square, per unit area: a paddle wheel’s spin.
Zero curl gives a gradient only on a region without holes (the vortex is the warning).
Curl lives in the antisymmetric part of \({\mat{J}_{\vect{F}}}\); on its own it makes flows circle.
Sources and next steps
Sources. Each was opened and checked against this lesson on 15 November 2026.
Gilbert Strang and Edwin Herman, Calculus Volume 3, Section 6.4 (OpenStax): Green’s theorem in circulation form (Theorem 6.12, Equation 6.13), proved for a rectangle, and the area formula \({\tfrac12\oint_C (-y\,dx + x\,dy)}\) (Equation 6.14) with the ellipse’s area \({\pi ab}\).
Gilbert Strang and Edwin Herman, Calculus Volume 3, Section 6.5 (OpenStax): the curl in space (Equation 6.17) and its plane version \({Q_x - P_y}\), the paddle-wheel reading, the curl of a conservative field is zero (Theorem 6.17), and the converse on simply connected domains (Theorem 6.18). Section 6.3 shows the vortex with the opposite sign on the plane without the origin, whose cross-partials agree although it is not conservative.
Denis Auroux, MIT 18.02SC, Session 65: Green’s theorem, course notes: Green’s theorem \({\oint_C M\,dx + N\,dy} = {\iint_R (N_x - M_y)\,dA}\) for a positively oriented simple closed curve, and \({N_x - M_y}\) named the two-dimensional curl.
David Balduzzi and five co-authors, The Mechanics of n-Player Differentiable Games, ICML 2018: the bilinear zero-sum game whose simultaneous gradient rotates round the equilibrium (Example 1), and the decomposition of a game’s Jacobian into symmetric and antisymmetric parts (Lemma 1).
Next. This lesson closes the course. Flows of vector fields return in M12.1, Ordinary differential equations and flows, and the circling of two-player training in DL06.6, GAN training dynamics.