Area From Coordinates: The Shoelace Formula
Imagine you have a polygon drawn on a graph — maybe an irregular pentagon whose vertices you know as coordinates. How do you find its area without splitting it into triangles and measuring each one? There is a neat, mechanical method called the shoelace formula (or the surveyor's formula).
The Intuition
Think of walking around the polygon in order, from vertex to vertex. At each step, you are going to compute a small signed area — the area of a trapezoid under the edge you just walked. If you walk clockwise, some of these trapezoids will have positive area and some negative. When you add them all up, the negatives cancel the parts outside the polygon, and you are left with exactly the area inside.
The name "shoelace" comes from the pattern of the multiplication: you cross-multiply coordinates like lacing a shoe.
The Precise Statement
For a polygon with vertices (x1,y1),(x2,y2),…,(xn,yn) listed in order (clockwise or anticlockwise), the area is:
Area=21∣∑i=1n(xiyi+1−xi+1yi)∣
where (xn+1,yn+1) is taken as (x1,y1) — you close the loop.
Area=21∣x1y2+x2y3+⋯+xny1−(y1x2+y2x3+⋯+ynx1)∣
The absolute value ensures the area is positive regardless of the direction you went around.
How It Works: A Simple Example
Take a triangle with vertices A(1,1), B(4,2), C(2,5). List them in order:
| i | xi | yi | xiyi+1 | xi+1yi |
|---|
| 1 | 1 | 1 | 1×2=2 | 4×1=4 |
| 2 | 4 | 2 | 4×5=20 | 2×2=4 |
| 3 | 2 | 5 | 2×1=2 | 1×5=5 |
Sum of xiyi+1: 2+20+2=24
Sum of xi+1yi: 4+4+5=13
Difference: 24−13=11
Area: 21×∣11∣=5.5 square units.
The vertices must be in order around the polygon. If you list them randomly, the formula gives nonsense. Always go around the shape — clockwise or anticlockwise — without skipping.
Why It Works (Briefly)
Each term xiyi+1−xi+1yi is twice the signed area of the triangle formed by the origin and the edge from (xi,yi) to (xi+1,yi+1). Summing these over all edges and taking half gives the total signed area of the polygon. The absolute value removes the sign.
When to Use It
- Any polygon with known coordinates — triangles, quadrilaterals, irregular shapes.
- In coordinate geometry problems where vertices are given and you need area quickly.
- In surveying, where land boundaries are marked by GPS coordinates.
The shoelace formula works for any simple polygon (non-self-intersecting). For self-intersecting polygons, the formula gives a "signed area" that may cancel overlapping regions — not the actual enclosed area.
A Quick Check
For a rectangle with vertices (0,0), (a,0), (a,b), (0,b):
Sum of xiyi+1: 0⋅0+a⋅b+a⋅b+0⋅0=2ab
Sum of xi+1yi: a⋅0+a⋅0+0⋅b+0⋅b=0
Difference: 2ab
Area: 21×2ab=ab — correct.
The formula is a compact, reliable tool. Once you see the cross-multiplication pattern, you will never need to split polygons into triangles again.