Practical alculation of Polygonal reas Tom avis tomrdavis@earthlink.net http://www.geometer.org/mathcircles January 30, 006 bstract In this paper we will consider practical methods to find the area of irregular polygons. We will not provide proofs of any of the formulas they are readily available but we will work out detailed examples of every technique. 1 Simple reas There are nice formulas to calculate the area of certain simple polygons. The area of a rectangle is the length times the width; the area of a triangle is half the base times the height, and there are many others. I w h l G b K H Figure 1: rea Formulas for Simple Polygons In figure 1 the area of the rectangle is lw and the area of the triangle GHI is bh/. Note that h is the perpendicular distance from point I to the line GH, and that b is the length of the segment GH. Polygonal Subdivision In many practical situations, the simple formulas do not apply: the four-sided figure is not a rectangle, or you have only the lengths of the three sides of a triangle but you do not have the altitude, or the figure is irregular and has more than four sides. When this occurs, the easiest solution is often to break the figure up into triangles, to calculate the area of each triangle, and then to add them to obtain the area of the entire polygon. G H E F Figure : Subdividing a Polygon 1
This technique will work for any polygon. Figure shows a very strange polgyon EF GH, yet its area is simply the sum of the areas of triangles GH, G, F G, EF, E and E. In fact, any polygon with n sides can be subdivided into (n ) triangles using only existing vertices of the original polygon as illustrated in figure. When this subdivision strategy is used, we generally do not know the base and height of any of the triangles that form the subdivision, so what we need is a formula that tells us the area of a triangle, given the length of all three sides. 3 Heron s Formula If the lengths of the three sides of a triangle are a, b and c, then we can calculate the semiperimeter (half the perimeter) as follows: s = (a + b + c)/. Heron s formula gives the area of the triangle: = s(s a)(s b)(s c). 5 13 1 Figure 3: 5 1 13 Right Triangle Let s use Heron s formula for a simple triangle where we already know the area. We ll use the 5 1 13 right triangle shown in figure 3. The area is easy to calculate in the usual way: the base () is 1 and the height () is 5. Remember that the height is the length of a side only in a right triangle. Thus the area is 5(1)/ = 30. To use Heron s formula, let a = 13, b = 1 and c = 5, so s = (a + b + c)/ = (5 + 1 + 13)/ = 15. The area is: = 15(15 13)(15 1)(15 5) = 15()(3)(10) = 900 = 30. Heron s formula, of course, works for any triangle not just right triangles, but the example above shows how to use it, and shows that it gives the right answer in at least one case. Note also that usually the square root does not turn out to be a round number. 4 The Law of osines We will need to use the law of cosines in the next section. The law of cosines allows us to calculate the third side of a triangle if we know the lengths of the other two sides and of the angle between them. In the triangle in figure 4 we can calculate the length of the side if we know the lengths of and. In the formula we will call the length of,, and c, a, and b, as in the figure. (If this seems confusing, the a is the length of the side opposite the angle, b is the length of the side opposite angle, and so on.) If γ is the measure of angle, then the law of cosines states that: c = a + b ab cos γ,
c a b γ Figure 4: The Law of osines or c = a + b ab cos γ. We will see an example of the use of the law of cosines in the next section. 5 reas of Quadrilaterals If we know the lengths of the four sides of a quadrilateral, we cannot, in general, compute the area. Figure 5: Two Quadrilaterals with Equal Sides Figure 5 shows why. The two quadrilaterals and have equal-length sides, but the areas are obviously different. In other words, =, =, = and =. To make it obvious why the area can vary, imagine taking four sticks of the appropriate lengths and connecting them with pivots at the ends so the shape can be flexed. For a triangle, only one shape is possible, but once there are more than three sides, there is flexibility, and changing the angles can change the area. The extreme situation is a figure with four equal sides. It could be a square, or you can squash it into a thinner and thinner diamond and can make the enclosed area as close to zero as you would like. The bottom line is that to find the area of a quadrilateral, you need more than just the lengths of the four sides. If you know one of the diagonal lengths, then the problem is simple, since this effectively divides the region into two triangles, and you know the lengths of all three sides of each, so Heron s formula can be applied twice and the results added. You can also work out the area if you have any one of the four angles. That s because you can find the length of the diagonal opposite the angle by using the law of cosines. s an example, let s work out the area of the quadrilateral displayed in figure 6 where the angle at is 109 and the sides have the lengths 100 feet, 10 feet, 110 feet and 95 feet as shown in the figure. We want to find the length of side. The law of cosines tells us that: = 100 + 10 100 10 cos 109. 3
100 109 10 95 110 Figure 6: rea of a Quadrilateral with an ngle The cosine of 109 is.35568, so: = 10000 + 14400 4000(.35568) = 4400 + 7813.64 = 313.64 = 179.48 which looks about right, according to the figure. Now, to calculate the area of the quadrilateral we have to find the area of two triangles. One has sides equal to 100, 10, and 179.48; the other has sides equal to 95, 110 and 179.48, so we will need to use Heron s formula twice. For the first triangle, a = 100, b = 10, c = 179.48. First we need to find the semiperimeter s = (a + b + c)/. For this triangle, s = 199.74. Heron s formula tells us that the area 1 of the first triangle is: 1 = s(s a)(s b)(s c) = 199.74(199.74 100)(199.74 10)(199.74 179.48) = 199.74(99.74)(79.74)(0.6) = 3184745 = 5673.16 The calculation is similar for the area of the second triangle using a = 95, b = 110 and c = 179.48, and it turns out to be = 449.06. (It s a good idea to try to work this one out yourself to make certain that you understand the process.) The total area of the quadrilateral is thus: 1 + = 5673.16 + 449.06 = 1010.. Since the units on the sides were in feet, this will be the number of square feet. (If you need to convert to acres, 1 acre is equal to 43650 square feet, so for if the measurements above were for a parcel of land, its area, in acres, would be 1010./43560 =.3 acres. 6 More omplex Polygons For the same reasons that you cannot calculate the area of a quadrilateral knowing only the lengths of the four sides, you need more information than just the lengths of the sides for polygons with 5, 6, 7,... sides. For a 5-sided polygon, you need the lengths of two diagonals, or of two angles, or of a diagonal and an angle; in other words, two extra pieces of information. For a 6-sided polygon, you ll need three extra pieces of information, and so on. If those pieces of information are the diagonals, the calculation is straightforward; if they are measures of angles, you may need to use the law of sines in addition to the law of cosines. 4
7 Some Technical etails So far we have never stated exactly what we mean by a polygon and in fact it is somewhat difficult to define that term in a mathematically precise way. an it have indentations? an it have holes? an it have multiple regions? an the edges cross each other or touch other edges? For the results so far, holes, multiple regions, and indentations do not matter; as long as the area to be determined can be subdivided into triangles, everything up to now works. For the following two sections, however, we will not allow multiple regions or holes. polygon, for the purposes of the rest of this article, is a set of vertices and line segments connecting them in order from the first to the last and then back to the first, such that none of the line segments cross another segment or touch any vertex other than the two vertices it is connecting. These polygons are allowed to have indentations, as long as the line segments making up the edges never touch. (Polygons without indentations are called convex polygons ; polygons that are not convex are sometimes called concave or simply non-convex. 8 reas ased on oordinates Sometimes you will be lucky enough to have coordinates of the vertices of the polygon. When this occurs, there is a very simple formula that yields the area. If the points, in order, around a polygon having n vertices have coordinates v 0 = (x 0, y 0 ), v 1 = (x 1, y 1 ), v = (x, y ),..., v n 1 = (x n 1, y n 1 ), then the following formula yields the area: = 1 [(x 0y 1 y 0 x 1 ) + (x 1 y y 1 x ) + + (x n y n 1 y n x n 1 ) + (x n 1 y 0 y n 1 x 0 )]. (1) In other words, there is a term for each pair of adjacent coordinates that wraps around to the first point (v 0 ) at the end. If we duplicate the first point, (v 0 ) and call it v n, so that v n = (x n, y n ) = (x 0, y 0 ), then there is a very compact mathematical formula for the area, if you understand sigma-notation: = 1 n 1 (x k y k+1 y k x k+1 ). k=0 (0,5) (0,0) (8,0) Figure 7: rea of a Right Triangle Let s check this for a very simple example first, then a more complex example. For the simple example, let s use the formula to find the area of the triangle illustrated in figure 7 with vertices having the following coordinates: v 0 = (0, 0), v 1 = (8, 0), v = (0, 5). We will be able to check the calculation, since this is a right triangle with base 8 and height 5, so the area is 1 8 5 = 0. We will use equation 1 with x 0 = y 0 = 0, x 1 = 8, y 1 = 0, x = 0 and y = 5. Plugging these numbers 5
into the equation yields: = 1 [(x 0y 1 y 0 x 1 ) + (x 1 y y 1 x ) + (x y 0 y x 0 )] = 1 [(0 0 0 8) + (8 5 0 0) + (0 0 5 0)] = 1 [40] = 0. (0,8) (-8,3) (-5,3) (3,3) (7,3) (,-3) (-4,-8) (5,-6) (7,-7) Figure 8: omplex Polygon with oordinates Next, let s look at a more complex example, illustrated in figure 8. This is a polygon with nine vertices, and we ll assign names to them as follows: v 0 = (x 0, y 0 ) = (3, 3) v 1 = (x 1, y 1 ) = ( 5, 3) v = (x, y ) = (0, 8) v 3 = (x 3, y 3 ) = ( 8, 3) v 4 = (x 4, y 4 ) = (, 3) v 5 = (x 5, y 5 ) = ( 4, 8) v 6 = (x 6, y 6 ) = (7, 7) v 7 = (x 7, y 7 ) = (7, 3) v 8 = (x 8, y 8 ) = (5, 6) When we plug these values into equation 1, we obtain: = 1 [(3 3 3 ( 5)) + ( 5 8 3 0) + (0 3 8 ( 8)) +( 8 ( 3) 3 ) + ( ( 8) ( 3) ( 4)) + ( 4 ( 7) ( 8) 7)) +(7 3 ( 7) 7) + (7 ( 6) 3 5) + (5 3 ( 6) 3)] = 1 [4 40 + 64 + 18 8 + 84 + 70 57 + 33] = 84. This formula assumes that the vertices of the polygon are listed in counter-clockwise order around the polygon. In other words, if you were to walk around the polygon from v 0 to v 1 to v and so on, the interior of the polygon would always be to your left. If you accidentally reverse the points and list them in clockwise order, you will obtain the same numerical value for the area, but it will be negative instead of positive. 6
9 Pick s Theorem Finally, sometimes all of the vertices of a polygon lie on points that have integer (whole-number) coordinates. nother way to think of this is that you have a grid of points spaced one unit apart both vertically and horizontally, and all of the vertices of the polygon lie on these grid points. In this very special case, Pick s theorem can be applied. F E Figure 9: Polygonal rea Using Pick s Theorem Figure 9 illustrates a number of examples. Pick s theorem tells us that to find the area of any of these, we need only count the number of points completely inside the figure (I) and count the number of points that lie on the boundary of the figure () and the area is given by the formula: = I + / 1. The following table shows the values of I, and I + / 1 for each of the polygons in the figure. It is easy to check that the result is accurate for many of them: I I + / 1 0 4 1 0 3 1/ 8 6 40 7 1 1 E 4 33 F 9 6 1 7