Visual walkthrough — Green's theorem — proof sketch, both forms
Step 0 — What are the objects on the two sides?
WHAT. Green's theorem is an equation with a loop-thing on the left and an area-thing on the right:
Let us name every piece before we ever use it.

In the picture: the blue arrows are the field , the green patch is , and the yellow loop is with an arrow showing which way we walk. Keep the region on your left — that is the counterclockwise, "positive" direction.
Step 1 — Split the theorem into two easier halves
WHAT. We will not attack both and at once. We split:
WHY. Adding and rebuilds the full theorem, because is exactly the integrand . Each half only involves one of the two field-components, so each is a one-variable problem in disguise.

Left panel: only horizontal steps () matter, so we shade the top and bottom edges. Right panel: only vertical steps () matter, so we shade the left and right edges.
Step 2 — Prove : set up a "Type I" region
WHAT. A Type I region is one shaped so that for every between and , the patch runs vertically from a bottom curve up to a top curve :
WHY. With this shape the inside is a stack of vertical strips. Each strip is a clean interval in , so we can do the -integral first and finish it with the Fundamental Theorem of Calculus.

- are the leftmost and rightmost -values (the vertical dashed walls).
- (green, lower) and (yellow, upper) are the curves the boundary rides along.
- One red vertical strip shows a single fixed : the inner integral runs up this strip.
Step 3 — Collapse the inside with the Fundamental Theorem of Calculus
WHAT. Compute the right-hand side of , inner integral first:
The inner integrand is a derivative in , and we are integrating in — a derivative and an integral of the same variable undo each other. That is the Fundamental Theorem of Calculus:
WHY this tool and no other. We engineered a perfect derivative inside so that FTC can evaporate the whole -integral, leaving only boundary values at the top and bottom curves. That is the entire secret of Green's theorem: an inside-derivative turns into edge-values.
Putting the minus sign back: -\iint_D \frac{\partial P}{\partial y}\,dA = \int_a^b\Big[\,\underbrace{P(x,g_1(x))}_{\text{bottom}} - \underbrace{P(x,g_2(x))}_{\text{top}}\,\Big]\,dx. \tag{RHS}

The picture: along one red strip, the tall stack of little changes in adds up to just (top value) − (bottom value) — the two dots at the ends of the strip. The middle telescopes away.
Step 4 — Walk the boundary for the left-hand side of
WHAT. Now compute the left side, . Split the fence into four pieces: bottom , right wall , top , left wall — walked counterclockwise (region on the left).
WHY the walls vanish. On a vertical wall, never changes, so . Since the integrand carries a factor , the walls contribute nothing:
So only the bottom and top survive:
The top curve is walked right to left (that is what counterclockwise demands), so its limits run from down to . Flipping the limits flips the sign:
Therefore \oint_C P\,dx = \int_a^b\Big[\,P(x,g_1(x)) - P(x,g_2(x))\,\Big]\,dx. \tag{LHS}

Follow the yellow arrows: rightward across the bottom, up the right wall (no ), leftward across the top, down the left wall (no ). (LHS) is identical to (RHS) from Step 3 — so is proved. ✅
Step 5 — Prove by the mirror argument
WHAT. For we flip the roles of and . A Type II region is a stack of horizontal strips:
WHY. Now only sees vertical motion, so this time the horizontal top/bottom edges vanish () and the left/right curves carry everything. Integrate first in , hit it with FTC, and match the boundary pieces — exactly Steps 3–4 with and swapped. Result: \oint_C Q\,dy = +\iint_D \frac{\partial Q}{\partial x}\,dA. \tag{$\star\star$}

Everything is the same story reflected across the diagonal line : horizontal strips, left curve , right curve . Adding gives the full theorem for any region that is both Type I and Type II.
Step 6 — General regions: interior cuts cancel
WHAT. Many regions are neither a clean vertical stack nor a clean horizontal stack (think of a bent "L" or an annulus). We chop such a region into sub-pieces that are Type I and Type II, prove the theorem on each, and add.
WHY it still works. Each internal cut is shared by two neighbouring pieces. Piece A walks that cut one way; piece B walks the same cut the opposite way (each keeps its own region on the left). The two line integrals along that cut are equal and opposite, so they cancel. Only the outer fence survives.

The red internal cut is traversed up by the left piece and down by the right piece — their contributions annihilate. The double integrals just add (areas don't overlap), so the sum over pieces = the double integral over the whole region, bounded by the surviving outer loop.
Step 7 — Get the flux form for free
WHAT. We already have the circulation form. The flux / divergence form costs no new work. Along the boundary, walk with unit tangent (an arrow of length 1 pointing the way you walk). Rotate it clockwise by to get the outward unit normal:
WHY that rotation points outward. With the region on your left, "outward" is clockwise from "forward." Then
Now apply the circulation form to the rotated field : The left side is exactly . So

Blue tangent points along the fence; rotate it clockwise to get the red outward normal . Circulation counts spin along the fence; flux counts flow through it — same theorem, one is the other rotated. This is the 2D face of the Divergence Theorem and both are shadows of Stokes' Theorem; the whole family generalises the curl/divergence bookkeeping.
The one-picture summary

The single diagram compresses all seven steps: an inside-derivative (, the curl) telescopes strip-by-strip into edge-values (FTC), the vertical/horizontal walls drop out, interior cuts cancel, and only the boundary walk remains — the edge remembers the whole inside.
Recall Feynman retelling of the whole walkthrough
We wanted to prove: walking the fence = adding up the spin inside. First we split the job into a sideways part () and an up-down part (), because a sideways walk only feels horizontal steps and an up-down walk only feels vertical steps. For the sideways part we sliced the region into thin vertical straws; inside each straw a pile of tiny changes collapses to just (top minus bottom) — that is the Fundamental Theorem of Calculus, the same magic that undoes a derivative with an integral. The vertical walls of the fence gave nothing because you don't move sideways along them. Adding all the straw-tops and straw-bottoms is the same as walking the fence. The up-down part is the identical trick turned on its side. For weird shapes we cut them into nice pieces; every cut gets walked twice in opposite directions and cancels, so only the outer fence is left. Finally, by turning each little walking-arrow a quarter-turn to point outward, the "spin along the fence" statement becomes the "flow out through the fence" statement — the same truth, rotated. The edge always knows what's happening inside.
Recall
Why can we do the inner -integral in closed form on a Type I region? ::: The integrand is a perfect derivative in , so FTC gives top-value minus bottom-value. Why do the vertical walls contribute nothing to ? ::: On a vertical wall is constant, so . Why does the top curve get flipped integration limits? ::: Counterclockwise walks the top right-to-left, so runs from to ; flipping to adds a minus sign. Why do interior cuts cancel when gluing pieces? ::: Each cut is walked in opposite directions by its two neighbouring pieces, so the two line integrals are equal and opposite. How is the outward normal built from the tangent? ::: Rotate the unit tangent clockwise by : .