Mathwords logoMathwords

Shoelace Formula — Definition, Formula & Examples

The Shoelace Formula calculates the area of any simple polygon when you know the coordinates of its vertices. You multiply pairs of coordinates in a crisscross pattern — resembling the lacing of a shoe — then take half the absolute value of their difference.

Given a simple polygon with nn vertices (x1,y1),(x2,y2),,(xn,yn)(x_1, y_1), (x_2, y_2), \ldots, (x_n, y_n) listed in order (with (xn+1,yn+1)=(x1,y1)(x_{n+1}, y_{n+1}) = (x_1, y_1)), the signed area is 12i=1n(xiyi+1xi+1yi)\frac{1}{2}\sum_{i=1}^{n}(x_i y_{i+1} - x_{i+1} y_i), and the area equals the absolute value of this quantity.

Key Formula

A=12i=1n(xiyi+1xi+1yi)A = \frac{1}{2}\left|\sum_{i=1}^{n}(x_i\, y_{i+1} - x_{i+1}\, y_i)\right|
Where:
  • AA = Area of the polygon
  • (xi,yi)(x_i, y_i) = Coordinates of the $i$-th vertex
  • nn = Number of vertices, with $(x_{n+1}, y_{n+1}) = (x_1, y_1)$

How It Works

List the polygon's vertices in order, either clockwise or counterclockwise. For each consecutive pair of vertices, compute xiyi+1xi+1yix_i y_{i+1} - x_{i+1} y_i. After the last vertex, wrap back to the first. Sum all these cross products, take the absolute value, and divide by 2. The formula works for any simple (non-self-intersecting) polygon, whether convex or concave.

Worked Example

Problem: Find the area of the triangle with vertices (1, 2), (4, 6), and (7, 1).
Step 1: Compute each cross product using consecutive vertex pairs:
x1y2x2y1=1(6)4(2)=2x_1 y_2 - x_2 y_1 = 1(6) - 4(2) = -2
Step 2: Continue with the next pair:
x2y3x3y2=4(1)7(6)=38x_2 y_3 - x_3 y_2 = 4(1) - 7(6) = -38
Step 3: Wrap back to the first vertex:
x3y1x1y3=7(2)1(1)=13x_3 y_1 - x_1 y_3 = 7(2) - 1(1) = 13
Step 4: Sum the results, take the absolute value, and divide by 2:
A=122+(38)+13=1227=13.5A = \frac{1}{2}|{-2} + ({-38}) + 13| = \frac{1}{2}|{-27}| = 13.5
Answer: The area of the triangle is 13.5 square units.

Why It Matters

The Shoelace Formula appears frequently in coordinate geometry problems on the SAT, AMC, and other math competitions. It is also used in computer graphics and GIS software to compute areas of irregular shapes defined by GPS coordinates.

Common Mistakes

Mistake: Forgetting to wrap the last vertex back to the first vertex.
Correction: Always include the term xny1x1ynx_n y_1 - x_1 y_n to close the polygon. Omitting it gives an incorrect area.