Shoelace formula
An algorithm that computes the area of a polygon from the coordinates of its vertices, using a cross-multiplication and subtraction procedure.
- Year
- 1800
- Section
- Mathematics
History
The shoelace formula, also known as Gauss's area formula or the surveyor's formula, gives the area of a polygon without drawing it or splitting it into simpler shapes. All that is needed are the coordinates of its vertices on a Cartesian plane, meaning the pairs of numbers that locate each corner, and a sum of cross-products. Its practical value is clear: it is used in surveying and forestry, where irregular land must be measured from points fixed on the ground.
Before this formula, areas of polygons were typically found by splitting them into triangles, rectangles and trapezoids, a laborious task when a shape had many sides. Methods based on trapezoids and triangles already existed, and the idea that area could be read from coordinates belonged to the tradition of analytic geometry. The name of Carl Friedrich Gauss is attached to it because Gauss, together with C. G. J. Jacobi, described the trapezoid method on which the formula rests. The formulation most often credited as the first full description is that of Albrecht Ludwig Friedrich Meister, published in 1769, although the exact history of its attribution is debated and 1800 is only an approximate date for its wider recognition.
The central idea is simple. For each side of the polygon, the x coordinate of one vertex is multiplied by the y coordinate of the next, and the opposite product is subtracted. Adding these results for every side and taking half of the absolute value gives the area. Each term corresponds to a triangle with a vertex at the origin, and the signs make the outside regions cancel out. Walking the vertices counterclockwise gives a positive result, clockwise a negative one, so the absolute value ensures a correct answer either way.
For hand calculation, the coordinates are written in two columns, the first vertex is repeated at the end, and products are taken along the diagonals. The lines drawn between the numbers resemble the crossing of a shoelace, which explains the name. The layout makes the operation easier to remember and reduces mistakes.
Today the formula is a basic tool of computational geometry. Computer-aided design software, geographic information systems and video game engines use it to compute surfaces quickly and to check whether a list of vertices runs clockwise or counterclockwise. It can also be applied to self-overlapping polygons, provided the meaning of area is interpreted carefully. Its continued use shows how a simple procedure from eighteenth-century analytic geometry remains useful more than two centuries later.
Timeline
- 1769Albrecht Ludwig Friedrich Meister describes the basis of the polygon area formula.
- 1800Approximate year in which the formula becomes associated with Gauss's name and spreads in geometry.
Trivia and anecdotes
Origin of the name
It is called the shoelace formula because the cross-multiplications, drawn over the coordinate table, look like the threading of a shoelace.
Self-crossing polygons
The formula can also be applied to polygons that cross themselves, and it can show that the area does not depend on how the figure is interpreted.