In elementary geometry you learned that the area of a triangle is one-half the base times the height. We will now use that, combined with some trigonometry, to derive more formulas for the area when given various parts of the triangle.
Case 1: Two sides and the included angle.
Suppose that we have a triangle
\(\triangle\,ABC\), in which \(A\) can be either acute, a right angle, or obtuse, as in Figure
2.4.1. Assume that \(A\), \(b\), and \(c\) are known.
In each case we draw an altitude of height \(h\) from the vertex at \(C\) to \(\overline{AB}\), so that the area (which we will denote by the letter \(K\)) is given by \(K = \frac{1}{2}hc\). But we see that \(h = b\;\sin\;A\) in each of the triangles (since \(\;h=b\) and \(\sin\;A = \sin\;90\Degrees = 1\) in Figure 2.4.1(b), and \(\;h = b\;\sin\;(180\Degrees - A) = b\;\sin\;A\) in Figure 2.4.1(c)). We thus get the following formula:
The above formula for the area of \(\triangle\,ABC\) is in terms of the known parts \(A\), \(b\), and \(c\). Similar arguments for the angles \(B\) and \(C\) give us:
Notice that the height \(h\) does not appear explicitly in these formulas, although it is implicitly there. These formulas have the advantage of being in terms of parts of the triangle, without having to find \(h\) separately.
Example 2.13
[r]
Find the area of the triangle \(\triangle\,ABC\) given
\(A = 33\Degrees\), \(b = 5\), and
\(c = 7\).
Solution: Using formula (2.23), the area \(K\) is given by:
Case 2: Three angles and any side.
Suppose that we have a triangle
\(\triangle\,ABC\) in which one side, say, \(a\), and all three angles are known.[1] By the Law of Sines we
know that
so substituting this into formula (2.24) we get:
Similar arguments for the sides \(b\) and \(c\) give us:
Example 2.14
[r]
Find the area of the triangle \(\triangle\,ABC\) given
\(A = 115\Degrees\), \(B=25\Degrees\),
\(C=40\Degrees\), and \(a = 12\).
Solution: Using formula (2.26), the area \(K\) is given by:
Case 3: Three sides.
Suppose that we have a triangle \(\triangle\,ABC\) in which all
three sides are known. Then Heron’s formula[2] gives us the area:
To prove this, first remember that the area \(K\) is one-half the base times the height. Using \(c\) as the base and the altitude \(h\) as the height, as before in Figure 2.4.1, we have \(K = \frac{1}{2}hc\). Squaring both sides gives us
In Figure 2.4.2, let \(D\) be the point where the altitude touches \(\overline{AB}\) (or its extension).
By the Pythagorean Theorem, we see that \(\;h^2 = b^2 - (AD)^2\). In Figure 2.4.2(a), we see that \(\;AD = b\;\cos\;A\). And in Figure 2.4.2(b) we see that \(\;AD = b\;\cos\;(180\Degrees - A) = -b\cos\;A\). Hence, in either case we have \(\;(AD)^2 = b^2 \;(\cos\;A)^2\), and so
(Note that the above equation also holds when \(A=90\Degrees\) since \(\cos\;90\Degrees =0\) and \(h=b\)). Thus, substituting equation (2.31) into equation (2.30), we have
By the Law of Cosines we know that
and similarly
Thus, substituting these expressions into equation (2.32), we have
Example 2.15
[r]
Find the area of the triangle \(\triangle\,ABC\) given \(a=5\), \(b=4\), and \(c = 7\).
Solution: Using Heron’s formula with \(s = \frac{1}{2}\,(a+b+c) = \frac{1}{2}\,(5+4+7) = 8\), the area \(K\) is given by:
Heron’s formula is useful for theoretical purposes (e.g. in deriving other formulas). However, it is not well-suited for calculator use, exhibiting what is called numerical instability for “extreme” triangles, as in the following example.
Example 2.16
Find the area of the triangle \(\triangle\,ABC\) given \(a=1000000\), \(b=999999.9999979\), and \(c = 0.0000029\).
Solution: To use Heron’s formula, we need to calculate \(s = \frac{1}{2}\,(a+b+c)\). Notice that the actual value of \(a+b+c\) is \(2000000.0000008\), which has \(14\) digits. Most calculators can store \(12\)-\(14\) digits internally (even if they display less), and hence may round off that value of \(a+b+c\) to \(2000000\). When we then divide that rounded value for \(a+b+c\) by \(2\) to get \(s\), some calculators (e.g. the TI-83 Plus) will give a rounded down value of \(1000000\).
This is a problem because \(a=1000000\), and so we would get \(s-a=0\), causing Heron’s formula to give us an area of \(0\) for the triangle! And this is indeed the incorrect answer that the TI-83 Plus returns. Other calculators may give some other inaccurate answer, depending on how they store values internally. The actual area - accurate to \(15\) decimal places - is \(K = 0.99999999999895\), i.e. it is basically \(1\).
The above example shows how problematic floating-point arithmetic can be.[3] Luckily there is a better formula[4] for the area of a triangle when the three sides are known:
For a triangle \(\triangle\,ABC\) with sides \(a \ge b \ge c\), the area is:
To use this formula, sort the names of the sides so that \(a \ge b \ge c\). Then perform the operations inside the square root in the exact order in which they appear in the formula, including the use of parentheses. Then take the square root and divide by \(4\). For the triangle in Example 2.16, the above formula gives an answer of exactly \(K = 1\) on the same TI-83 Plus calculator that failed with Heron’s formula. What is amazing about this formula is that it is just Heron’s formula rewritten! The use of parentheses is what forces the correct order of operations for numerical stability. Another formula[5] for the area of a triangle given its three sides is given below:
For a triangle \(\triangle\,ABC\) with sides \(a \ge b \ge c\), the area is:
For the triangle in Example 2.16, the above formula gives an answer of exactly \(K = 1\) on the same TI-83 Plus calculator that failed with Heron’s formula.
For Exercises 1-6, find the area of the triangle \(\triangle\,ABC\).
2
\(A = 70\Degrees\), \(b = 4\), \(c = 12\)
\(a = 10\), \(B = 95\Degrees\), \(c = 35\)
2
\(A = 10\Degrees\), \(B = 48\Degrees\), \(C = 122\Degrees\), \(c = 11\)
\(A = 171\Degrees\), \(B = 1\Degrees\), \(C = 8\Degrees\), \(b = 2\)
2
\(a = 2\), \(b = 3\), \(c = 4\)
\(a = 5\), \(b=6\), \(c = 5\)
Find the area of the quadrilateral in Figure 2.4.3 below.
Let \(ABCD\) be a quadrilateral which completely contains its two diagonals, as in Figure 2.4.4 above. Show that the area \(K\) of \(ABCD\) is equal to half the product of its diagonals and the sine of the angle they form, i.e. \(K = \frac{1}{2}\,AC\,\cdot\,BD\;\sin\;\theta\;\).
From formula (2.26) derive the following formula for the area of a triangle \(\triangle\,ABC\):
\begin{displaymath} \text{Area} ~=~ K ~=~ \frac{a^2 \;\sin\;B \;\sin\;C}{2\;\sin\;(B+C)} \end{displaymath}Show that the triangle area formula
\begin{displaymath} \text{Area} ~=~ K ~=~ \tfrac{1}{4}\,\sqrt{(a + (b+c))\,(c - (a-b))\,(c + (a-b))\,(a + (b-c))} \end{displaymath}is equivalent to Heron’s formula. (Hint: In Heron’s formula replace \(s\) by \(\frac{1}{2}(a+b+c)\).)
Show that the triangle area formula (2.34) is equivalent to Heron’s formula. (Hint: Factor the expression inside the square root.)
Find the angle \(A\) in Example 2.16, then use formula (2.23) to find the area. Did it work?
- Note that this is equivalent to knowing just two angles and a side (why?). ↩
- Due to the ancient Greek engineer and mathematician Heron of Alexandria (c. 10-70 A.D.). ↩
- This is an issue even on modern computers. There is an excellent overview of this important subject in the article What Every Computer Scientist Should Know About Floating-Point Arithmetic by D. Goldberg, available at http://docs.sun.com/source/806-3568/ncg_goldberg.html ↩
- Due to W. Kahan: http://www.eecs.berkeley.edu/~wkahan/Triangle.pdf ↩
- Due to the Chinese mathematician Qiu Jiushao (ca. 1202-1261). ↩
Heron’s formula: For a triangle \(\triangle\,ABC\) with sides \(a\), \(b\), and \(c\), let \(s = \frac{1}{2}\,(a+b+c)\) (i.e. \(2s = a+b+c\) is the perimeter of the triangle). Then the area \(K\) of the triangle is