Coordinate Area Formulas Advanced. This lesson goes beyond core Geometry. You can skip it.
Progress can't be saved in this browser, so this lesson's status can't be set.
Watch the video explainer
Learning goals
- Explain how signed edge contributions produce the area of a simple polygon
- Calculate exact areas from ordered vertices with the shoelace formula
- Predict the effect of changing the starting vertex or reversing the traversal
- Identify when a crossing makes a vertex order unsuitable for measuring area
Follow the boundary
A simple polygon has a closed boundary made of straight edges, with edges meeting only at the shared endpoints of consecutive edges. It can be concave, with a corner that points inward. A lattice polygon has integer coordinates at every vertex.
Use the usual axes, with positive to the right and positive up. As you follow a simple boundary counterclockwise, the interior is locally on your left. Follow it clockwise and the interior is locally on your right. The signed area will be positive for a counterclockwise walk and negative for a clockwise walk.
Give each directed edge a signed contribution
Draw a horizontal reference line below all the vertices. An edge and the vertical drops from its endpoints enclose a trapezoid down to that line. Give that trapezoid positive area for a leftward edge and negative area for a rightward edge. A vertical edge has zero contribution because its horizontal width is zero.
Worked example 1 Sign a single trapezoid
Problem. The directed edge goes from to . Use the reference line to find its signed trapezoid contribution. Find the contribution of the reverse edge as well.
Solution. For , the width is 4 units. The two heights above the line are 5 and 2 units. This direction is leftward, so the contribution is positive.
For , the same trapezoid has a negative sign because the edge goes rightward.
Check your understanding
An edge moves right by 3 units. Its endpoints are 2 and 6 units above the reference line. What is its signed trapezoid contribution?
A rightward edge contributes negatively. Multiply the width 3 by the average of the two heights, which is 4, and attach the negative sign.
Why the directed trapezoids give signed area#
Cut the plane into vertical strips at the distinct vertex -coordinates. Within the open part of a strip, the straight boundary segments crossing it stay in the same top-to-bottom order because they never meet there. At a vertical line inside the strip, each entry into the polygon is followed by an exit. Thus the region in that strip consists of pieces with paired upper and lower edges. A piece can taper to a point at a strip endpoint. The strips and their interior pieces are finite in number.
For a counterclockwise boundary, an upper edge of a piece has interior below it, so the edge moves left. A lower edge has interior above it, so the edge moves right. The portion of the upper trapezoid in this strip is added and the portion of the lower trapezoid is subtracted. Both reach the same reference line. Their difference is exactly the area between the two edges. If a strip contains two or more pieces, each upper and lower pair contributes its own area.
Every edge trapezoid is accounted for by its portions in these strips. Vertical cut lines have no area. Therefore the signed contributions add to the polygon’s area. In a clockwise walk, all the edge signs switch and the result is the negative of the area.
Turn the trapezoid sum into the shoelace formula
Why only the cross-products remain#
In Example 1, twice the signed contribution is the signed width times the sum of the heights.
Expanding and grouping the four products gives a cross-product difference and an endpoint difference .
Adding the two differences gives twice the signed contribution.
The second group contains the starting endpoint product and the negative ending endpoint product . On the next edge, becomes the starting point, so that edge supplies .
Write for each of the vertices in boundary order. To include the last edge, use . Let be the height of above the reference line.
The signed width is positive on a leftward edge. Multiplying it by the average of the two heights gives the contribution .
After expansion, the four products can be grouped into a cross-product difference and an endpoint difference .
Around a whole polygon, each endpoint product in occurs once with a plus sign on the outgoing edge and once with a minus sign on the incoming edge. They cancel, including the first vertex because the boundary closes.
Now express using the original coordinates. Substituting the heights gives
The terms involving combine to times the horizontal change .
The changes add to zero because the walk ends where it began. That leaves just the cross-products in the original coordinates.
Write the vertices in two columns and repeat the first row below the last. Each pair of neighboring rows gives two diagonal products. Subtract the product that goes from the upper to the lower from the product that goes from the upper to the lower . The pairs of diagonals look like crossed laces.
Check your understanding
Why does the term for the last edge have to use the first vertex again?
The closing edge brings the walk back to its first vertex. Every vertex then occurs once as a starting endpoint and once as an ending endpoint, so its endpoint products cancel.
Measure a concave lattice polygon
Worked example 2 Calculate and check a notched area
Problem. A lattice polygon has boundary vertices , , , , , , and in that order. Find its signed area and ordinary area by shoelace. Check its ordinary area using a rectangle and a triangle.
Solution. Include the closing edge . In the table, the row for is negative, so keep that sign when you add.
| Edge | First product | Second product | Difference |
|---|---|---|---|
The signed area is positive and the ordinary area is 24 square units.
For the geometric check, enclose the polygon in a by rectangle. The missing triangle has vertical base of length 3. Its perpendicular height is the horizontal gap of 4 from to that line.
In coordinate decomposition, you choose pieces with areas you can find easily. A rectangle with one triangular notch is a good fit. Shoelace uses the same rule for every neighboring pair, so it also works when the edges are slanted and no convenient pieces stand out.
Start anywhere or reverse the walk
Changing the first vertex while keeping the same direction moves some terms to the other end of the sum. Every directed edge stays in the list. Reversing the walk swaps the two products for every edge, so each difference changes sign.
Worked example 3 Reverse the lattice walk
Problem. Use the same lattice polygon as in Example 2, with vertices , , , , , , and . Follow and close at . Find the signed and ordinary areas by reversing the earlier edge contributions. State the orientation.
Solution. The old closing edge is now the first edge in reverse. For example, has first product 0 and second product 30. Its difference is .
The order is clockwise. The ordinary area is 24 square units.
Check your understanding
A simple polygon has signed area in the order . What is its signed area in the order ?
The second list starts at C and follows the same directed edges, including the closing edge. Moving the starting point preserves the signed sum.
Worked example 4 Keep negative coordinates in the products
Problem. A triangle has vertices , , and in boundary order. Find its exact area and identify the orientation.
Solution. The differences for the three directed edges are
The order is counterclockwise. The ordinary area is 12 square units.
Check your understanding
The two product totals for a simple polygon in boundary order are and , in the order used in the formula. What is its ordinary area?
Subtract the second total from the first to get . Halve that result to get the signed area, then take its absolute value.
Check that the walk is simple
Connecting the same points in a different sequence can change which edges you draw. Even an absolute value can leave the wrong result when edges cross.
Worked example 5 Find where a crossing loses area
Problem. A rectangle has corners , , , and . A walk visits and closes at . Find where its edges cross. Compare the shoelace result for that walk with both the total area of the two triangular regions and the area of the rectangle.
Solution. Edges and are the diagonals of the rectangle. They meet at their common midpoint .
Crossed walk. The differences on and are and . The other two differences are zero.
Two triangular regions. Each has a vertical base of length 6 and a perpendicular height of 4. The crossed walk follows one triangle clockwise and the other counterclockwise. Their signed contributions cancel even though both have positive ordinary area.
Rectangle. The boundary order encloses the full rectangle.
Check your understanding
The edges of a four-vertex walk cross, and its shoelace sum is nonzero. What can you conclude about using the ordinary area formula?
Simplicity is a condition on the edges. A nonzero sum cannot establish it, and reversal keeps the same segments.