Coordinate Area Formulas Advanced. This lesson goes beyond core Geometry. You can skip it.

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 xx to the right and positive yy 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 y=ky=k 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.

Trapezoid under a directed edgeThe edge runs down and left from P to Q. Vertical drops join both points to a horizontal reference line. The shaded trapezoid lies between the edge and that line.PQReference line
The dashed drops give the two heights. The arrow gives the sign.

Worked example 1 Sign a single trapezoid

Problem. The directed edge goes from P(6,4)P(6,4) to Q(2,1)Q(2,1). Use the reference line y=−1y=-1 to find its signed trapezoid contribution. Find the contribution of the reverse edge as well.

Solution. For P→QP\to Q, 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.

E(P,Q)=4⋅5+22E(P,Q)=14.\begin{aligned} E(P,Q)&=4\cdot\frac{5+2}{2}\\ E(P,Q)&=14. \end{aligned}

For Q→PQ\to P, the same trapezoid has a negative sign because the edge goes rightward.

E(Q,P)=−14.E(Q,P)=-14.

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?

Answer choices

Why the directed trapezoids give signed area#

Cut the plane into vertical strips at the distinct vertex xx-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.

Two interior pieces in one vertical stripA concave polygon has a notch cut into its right side. The two dashed vertical guides intersect its boundary four times each. Between the guides, the shaded parts of the polygon lie above and below the notch. Along each shaded part the upper boundary arrow points left and the lower boundary arrow points right.
The guide lines show part of a strip. Pair the upper and lower edges separately above and below the notch.

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.

2E(P,Q)=(6−2)(5+2).2E(P,Q)=(6-2)(5+2).

Expanding and grouping the four products gives a cross-product difference dPQd_{PQ} and an endpoint difference bPQb_{PQ}.

dPQ=6⋅2−2⋅5dPQ=2.\begin{aligned} d_{PQ}&=6\cdot2-2\cdot5\\ d_{PQ}&=2. \end{aligned}bPQ=6⋅5−2⋅2bPQ=26.\begin{aligned} b_{PQ}&=6\cdot5-2\cdot2\\ b_{PQ}&=26. \end{aligned}

Adding the two differences gives twice the signed contribution.

2E(P,Q)=dPQ+bPQ2E(P,Q)=2+26.\begin{aligned} 2E(P,Q)&=d_{PQ}+b_{PQ}\\ 2E(P,Q)&=2+26. \end{aligned}

The second group contains the starting endpoint product 6⋅56\cdot5 and the negative ending endpoint product −2⋅2-2\cdot2. On the next edge, QQ becomes the starting point, so that edge supplies +2⋅2+2\cdot2.

Write Pi=(xi,yi)P_i=(x_i,y_i) for each of the nn vertices in boundary order. To include the last edge, use Pn+1=P1P_{n+1}=P_1. Let hih_i be the height of PiP_i above the reference line.

hi=yi−k.h_i=y_i-k.

The signed width xi−xi+1x_i-x_{i+1} is positive on a leftward edge. Multiplying it by the average of the two heights gives the contribution EiE_i.

2Ei=(xi−xi+1)(hi+hi+1).2E_i=(x_i-x_{i+1})(h_i+h_{i+1}).

After expansion, the four products can be grouped into a cross-product difference did_i and an endpoint difference bib_i.

di=xihi+1−xi+1hi.d_i=x_i h_{i+1}-x_{i+1}h_i.bi=xihi−xi+1hi+1.b_i=x_i h_i-x_{i+1}h_{i+1}.2Ei=di+bi.2E_i=d_i+b_i.

Around a whole polygon, each endpoint product in bib_i 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 did_i using the original coordinates. Substituting the heights gives

di=xi(yi+1−k)−xi+1(yi−k).d_i=x_i(y_{i+1}-k)-x_{i+1}(y_i-k).

The terms involving kk combine to kk times the horizontal change Δxi\Delta x_i.

Δxi=xi+1−xi.\Delta x_i=x_{i+1}-x_i.di=xiyi+1−xi+1yi+k Δxi.d_i=x_i y_{i+1}-x_{i+1}y_i+k\,\Delta x_i.

The changes Δxi\Delta x_i 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 yy to the lower xx from the product that goes from the upper xx to the lower yy. 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?

Answer choices

Measure a concave lattice polygon

Worked example 2 Calculate and check a notched area

Problem. A lattice polygon has boundary vertices A(0,0)A(0,0), B(6,0)B(6,0), C(6,1)C(6,1), D(2,2)D(2,2), E(6,4)E(6,4), F(6,5)F(6,5), and G(0,5)G(0,5) in that order. Find its signed area and ordinary area by shoelace. Check its ordinary area using a rectangle and a triangle.

The notched lattice polygon with a forward traversalThe boundary arrows follow A to B to C to D to E to F to G and back to A. The right edge bends inward through D. A dashed segment joins C to E across the notch.xyABCDEFG
Follow the arrows to read the vertices. The dashed segment closes the triangular notch for the area check.

Solution. Include the closing edge G→AG\to A. In the table, the row for D→ED\to E is negative, so keep that sign when you add.

EdgeFirst productSecond productDifference
A→BA\to B000000
B→CB\to C660066
C→DC\to D1212221010
D→ED\to E881212−4-4
E→FE\to F3030242466
F→GF\to G3030003030
G→AG\to A000000
2S=0+6+10−4+6+30+0.2S=0+6+10-4+6+30+0.S=24.S=24.

The signed area is positive and the ordinary area is 24 square units.

For the geometric check, enclose the polygon in a 66 by 55 rectangle. The missing triangle CDECDE has vertical base CECE of length 3. Its perpendicular height is the horizontal gap of 4 from DD to that line.

K=6⋅5−12(3)(4)K=24.\begin{aligned} K&=6\cdot 5-\tfrac12(3)(4)\\ K&=24. \end{aligned}

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 A(0,0)A(0,0), B(6,0)B(6,0), C(6,1)C(6,1), D(2,2)D(2,2), E(6,4)E(6,4), F(6,5)F(6,5), and G(0,5)G(0,5). Follow A,G,F,E,D,C,BA,G,F,E,D,C,B and close at AA. Find the signed and ordinary areas by reversing the earlier edge contributions. State the orientation.

The notched lattice polygon with a reverse traversalThe same lattice polygon has arrows from A to G to F to E to D to C to B and back to A.xyABCDEFG
Start at A again and follow the reversed arrows along the same edges.

Solution. The old closing edge is now the first edge in reverse. For example, G→FG\to F has first product 0 and second product 30. Its difference is −30-30.

2S=0−30−6+4−10−6+0.2S=0-30-6+4-10-6+0.S=−24.S=-24.

The order is clockwise. The ordinary area is 24 square units.

Check your understanding

A simple polygon has signed area −17-17 in the order A,B,C,D,EA,B,C,D,E. What is its signed area in the order C,D,E,A,BC,D,E,A,B?

Answer choices

Worked example 4 Keep negative coordinates in the products

Problem. A triangle has vertices H(−3,−2)H(-3,-2), J(4,−1)J(4,-1), and L(1,2)L(1,2) in boundary order. Find its exact area and identify the orientation.

Triangle across the coordinate axesH is three units left and two down from the origin. J is four right and one down. L is one right and two up.xyHJL
Two vertices lie below the horizontal axis. Keep their negative coordinates in the calculation.

Solution. The differences for the three directed edges are

dHJ=3−(−8)dHJ=11dJL=8−(−1)dJL=9dLH=−2−(−6)dLH=4.\begin{aligned} d_{HJ}&=3-(-8)\\ d_{HJ}&=11\\ d_{JL}&=8-(-1)\\ d_{JL}&=9\\ d_{LH}&=-2-(-6)\\ d_{LH}&=4. \end{aligned}2S=11+9+4.2S=11+9+4.S=12.S=12.

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 −11-11 and 44, in the order used in the formula. What is its ordinary area?

Answer choices

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 A(0,0)A(0,0), B(8,0)B(8,0), C(8,6)C(8,6), and D(0,6)D(0,6). A walk visits A,C,B,DA,C,B,D and closes at AA. 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.

The crossed walk through the rectangle cornersThe arrows go from bottom left A to top right C, down to bottom right B, then across to top left D and down to A. The two slanted edges cross in the center. The two triangular regions are on either side of the crossing.xyABCD
The crossed walk encloses two triangular regions. Its left and right sides have opposite directions.

Solution. Edges ACAC and BDBD are the diagonals of the rectangle. They meet at their common midpoint (4,3)(4,3).

Crossed walk. The differences on C→BC\to B and B→DB\to D are −48-48 and 4848. The other two differences are zero.

2S=0−48+48+02S=0.\begin{aligned} 2S&=0-48+48+0\\ 2S&=0. \end{aligned}

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.

Kregions=2⋅12(6)(4)Kregions=24.\begin{aligned} K_{\mathrm{regions}}&=2\cdot\tfrac12(6)(4)\\ K_{\mathrm{regions}}&=24. \end{aligned}

Rectangle. The boundary order A,B,C,DA,B,C,D encloses the full rectangle.

Krectangle=8⋅6Krectangle=48.\begin{aligned} K_{\mathrm{rectangle}}&=8\cdot6\\ K_{\mathrm{rectangle}}&=48. \end{aligned}

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?

Answer choices

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

A surveyor can measure how far each new corner lies north or south and east or west of the previous one. Those readings begin as changes in position. Adding the changes corner by corner turns them into coordinates, which can then be used to find the area of the parcel.

In his 1986 article The Surveyor’s Area Formula, mathematician Bart Braden began with that surveying problem. He showed that when a parcel is divided into triangles, the two triangles on either side of an internal diagonal count it in opposite directions. The entries from those diagonals cancel, leaving the surveyor’s original boundary. Braden’s article, hosted by Appalachian State University

Your progress

See all your progress →