8.5 Law of Cosines

In Section 8.4, we developed the Law of Sines (Theorem 8.15) to enable us to solve triangles in the `Angle-Angle-Side’ (AAS), the `Angle-Side-Angle’ (ASA) and the ambiguous `Side-Side-Angle’ (SSA) cases.

In this section, we develop the Law of Cosines which handles solving triangles in the  `Side-Angle-Side’ (SAS) and `Side-Side-Side’ (SSS) cases.[1] We state and prove the theorem below.

Theorem 8.18  Law of Cosines

Given a triangle with angle-side opposite pairs (\alpha, a), (\beta, b) and (\gamma, c), the following equations hold

  • a^2 = b^2 + c^2 - 2bc \cos(\alpha)
  • b^2 = a^2 + c^2 - 2ac \cos(\beta)
  • c^2 = a^2 + b^2 - 2ab \cos(\gamma)

or, solving for the cosine in each equation, we have

  • \cos(\alpha) = \dfrac{b^2+c^2 - a^2}{2bc}
  • \cos(\beta) = \dfrac{a^2+c^2 - b^2}{2ac}
  • \cos(\gamma) = \dfrac{a^2+b^2 - c^2}{2ab}

To prove the theorem, we consider a generic triangle with the vertex of angle \alpha at the origin with side b positioned along the positive x-axis as sketched in the diagram below.

A circle with center at the origin of a cartesian plane. There is a triangle in the first quadrant of the plane. The triangle has a vertex, A, at (0,0) and the angle is alpha. The next vertex, B, is on the circle at (c cosine alpha, c sine alpha). The last vertex is C at (b,0). The side opposite the vertex has the same lower case letter as the label.
Triangle for Proof of Law of Cosines

 

From this set-up, we immediately find that the coordinates of A and C are A(0,0) and C(b,0). From Theorem 7.4, we know that because the point B(x,y) lies on a circle of radius c, the coordinates of B are B(x,y) = B(c \cos(\alpha), c \sin(\alpha)). (This would be true even if \alpha were an obtuse or right angle so although we have drawn the case when \alpha is acute, the following computations hold for any angle \alpha drawn in standard position where 0 < \alpha < 180^{\circ}.)

We note that the distance between the points B and C is none other than the length of side a. Using the distance formula, Equation 1.1, we get

    \[\begin{array}{rclr} a & = & \sqrt{(c \cos(\alpha) - b)^{2} + (c \sin(\alpha) - 0)^2} & \\ [3pt] a^{2} & = & \left(\sqrt{(c \cos(\alpha) - b)^{2} + c^2 \sin^2(\alpha)}\right)^2 & \\ [3pt] a^2 & = & (c \cos(\alpha) - b)^{2} + c^2 \sin^2(\alpha) & \\ [3pt] a^2 & = & c^2 \cos^2(\alpha) - 2bc \cos(\alpha) + b^2 + c^2 \sin^2(\alpha) & \\ [3pt] a^2 & = & c^2\left(\cos^2(\alpha) + \sin^2(\alpha)\right) + b^2 - 2bc \cos(\alpha) & \\ [3pt] a^2 & = & c^2(1) + b^2 - 2bc \cos(\alpha) & \text{As $\cos^2(\alpha) + \sin^2(\alpha) = 1$}\\ [3pt] a^2 & = & c^2 + b^2 - 2bc \cos(\alpha) & \\ \end{array} \]

The remaining formulas given in Theorem 8.18 can be shown by simply reorienting the triangle to place a different vertex at the origin. We leave these details to the reader.

What’s important about a and \alpha in the above proof is that (\alpha,a) is an angle-side opposite pair and b and c are the sides adjacent to \alpha — the same can be said of any other angle-side opposite pair in the triangle.

Notice that the proof of the Law of Cosines relies on the distance formula which has its roots in the Pythagorean Theorem. That being said, the Law of Cosines can be thought of as a generalization of the Pythagorean Theorem.

Indeed, in a triangle in which \gamma = 90^{\circ}, (i.e., a right triangle) then \cos(\gamma) = \cos\left(90^{\circ}\right) = 0 and we get the familiar relationship c^2 = a^2 + b^2. What this means is that in the larger mathematical sense, the Law of Cosines and the Pythagorean Theorem amount to pretty much the same thing.[2]

Example 8.5.1

Example 8.5.1.1

Solve the following triangles. Give exact answers and decimal approximations (rounded to hundredths) and sketch the triangle.

\beta = 50^{\circ}, a = 7 units, c=2 units

Solution:

Solve the triangle with the properties: \beta = 50^{\circ}, a = 7 units, c=2 units. Give exact answers and decimal approximations (rounded to hundredths) and sketch the triangle.

We are given the lengths of two sides, a=7 and c = 2, and the measure of the included angle, \beta = 50^{\circ}.

With no angle-side opposite pair to use for the Law of Sines, we apply the Law of Cosines. We get

    \[ \begin{array}{rcl} b^2 &=& 7^2 + 2^2 - 2(7)(2)\cos\left(50^{\circ}\right) \\[4pt] b &=& \sqrt{53-28\cos\left(50^{\circ}\right)} \\[4pt] & \approx & 5.92 \text{ units} \end{array}\]

In order to determine the measures of the remaining angles \alpha and \gamma, we are forced to used the derived value for b. There are two ways to proceed at this point. We could use the Law of Cosines again, or, now that we have the angle-side opposite pair (\beta, b) we could use the Law of Sines.

The advantage to using the Law of Cosines over the Law of Sines in cases like this is that unlike the sine function, the cosine function distinguishes between acute and obtuse angles. The cosine of an acute is positive, whereas the cosine of an obtuse angle is negative. The sine of both acute and obtuse angles are positive, thus the sine of an angle alone is not enough to determine if the angle in question is acute or obtuse.

As both authors of the textbook prefer the Law of Cosines, we proceed with this method first. When using the Law of Cosines, it’s always best to find the measure of the largest unknown angle first, as this will give us the obtuse angle of the triangle, if there is one.

The largest angle is opposite the longest side, so we choose to find \alpha first. To that end, we use the formula \cos(\alpha) = \frac{b^2+c^2-a^2}{2bc} and substitute a = 7, b = \sqrt{53-28\cos\left(50^{\circ}\right)} and c = 2. We get[3]

    \[\cos(\alpha) = \frac{2-7\cos\left(50^{\circ}\right)}{\sqrt{53-28\cos\left(50^{\circ}\right)}}\]

Because \alpha is an angle in a triangle, we know the radian measure of \alpha must lie between 0 and \pi radians. This matches the range of the arccosine function, so we have

    \[\alpha = \arccos\left(\frac{2-7\cos\left(50^{\circ}\right)}{\sqrt{53-28\cos\left(50^{\circ} \right)}}\right) \, \text{radians} \, \approx 114.99^{\circ}\]

At this point, we could find \gamma using

    \[ \begin{array}{rcl} \gamma &=& 180^{\circ} - \alpha - \beta \\[4pt] &\approx & 180^{\circ} - 114.99^{\circ} - 50^{\circ} \\[4pt] &=& 15.01^{\circ} \end{array} \]

that is if we trust our approximation for \alpha.

To minimize propagation of error (and obtain an exact answer for \gamma), however, we could use the Law of Cosines again.[4] From \cos(\gamma) = \frac{a^2+b^2-c^2}{2ab} with a = 7, b = \sqrt{53-28\cos\left(50^{\circ} \right)} and c=2, we get

    \[ \begin{array}{rcl} \gamma &=& \arccos\left(\frac{7-2 \cos\left(50^{\circ}\right)}{\sqrt{53-28\cos\left(50^{\circ} \right)}} \right) \text{ radians } \\[10pt] & \approx & 15.01^{\circ} \end{array} \]

We sketch the triangle below.

Rendered by QuickLaTeX.com

As we mentioned earlier, once we’ve determined b it is possible to use the Law of Sines to find the remaining angles. Here, however, we must proceed with caution as we are in the ambiguous (SSA) case. In the ambiguous case it is advisable to first find the smallest of the unknown angles, because we are guaranteed it will be acute.[5]

In this case, we would find \gamma as the side opposite \gamma is smaller than the side opposite the other unknown angle, \alpha. Using the angle-side opposite pair (\beta, b), we get \frac{\sin(\gamma)}{2} = \frac{\sin(50^{\circ})}{ \sqrt{53-28\cos\left(50^{\circ}\right)}}. The usual calculations produces \gamma \approx 15.01^{\circ} and \alpha = 180^{\circ} - \beta - \gamma \approx 180^{\circ} - 50^{\circ} - 15.01^{\circ} = 114.99^{\circ}.

Example 8.5.1.2

Solve the following triangles. Give exact answers and decimal approximations (rounded to hundredths) and sketch the triangle.

a=4 units, b=7 units, c = 5 units

Solution:

Solve the triangle with the properties: a=4 units, b=7 units, c = 5 units. Give exact answers and decimal approximations (rounded to hundredths) and sketch the triangle.

All three sides and no angles are given, so we are forced to use the Law of Cosines. Following our discussion in the previous problem, we find \beta first, as it is opposite the longest side, b. We get

    \[ \begin{array}{rcl} \cos(\beta) &=& \frac{a^2+c^2-b^2}{2ac}\\[10pt] &=& -\frac{1}{5} \\[4pt] \beta &=& \arccos\left(-\frac{1}{5}\right) \text{ radians } \\[4pt] &\approx& 101.54^{\circ} \end{array} \]

Now that we have obtained an angle-side opposite pair (\beta, b), we could proceed using the Law of Sines. The Law of Cosines, however, offers us a rare opportunity to find the remaining angles using only the data given to us in the statement of the problem.

Using the Law of Cosines, we get

    \[ \begin{array}{rcl} \gamma &=& \arccos\left(\frac{5}{7}\right) \text{ radians } \\[4pt] & \approx & 44.42^{\circ} \end{array} \]

and

    \[ \begin{array}{rcl} \alpha &=& \arccos\left(\frac{29}{35}\right) \text{ radians } \\[4pt] & \approx & 34.05^{\circ} \end{array} \]

We sketch this triangle below.

Rendered by QuickLaTeX.com

We note that, depending on how many decimal places are carried through successive calculations, and depending on which approach is used to solve the problem, the approximate answers you obtain may differ slightly from those the authors obtain in the Examples and the Exercises.

A great example of this is number 2 in Example 8.5.1, where the approximate values we record for the measures of the angles sum to 180.01^{\circ}, which is geometrically impossible.

Example 8.5.2

Example 8.5.2

A researcher wishes to determine the width of a vernal pond as drawn below. From a point P, he finds the distance to the eastern-most point of the pond to be 950 feet, while the distance to the western-most point of the pond from P is 1000 feet. If the angle between the two lines of sight is 60^{\circ}, find the width of the pond.

Rendered by QuickLaTeX.com

Solution:

We are given the lengths of two sides and the measure of an included angle, so we may apply the Law of Cosines to find the length of the missing side opposite the given angle.

Calling this length w (for width), we get

    \[ \begin{array}{rcl} w^2 &=& 950^2 + 1000^2 - 2(950)(1000)\cos\left(60^{\circ}\right) \\[4pt] &=& 952500\\[4pt] w &=& \sqrt{952500}\\[4pt] &\approx& 976 \text{ feet} \end{array} \]

In Section 8.4, we used the proof of the Law of Sines to develop Theorem 8.17 as an alternate formula for the area enclosed by a triangle. In this section, we use the Law of Cosines to derive another such formula, the so-called Heron’s Formula.[6]

Theorem 8.19  Heron’s Formula

Suppose a, b and c denote the lengths of the three sides of a triangle. Let s be the semiperimeter of the triangle, that is, let s = \frac{1}{2}(a + b + c). Then, the area A enclosed by the triangle is given by

    \[ A = \sqrt{s (s-a) (s-b) (s-c)}\]

We prove Theorem 8.19 using Theorem 8.17. Using the convention that the angle \gamma is opposite the side c, we have A = \frac{1}{2} ab \sin(\gamma) from Theorem 8.17.

In order to simplify computations, we start by manipulating the expression for A^2.

    \[ \begin{array}{rclr} A^2 & = & \left(\dfrac{1}{2} ab \sin(\gamma)\right)^2 &\\[10pt] & = & \dfrac{1}{4} a^2 b^2 \sin^{2}(\gamma) & \\[10pt] & = & \dfrac{a^2b^2}{4} \left(1 - \cos^{2}(\gamma)\right) & \text{as $\sin^2(\gamma) = 1 - \cos^{2}(\gamma)$.} \\ \end{array}\]

The Law of Cosines tells us \cos(\gamma) = \frac{a^2 + b^2 - c^2}{2ab}, so substituting this into our equation for A^2 gives

    \[ \begin{array}{rclr} A^2 & = & \dfrac{a^2b^2}{4} \left(1 - \cos^{2}(\gamma)\right) & \text{\hphantom{perfect square trinomials.}}\\[10pt] & = & \dfrac{a^2b^2}{4} \left[1 - \left( \dfrac{a^2 + b^2 - c^2}{2ab} \right)^2\right] & \\ [10pt] & = & \dfrac{a^2b^2}{4} \left[1 - \dfrac{\left(a^2 + b^2 - c^2\right)^2}{4a^2b^2} \right] & \\ [10pt] & = & \dfrac{a^2b^2}{4} \left[\dfrac{4a^2 b^2 - \left(a^2 + b^2 - c^2\right)^2}{4a^2b^2} \right] & \\ [10pt] & = & \dfrac{4a^2 b^2 - \left(a^2 + b^2 - c^2\right)^2}{16} & \\ \end{array} \]

Recognizing 4a^2 b^2 as a perfect square, 4a^2 b^2 = (2ab)^2, we can factor the resulting difference of squares:

    \[ \begin{array}{rclr} A^2 & = & \dfrac{(2ab)^2 - \left(a^2 + b^2 - c^2\right)^2}{16} & \\ [10pt] & = & \dfrac{\left( 2ab - \left[a^2+b^2 - c^2\right]\right) \left( 2ab + \left[a^2+b^2 - c^2\right]\right)}{16} & \text{difference of squares.} \\ [10pt] & = & \dfrac{\left(c^2 - a^2 + 2ab - b^2 \right)\left( a^2 + 2ab + b^2- c^2\right)}{16} & \\ [10pt] \end{array} \]

Next, we regroup c^2 - a^2 + 2ab - b^2 = c^2 - \left[a^2 - 2ab + b^2\right] and a^2 + 2ab + b^2- c^2 = \left[a^2 + 2ab + b^2\right]- c^2. Recognizing a^2 - 2ab + b^2 = (a-b)^2 and a^2 + 2ab + b^2 = (a+b)^2, we continue factoring:

    \[ \begin{array}{rclr} A^2 & = & \dfrac{\left(c^2 - \left[a^2 - 2ab + b^2\right] \right) \left( \left[a^2 + 2ab + b^2\right]- c^2\right)}{16} & \\ [10pt] & = & \dfrac{\left(c^2 - (a-b)^2 \right) \left( (a+b)^2- c^2\right)}{16} & \text{perfect square trinomials.}\\ [10pt] & = & \dfrac{ (c-(a-b))(c+(a-b))((a+b) -c)((a+b)+c)}{16} & \text{difference of squares.} \\ [10pt] & = & \dfrac{ (b+c-a)(a+c-b)(a+b-c)(a+b+c)}{16} & \\ [10pt] & = & \dfrac{(b+c-a)}{2} \cdot \dfrac{(a+c-b)}{2} \cdot \dfrac{(a+b-c)}{2} \cdot \dfrac{(a+b+c)}{2} & \\ [10pt] \end{array} \]

At this stage, we recognize the last factor as the semiperimeter, s = \frac{1}{2}(a+b+c) = \frac{a+b+c}{2}. To complete the proof, we note that

    \[ \begin{array}{rcl} (s - a) &=& \dfrac{a+b+c}{2} - a \\[4pt] &=& \dfrac{a+b+c-2a}{2}\\[4pt] &=& \dfrac{b+c-a}{2} \end{array} \]

Similarly, we find (s-b) = \frac{a+c-b}{2} and (s-c) = \frac{a+b-c}{2}. Hence, we get

    \[ \begin{array}{rclr} A^2 & = & \dfrac{(b+c-a)}{2} \cdot \dfrac{(a+c-b)}{2} \cdot \dfrac{(a+b-c)}{2} \cdot \dfrac{(a+b+c)}{2} & \\ [10pt] & = & (s-a) (s-b) (s-c) s & \\ [10pt] \end{array} \]

so that A = \sqrt{s(s-a)(s-b)(s-c)} as required.

We close with an example of Heron’s Formula.

Example 8.5.3

Example 8.5.3

Compute the area enclosed of the triangle in Example 8.5.1 number 2.

Solution:

We are given a = 4, b=7 and c = 5. Using these values, we find

    \[ s = \frac{1}{2}(4+7+5) = 8\]

so

    \[ \begin{array}{rcl} (s - a) &=& 8 - 4 = 4, \\[4pt] (s-b) &=& 8-7 =1, \text{ and} \\[4pt] (s-c) &=& 8-5=3 \end{array} \]

Per Heron’s Formula,

    \[ \begin{array}{rcl} A &=& \sqrt{s(s-a)(s-b)(s-c)} \\ &=& \sqrt{(8)(4)(1)(3)}\\ &=& \sqrt{96}\\ &=& 4\sqrt{6} \\ &\approx & 9.80 \text{ square units} \end{array} \]

8.5.1 Section Exercises

In Exercises 1 – 10, use the Law of Cosines to compute the remaining side(s) and angle(s) if possible.

  1. a = 7, \; b = 12, \; \gamma = 59.3^{\circ}
  2. \alpha = 104^{\circ}, \; b = 25, \; c = 37
  3. a = 153, \; \beta = 8.2^{\circ}, \; c = 153
  4. a = 3, \; b = 4, \; \gamma = 90^{\circ}
  5. \alpha = 120^{\circ}, \; b = 3, \; c = 4
  6. a = 7, \; b = 10, \; c = 13
  7. a = 1, \; b = 2, \; c = 5
  8. a = 300, \; b = 302, \; c = 48
  9. a = 5, \; b = 5, \; c = 5
  10. a = 5, \; b = 12,; c = 13

In Exercises 11 – 16, use any method to solve for the remaining side(s) and angle(s), if possible.

  1. a = 18, \; \alpha = 63^{\circ}, \; b = 20
  2. a = 37, \; b = 45, \; c = 26
  3. a = 16, \; \alpha = 63^{\circ}, \; b = 20
  4. a = 22, \; \alpha = 63^{\circ}, \; b = 20
  5. \alpha = 42^{\circ}, \; b = 117, \; c = 88
  6. \beta = 7^{\circ}, \; \gamma = 170^{\circ}, \; c = 98.6
  7. Determine the area of the triangles given in Exercises 6, 8 and 10 above.
  8. The hour hand on my antique Seth Thomas schoolhouse clock in 4 inches long and the minute hand is 5.5 inches long. Find the distance between the ends of the hands when the clock reads four o’clock. Round your answer to the nearest hundredth of an inch.
  9. A geologist wants to measure the diameter of an impact crater. From her camp, it is 4 miles to the northern-most point of the crater and 2 miles to the southern-most point. If the angle between the two lines of sight is 117^{\circ}, what is the diameter of the crater? Round your answer to the nearest hundredth of a mile.
  10. From the Pedimaxus International Airport a tour helicopter can fly to Cliffs of Insanity Point by following a bearing of N8.2^{\circ}E for 192 miles and it can fly to Bigfoot Falls by following a bearing of S68.5^{\circ}E for 207 miles.[7] Find the distance between Cliffs of Insanity Point and Bigfoot Falls. Round your answer to the nearest mile.
  11. Cliffs of Insanity Point and Bigfoot Falls from Exercise 20 above both lie on a straight stretch of the Great Sasquatch Canyon. What bearing would the tour helicopter need to follow to go directly from Bigfoot Falls to Cliffs of Insanity Point? Round your angle to the nearest tenth of a degree.
  12. A naturalist sets off on a hike from a lodge on a bearing of S80^{\circ}W. After 1.5 miles, she changes her bearing to S17^{\circ}W and continues hiking for 3 miles. Find her distance from the lodge at this point. Round your answer to the nearest hundredth of a mile. What bearing should she follow to return to the lodge? Round your angle to the nearest degree.
  13. The HMS Sasquatch leaves port on a bearing of N23^{\circ}E and travels for 5 miles. It then changes course and follows a heading of S41^{\circ}E for 2 miles. How far is it from port? Round your answer to the nearest hundredth of a mile. What is its bearing to port? Round your angle to the nearest degree.
  14. The SS Bigfoot leaves a harbor bound for Nessie Island which is 300 miles away at a bearing of N32^{\circ}E. A storm moves in and after 100 miles, the captain of the Bigfoot finds he has drifted off course. If his bearing to the harbor is now S70^{\circ}W, how far is the SS Bigfoot from Nessie Island? Round your answer to the nearest hundredth of a mile. What course should the captain set to head to the island? Round your angle to the nearest tenth of a degree.
  15. From a point 300 feet above level ground in a firetower, a ranger spots two fires in the Yeti National Forest. The angle of depression[8] made by the line of sight from the ranger to the first fire is 2.5^{\circ} and the angle of depression made by line of sight from the ranger to the second fire is 1.3^{\circ}. The angle formed by the two lines of sight is 117^{\circ}. Find the distance between the two fires. Round your answer to the nearest foot.

    Rendered by QuickLaTeX.com

    HINT: In order to use the 117^{\circ} angle between the lines of sight, you will first need to use right angle Trigonometry to find the lengths of the lines of sight. This will give you a Side-Angle-Side case in which to apply the Law of Cosines.

  16. If you apply the Law of Cosines to the ambiguous Angle-Side-Side (ASS) case, the result is a quadratic equation whose variable is that of the missing side. If the equation has no positive real zeros then the information given does not yield a triangle. If the equation has only one positive real zero then exactly one triangle is formed and if the equation has two distinct positive real zeros then two distinct triangles are formed. Apply the Law of Cosines to Exercises 11, 13, and 14 above in order to demonstrate this result.

 

Section 8.5 Exercise Answers can be found in the Appendix … Coming soon


  1. Here, `Side-Angle-Side' means that we are given two sides and the `included' angle - that is, the given angle is adjacent to both of the given sides.
  2. This shouldn't come as too much of a shock. All of the theorems in Trigonometry can ultimately be traced back to the definition of the circular functions along with the distance formula and hence, the Pythagorean Theorem.
  3. after simplifying \ldots
  4. Your instructor will let you know which procedure to use. It all boils down to how much you trust your calculator.
  5. There can only be one obtuse angle in the triangle, and if there is one, it must be the largest.
  6. Or `Hero's Formula.'
  7. Please refer to Section 8.4.1 for an introduction to bearings.
  8. See Exercise 18 in Section 7.2.1 for the definition of this angle.

License

Share This Book