Analysis

An area measured by walking round it

A surveyor's instrument from 1854 measures the area of any shape on a map by having its pointer steered once round the boundary; a small wheel rolls and slides, and its reading, times the length of one arm, is the area. Nothing touches the inside. The reason is that area can be written as an integral over the boundary — Green's theorem — and the instrument is that integral built in brass. Walk a curve that crosses itself and the same integral counts some regions twice.

Worth reading first: A rectangle cut by a curve · Area is the undoing of slope.

In 1854 Jakob Amsler, a Swiss mathematician turned instrument maker, built a device that engineers and surveyors used for the next hundred years. It has two arms hinged together. One end is pinned to the table; the other end carries a pointer. A small wheel is mounted on the pointer’s arm with its axle along the arm, so that it rolls when the arm moves sideways and slides when the arm moves along its own length.

To measure the area of a region drawn on a map, the pointer is guided once round the boundary and brought back to its starting point. The wheel’s reading, multiplied by the length of the pointer arm, is the area. The instrument never visits the inside of the region. It does not know the inside exists.

A planimeter's wheel measures an area by going round it. Polar planimeter with arms 2.3 and 2 traced round a closed curve; wheel roll 1.6478, times 2, equals the area 3.2955.
Fig. 1 Amsler’s planimeter: an arm of length 2.3 pivots on a fixed pole, a second arm of length 2 hangs from its elbow, and the far end is guided once round the curve. A wheel on the second arm rolls only by the motion across the arm. After one circuit the wheel has rolled 1.6478, and 2 × 1.6478 = 3.2955, the area enclosed.

The simulation in the figure steers the pointer round a wavy closed curve in four thousand small steps, computes where the elbow must be at each step, and adds up the component of each step perpendicular to the pointer arm — which is what the wheel records. The total, times the arm length, agrees with the area to four decimal places. The reason it must agree is the subject of this essay: area can be computed from the boundary alone, and the planimeter is that computation made of brass.

Strips counted up and down

Area is the undoing of slope computed area under a graph as an integral. A closed curve is not a graph, but it can be cut into strips another way.

An area read from its boundary: strips counted up and down. A closed curve with horizontal strips from the axis to each boundary crossing, positive where the curve rises and negative where it falls; ∮ x dy = 3.2955 against 3.2938 by counting cells.
Fig. 2 A closed curve walked anticlockwise. At each height, where the curve rises a strip is drawn from the vertical axis out to it and counted positive (blue); where it falls, the strip is counted negative (red). What survives is the region inside. Summing x dy round the whole boundary gives 3.2955; counting the grid cells that lie inside gives 3.2938.

Walk the curve anticlockwise. At every point, the curve is moving up or down at some rate dydy, and its distance from the vertical axis is xx. Form x dyx\,dy — the area of a thin horizontal strip reaching from the axis out to the curve — and add these up all the way round:

A=∮x dy.A = \oint x\, dy.

On the right side of the curve, walking anticlockwise means walking up, so dy>0dy > 0 and the strips count positive. On the left side the walk goes down, dy<0dy < 0, and the strips count negative. At each height, the positive strip reaches out to the right side and the negative one reaches out to the left side; their difference is exactly the chord of the region at that height. The region outside the curve but between it and the axis is covered once positively and once negatively, and cancels.

That is Green’s theorem in its simplest instance. The figure checks it two ways: the sum of x dyx\,dy over fourteen hundred boundary steps against a count of the grid cells that lie inside, found by asking of each cell whether the curve winds round it. They agree to within the grid’s own resolution. The same cancellation works with vertical strips, −∮y dx-\oint y\,dx, and the average of the two,

A=12∮(x dy−y dx),A = \tfrac12 \oint (x\,dy - y\,dx),

is the form that does not favour either axis.

The shoelace formula is the same thing with straight sides

When the boundary is a polygon, the integral becomes a finite sum, and it is the formula surveyors have used since the eighteenth century.

The shoelace formula as triangles from one point, counted with signs. Signed triangles from the origin to each edge of a heptagon: −0.245, 1.725, 2.265, −0.475, 1.615, −0.195, −0.630; total 4.060.
Fig. 3 A seven-sided polygon walked anticlockwise, and the triangle from the origin to each edge. Triangles whose edge is walked anticlockwise as seen from the origin count positive (blue); the four walked clockwise count negative (red). The signed areas add to 4.060 — the shoelace formula — matching 4.059 from counting cells.

For an edge from (x1,y1)(x_1, y_1) to (x2,y2)(x_2, y_2), the integral 12∫(x dy−y dx)\tfrac12\int (x\,dy - y\,dx) along the edge is 12(x1y2−x2y1)\tfrac12(x_1 y_2 - x_2 y_1) — the signed area of the triangle formed by the origin and the edge. Sum over the edges:

A=12∑i(xi yi+1−xi+1 yi).A = \tfrac12 \sum_{i} (x_i\, y_{i+1} - x_{i+1}\, y_i).

Written out in two columns and cross-multiplied, it looks like the lacing of a shoe, and it goes by that name; Albrecht Ludwig Friedrich Meister published it in 1769 and Gauss used it in 1795. The figure shows what it is doing. The origin is outside the polygon, so some of the triangles cover ground outside it; those are exactly the ones whose edges are walked clockwise as seen from the origin, and they count negative. Everything outside the polygon is covered by as many positive triangles as negative ones and cancels. Four of the seven triangles here are negative, and the total still comes out at the area.

No triangulation of the polygon is needed, and no inside is ever identified. The sum is taken over the edges in order, and the orientation does the bookkeeping.

Why it works: slope undone once more

Why should an integral round the edge know about the inside? The answer is the fundamental theorem of calculus, applied along one direction at a time.

Take a thin horizontal strip of the region, from its left edge at x=ax = a to its right edge at x=bx = b. Its area is (b−a) dy(b - a)\,dy. Now think of b−ab - a as ∫ab1 dx\int_a^b 1\,dx — the integral of the derivative of xx with respect to xx — and the fundamental theorem says that integral is the difference of xx at the two ends. The two ends are exactly where the boundary crosses the strip: once going up, contributing b dyb\,dy, and once going down, contributing −a dy-a\,dy. Adding up x dyx\,dy over the boundary is adding up the differences of the endpoints over every strip, and the fundamental theorem converts each difference into the strip’s length.

George Green’s version of 1828 says more generally that for any smooth functions PP and QQ,

∮(P dx+Q dy)=∬(∂Q∂x−∂P∂y)dA,\oint (P\,dx + Q\,dy) = \iint \left(\frac{\partial Q}{\partial x} - \frac{\partial P}{\partial y}\right) dA,

and area is the special case in which the integrand on the right is 11. A rectangle cut by a curve found the product rule hiding in a rectangle; Green’s theorem is the same kind of fact, the fundamental theorem made two-dimensional, with a boundary in place of two endpoints.

A curve that goes round twice

The formula has a feature that the instrument shares: it does not measure the region enclosed. It measures something that coincides with the region enclosed when the curve is simple.

A curve that goes round twice counts its inner loop twice. Limaçon r = 0.45 + 1cos θ with regions shaded by winding number; boundary integral 2.2070, cells 2.2048.
Fig. 4 A limaçon, r = 0.45 + cos θ, walked once as θ runs round. Its inner loop is circled twice, so every point there has winding number 2 (blue) and every point of the outer crescent winding number 1. The boundary formula gives 2.2070=π(b2+a2/2)2.2070 = \pi(b^2 + a^2/2); the cells give 1.860 + 2 × 0.172 = 2.205.

The limaçon r=0.45+cos⁡θr = 0.45 + \cos\theta crosses itself, and as θ\theta runs from 00 to 2π2\pi its small inner loop is traced inside the large one, in the same direction. A point inside the small loop is circled twice: its winding number is 22. The boundary integral counts it twice.

In polar form the boundary integral is 12∫r2 dθ\tfrac12\int r^2\,d\theta, and for this limaçon it comes to π(b2+a2/2)=2.2070\pi(b^2 + a^2/2) = 2.2070. The grid, counting each cell once for each time the curve winds round it, gives the crescent’s area plus twice the inner loop’s — agreeing within its resolution. The honest statement of Green’s theorem for area is therefore

12∮(x dy−y dx)=∬w(x,y) dA,\tfrac12 \oint (x\,dy - y\,dx) = \iint w(x, y)\,dA,

where ww is the winding number of the curve round the point (x,y)(x, y). For a simple closed curve walked anticlockwise, ww is 11 inside and 00 outside, and the right side is the area. The winding number is the integer a loop that cannot miss the middle used to prove the fundamental theorem of algebra, and here it appears as the weight each point receives from the boundary.

A planimeter steered round a figure-eight reports the difference of the two lobes, since one is circled anticlockwise and the other clockwise. The instrument measures winding, not enclosure, and on a simple curve the two are the same.

How the planimeter implements the integral

The pointer arm of length LL moves in two ways at once: it translates, and it turns. In a small motion, the region it sweeps out has area LL times the sideways component of its displacement — which is what the wheel records — plus a sector term, 12L2 dφ\tfrac12 L^2\,d\varphi, from its rotation through a small angle dφd\varphi.

Around a complete circuit, with the pole outside the region, the arm returns to its starting angle without having turned all the way round, so the sector terms add to nothing. The elbow moves back and forth along an arc of the circle about the pole, sweeping nothing net. What remains is that the total area swept by the pointer arm equals LL times the wheel’s total roll — and the area swept by the arm, counted with sign, is the area enclosed by the pointer’s path minus the area enclosed by the elbow’s path, which is nothing.

With the pole placed inside the region, the arms go all the way round, the sector terms add up to a constant, and the reading must be corrected by a fixed amount marked on the instrument. Amsler’s manuals give that constant for each instrument. The simulation keeps the pole outside, where no correction is needed, and checks the result to within four parts in ten thousand.

Each term is a determinant

The term x1y2−x2y1x_1 y_2 - x_2 y_1 in the shoelace formula is the determinant of the two-by-two array with columns (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2), and the number that says how much room is left read a determinant as the signed area of the parallelogram its columns span. Half of that parallelogram is the triangle from the origin to the edge. So the shoelace formula says: the area of a polygon is the sum of the signed areas of the triangles its edges make with any fixed point — and the sign is the determinant’s sign, which is the orientation in which the edge is seen.

That also explains why the answer does not depend on where the fixed point is. Moving the point by a vector vv changes each triangle’s signed area by a term linear in vv, and those changes add, round the closed polygon, to vv crossed with the sum of the edge vectors — which is nothing, because the edges of a closed polygon add up to zero. The origin in the figure is outside the polygon, and could as well have been anywhere; the positive and negative triangles would rearrange, and their total would not move.

Flip the direction of travel and every determinant changes sign, so the formula returns minus the area. Orientation is a sign made that sign the definition of a sense of turning; here it is the sign of an area, and it is why a planimeter run clockwise reads backwards.

A few hundred points are enough

Because the boundary determines the area, a boundary known only at finitely many points determines it approximately — and the approximation is good.

An area from a few hundred boundary points. Shoelace error against number of boundary points: ellipse 2.3e+0, 6.3e-1, 1.6e-1, 4.0e-2, 1.0e-2, 2.5e-3, 6.3e-4, 1.6e-4, 3.9e-5; wavy curve 1.3e+0, 5.5e-1, 1.7e-1, 4.4e-2, 1.1e-2, 2.8e-3, 7.0e-4, 1.8e-4, 4.4e-5.
Fig. 5 The area of a closed curve estimated from n points of its boundary alone — the shoelace sum of the polygon through them — against n, on logarithmic scales. The error for the ellipse with semi-axes 2 and 1 falls like 1/n21/n^2, a factor of four for each doubling; the wavy curve’s error falls at the same rate with a larger constant.

Joining nn points of a smooth curve by straight segments cuts off a thin sliver at each segment, of area proportional to the curvature times the cube of the segment length. There are nn segments of length about 1/n1/n, so the total error is about n⋅n−3=n−2n \cdot n^{-3} = n^{-2}. The figure confirms it: each doubling of the number of points quarters the error, for the ellipse and for the wavy curve alike, the wavy curve paying a larger constant for its sharper bends. At a thousand points the error is about four hundred-thousandths.

That is why surveyors could measure fields with a chain and a compass. Area by counting dots found another boundary formula for polygons with corners on a lattice, Pick’s theorem, which counts points rather than integrating; the shoelace formula needs no lattice and gives the exact area of any polygon from its corners.

A planimeter made from a hatchet

Amsler’s instrument has a wheel, a pole and a hinge. In 1875 the Danish cavalry officer Holger Prytz described a planimeter with none of them: a single rigid bar, bent at one end into a pointer and at the other into a sharpened edge like a hatchet blade. The pointer is placed at a point inside the region, run out along a straight line to the boundary, round the boundary once, and back along the same line; the blade, dragged along behind, can move only in the direction the bar points, and it ends up displaced sideways from where it started.

The area is approximately the bar’s length times that sideways displacement. The approximation is good when the bar is long compared with the region and the starting point is near the region’s centre, and the reason is the same boundary integral: the blade’s rotation integrates a quantity along the pointer’s path, and for a long bar that quantity is, to first order, the area enclosed. The hatchet planimeter is less accurate than Amsler’s — its error is of the order of the square of the region’s size divided by the bar length — but it needs no moving parts at all, and it was made and sold for decades as the cheap alternative.

Both instruments share the essential feature. Adding up rectangles needs the inside, cut finer and finer; these need only a path round the edge, followed once.

The integral that Kepler’s law is

The polar form of the boundary integral has a famous physical reading. For a curve described by its distance rr from a fixed point as a function of the angle θ\theta, the area swept by the line from the point to the curve, as θ\theta advances by dθd\theta, is 12r2 dθ\tfrac12 r^2\,d\theta.

Johannes Kepler’s second law of 1609 says that a planet’s line to the Sun sweeps equal areas in equal times. In the language of this essay, the integrand 12r2 dθ/dt\tfrac12 r^2\,d\theta/dt is constant — which is the statement that the planet’s angular momentum about the Sun is conserved. The law is a claim about the rate at which a boundary integral accumulates, and it holds for any force directed towards a single point, not only gravity.

The same integral also underlies the most area a fence can hold: the isoperimetric inequality compares the area, written as a boundary integral, with the length of the same boundary, and the classical proofs by Fourier series — Hurwitz’s of 1902 — work entirely on the boundary, never touching the inside.

What the figures can and cannot show

Every area is computed twice, by methods that share nothing. The boundary sums use only the curve’s points in order; the grid counts use only whether each cell is wound round, and how often. Their agreement, to the grid’s resolution in every figure, is evidence for the theorem; the argument by strips and the fundamental theorem is the proof.

The planimeter is simulated, not built. Its geometry — the elbow found as the intersection of two circles, the wheel reading as the perpendicular component of each step — is exact, and a real instrument adds friction, a wheel that occasionally slips, and a finite resolution on its dial. Amsler’s instruments were accurate to about a part in a thousand in practiced hands.

Only curves smooth enough to have a length. Green’s theorem needs the boundary to be rectifiable; for a fractal boundary like the Koch snowflake, the area is finite but the boundary integral is not defined in the ordinary sense, and extending the theorem to such curves is a subject of its own.

Still open: which few pictures determine a shape

The boundary determines the area, and a few hundred points of it determine the area to four places. A sharper question asks how little information determines the region itself, not merely its size. Geometric tomography asks it with X-rays: for each line in a chosen family, the length of the chord the region cuts from it. A parallel X-ray records the chords along every line in one direction; a point X-ray records the chords along every line through one point, as a source in a hospital scanner does.

Preston Hammer asked in 1961 how many X-rays are needed to determine a convex region uniquely. For parallel X-rays the question has sharp answers: Richard Gardner and Peter McMullen showed in 1980 that no three directions ever suffice, and identified sets of four that do. For point X-rays, Aljoša Volčič showed that four sources in general position suffice for convex plane regions. Whether three sources not on one line always suffice has, as far as the published record goes, not been settled, and neither has the question of how stable any of these reconstructions is when the measurements carry a small error — which is the question a scanner actually faces.

The inside was on the boundary all along

The habit worth keeping is to ask whether a quantity defined by a region can be read from its edge.

Area looks like a property of the inside: count the squares, fill it with rectangles, integrate over it. Green’s theorem says the inside is already encoded in the boundary, because the fundamental theorem converts each strip’s length into the difference of its two ends, and the ends are on the edge. An instrument that only traces the outline can therefore measure the area, and it measures it exactly — counting each point as many times as the outline goes round it.

What links here

Computed from the collection, not written here: the essays that point at this one.

Shares its objects with

Essays that name at least two of the same things, and that neither author linked.

Named objects

A dashed tag is an object no other essay names yet.

AreaDeterminantFundamental theoremGreens theoremIntegralLine integralOrientationWinding number