The shoelace formula
Tonight's idea
Walk round a polygon and write its corners in order: \((x_1, y_1), (x_2, y_2), \dots, (x_n, y_n)\). Stack them in a column and repeat the first corner at the bottom. Multiply along the diagonals, down-right and down-left, like a lace crossing a shoe. Add the down-right products, subtract the down-left, halve, and drop any minus sign:
\[\text{Area} = \tfrac12 \,\big|\, (x_1 y_2 - x_2 y_1) + (x_2 y_3 - x_3 y_2) + \cdots + (x_n y_1 - x_1 y_n) \,\big|.\]
Why does this work? Start with a triangle that has one corner at the origin \(O\): corners \(O\), \(A(a, b)\), \(B(c, d)\). Box it in a rectangle and cut away three right triangles. What is left has area \(\tfrac12(ad - bc)\) when \(B\) is anticlockwise from \(A\), and \(\tfrac12(bc - ad)\) when clockwise. (The stretch does the algebra.) Keep the sign; it is the whole trick.
Now take any polygon. Join every corner to the origin: a fan of triangles \(O P_1 P_2\), \(O P_2 P_3\), and so on, one per edge. Each contributes a signed area \(\tfrac12(x_i y_{i+1} - x_{i+1} y_i)\). Triangles that stick out beyond the polygon come with opposite signs and cancel; what survives is exactly the polygon. Their sum is the shoelace.
Watch one: a pentagon on the grid
Column of corners, first one repeated at the bottom. Down-right products: \(1 \cdot 1,\ 5 \cdot 4,\ 6 \cdot 6,\ 3 \cdot 3,\ 0 \cdot 1\), total \(66\). Down-left products: \(5 \cdot 1,\ 6 \cdot 1,\ 3 \cdot 4,\ 0 \cdot 6,\ 1 \cdot 3\), total \(26\).
\[\text{Area} = \tfrac12\,|66 - 26| = 20.\]
Check it against the grid: 16 points inside and 10 on the boundary, and Pick's theorem gives \(16 + 10/2 - 1 = 20\).
Click corners and watch the products line up: mathdetours.com/demos/polygon.html.
Your turn
- Use the shoelace on the triangle \((0,0), (4,0), (0,3)\). Check your answer with \(\tfrac12 \times \text{base} \times \text{height}\).
- Find the area of the triangle with corners \((1,2), (7,3), (4,8)\).
- The arrowhead \((0,0), (6,2), (0,4), (2,2)\) has a corner that points inwards. Find its area with the shoelace. Then check it another way: the big triangle \((0,0), (6,2), (0,4)\) minus the notch \((0,0), (2,2), (0,4)\).
- Take the three points \((1,1), (4,3), (k, 7)\). (a) Run the shoelace and show the area is \(|10 - k|\). (b) For which \(k\) is the area zero, and what does that tell you about the three points? (c) Find the area when \(k = 4\) and when \(k = 16\), and explain in a picture why they match.
Stretch: the triangle at the origin
Take \(O(0,0)\), \(A(a, b)\), \(B(c, d)\) with \(0 \lt c \lt a\) and \(0 \lt b \lt d\). Draw the \(a \times d\) rectangle with corner \(O\). The triangle is that rectangle minus three right triangles. Write down their areas, subtract, and simplify to \(\tfrac12(ad - bc)\).
Answers
- Down-right: \(0 \cdot 0 + 4 \cdot 3 + 0 \cdot 0 = 12\). Down-left: \(4 \cdot 0 + 0 \cdot 0 + 0 \cdot 3 = 0\). Area \(\tfrac12 \cdot 12 = 6\), and \(\tfrac12 \cdot 4 \cdot 3 = 6\).
- Down-right: \(1 \cdot 3 + 7 \cdot 8 + 4 \cdot 2 = 67\). Down-left: \(7 \cdot 2 + 4 \cdot 3 + 1 \cdot 8 = 34\). Area \(\tfrac12 \cdot 33 = 16.5\).
- Down-right: \(0 + 24 + 0 + 0 = 24\). Down-left: \(0 + 0 + 8 + 0 = 8\). Area \(\tfrac12 \cdot 16 = 8\). Check: the big triangle \((0,0),(6,2),(0,4)\) has area 12, and the notch \((0,0),(2,2),(0,4)\) has area 4, so \(12 - 4 = 8\). The formula handles the inward corner without being told.
- (a) Terms: \(1 \cdot 3 - 4 \cdot 1 = -1\), \(4 \cdot 7 - 3k = 28 - 3k\), \(k \cdot 1 - 1 \cdot 7 = k - 7\). Sum \(20 - 2k\), area \(\tfrac12|20 - 2k| = |10 - k|\). (b) \(k = 10\): zero area means the three points lie on one line (slope \(\tfrac23\) from \((1,1)\) through \((4,3)\) to \((10,7)\)). (c) Both give 6. The line through \((1,1)\) and \((4,3)\) crosses \(y = 7\) at \((10,7)\), and \((4,7)\) and \((16,7)\) sit six units either side of it on that horizontal line. Equal offsets from the line mean equal heights over the same base.
Stretch. The rectangle has area \(ad\). Cut off the triangle under \(OA\), area \(\tfrac12 ab\); the triangle left of \(OB\), area \(\tfrac12 cd\); and the triangle in the top-right corner with legs \(a - c\) and \(d - b\), area \(\tfrac12(a - c)(d - b) = \tfrac12(ad - ab - cd + bc)\). Then \(ad - \tfrac12 ab - \tfrac12 cd - \tfrac12 ad + \tfrac12 ab + \tfrac12 cd - \tfrac12 bc = \tfrac12(ad - bc)\).