You know how to use trigonometric ratios to find missing sides in right triangles. You also know how to use the Law of Sines to find missing sides in non-right triangles given certain information. What about the triangle below? Can you solve for \begin{align*}x\end{align*}?

#### Guidance

The Pythagorean Theorem relates the three sides of a right triangle.

When you increase the measure of \begin{align*}\angle C\end{align*}, the length of the opposite side increases. There is a new relationship between the sides of the triangle.

Similarly, when you decrease the measure of \begin{align*}\angle C\end{align*}, the length of the opposite side decreases. There is a new relationship between the sides of the triangle.

The Law of Cosines takes these relationships one step further. It uses the measure of angle \begin{align*}C\end{align*} to provide an equation that relates the three sides of the triangle with angle \begin{align*}C\end{align*}.

**Law of Cosines: \begin{align*}a^2+b^2-2ab \cos C=c^2\end{align*}**

In the past, you used the Pythagorean Theorem to find missing sides in *right* triangles. With the Law of Cosines, you can find missing sides and angles in *any type* of triangle. In the examples you will learn how to prove the Law of Cosines.

**Example A**

Given \begin{align*}\Delta ABC\end{align*} with lengths \begin{align*}a,b\end{align*} and \begin{align*}c\end{align*}, find \begin{align*}DB\end{align*} in terms of \begin{align*}x\end{align*} and \begin{align*}a\end{align*}. Then, use the Pythagorean Theorem twice to come up with two equations that relate \begin{align*}h\end{align*} with the sides of \begin{align*}\Delta ABC\end{align*}.

**Solution:** \begin{align*}CB=a\end{align*} and \begin{align*}CD=x\end{align*}, so \begin{align*}DB=a-x\end{align*}. You can use the Pythagorean Theorem with both \begin{align*}\Delta ADC\end{align*} and \begin{align*}\Delta ADB\end{align*}.

For \begin{align*}\Delta ADC: x^2+h^2=b^2\end{align*}

For \begin{align*}\Delta ADB: (a-x)^2+h^2=c^2\end{align*}

**Example B**

Use the triangle and equations from Example A to derive the Law of Cosines.

**Solution:** From Example A, you have two equations that you can solve for \begin{align*}h^2\end{align*}.

\begin{align*}x^2+h^2 &= b^2 \rightarrow h^2=b^2-x^2\\ (a-x)^2+h^2 &= c^2 \rightarrow h^2=c^2-(a-x)^2\end{align*}

Set the new equations equal to each other, expand, and simplify:

\begin{align*}b^2-x^2 &= c^2-(a-x)^2\\ b^2-x^2+(a-x)^2 &= c^2\\ b^2-x^2+a^2-2ax+x^2 &= c^2\\ a^2+b^2-2ax &= c^2\end{align*}

You can now consider \begin{align*}x\end{align*} in terms of \begin{align*}\angle C\end{align*}. Within \begin{align*}\Delta ADC\end{align*}, \begin{align*}x\end{align*} is adjacent to \begin{align*}\angle C\end{align*}. \begin{align*}b\end{align*} is the hypotenuse. This is a cosine relationship.

\begin{align*}\cos C &= \frac{x}{b}\\ x &= b \cos C\end{align*}

Substitute this equation for \begin{align*}x\end{align*} into the earlier equation:

\begin{align*}a^2+b^2-2ax &= c^2\\ a^2+b^2-2a (b \cos C) &= c^2\\ a^2+b^2-2ab \cos C &= c^2\end{align*}

Here you have derived the Law of Cosines for acute angles \begin{align*}C\end{align*}. Just like the sine ratio, the **cosine ratio** is actually a **function** that takes *any* angle measure as an input (not just angles between \begin{align*}0^\circ\end{align*} and \begin{align*}90^\circ\end{align*}). One property of the cosine function is that the cosine of supplementary angles will always be opposites. In other words, \begin{align*}\cos \theta=-\cos (180-\theta)\end{align*}. In the practice exercises, you will use this fact to show that the Law of Cosines works even if \begin{align*}C\end{align*} is a right or obtuse angle. *Note: You will study the cosine function in much more detail in future courses!*

**Example C**

Use the Law of Cosines to solve for \begin{align*}c\end{align*}.

**Solution:** 15 and 20 are the values for \begin{align*}a\end{align*} and \begin{align*}b, m \angle C=73^\circ\end{align*}, and \begin{align*}c\end{align*} is the unknown.

\begin{align*}a^2+b^2-2ab \cos C &= c^2\\ 15^2+20^2-2 (15)(20) (\cos 73^\circ) &= c^2\\ 225+400-175.42 &=c^2\\ 449.58 &= c^2\\ c & \approx 21.2\end{align*}

**Concept Problem Revisited**

Notice that in this triangle, the included angle is obtuse. As was explained in Example B, the Law of Cosines works for acute, right, and obtuse angles. The names of the sides do not match \begin{align*}a, b\end{align*}, and \begin{align*}c\end{align*} from the Law of Cosines exactly. What is important is that the angle you choose for \begin{align*}\angle C\end{align*} is the **included angle** of the two sides you choose for \begin{align*}a\end{align*} and \begin{align*}b\end{align*}. Side \begin{align*}c\end{align*} is opposite \begin{align*}\angle C\end{align*}.

In this triangle, the sides 18 and 14 have an included angle of \begin{align*}122^\circ\end{align*}. \begin{align*}x\end{align*} is opposite the \begin{align*}122^\circ\end{align*} angle. Use the Law of Cosines to relate these 4 values.

\begin{align*}18^2+14^2-2(18)(14) \cos 122^\circ &= x^2\\ 324+196+267.08 &= x^2\\ 787.08 &= x^2\\ x & \approx 28.05\end{align*}

#### Vocabulary

The ** cosine (cos)** of an angle within a right triangle is the ratio of the length of the side adjacent to the angle to the length of the hypotenuse.

The ** trigonometric ratios** are sine, cosine, and tangent.

** Trigonometry** is the study of triangles.

\begin{align*}\theta\end{align*}, or ** “theta”,** is a Greek letter. In geometry, it is often used as a variable to represent an unknown angle measure.

The ** Law of Cosines** states that for any triangle with sides \begin{align*}a\end{align*}, \begin{align*}b\end{align*}, and \begin{align*}c\end{align*} and \begin{align*}\angle C\end{align*} opposite from side \begin{align*}c\end{align*}, \begin{align*}a^2+b^2-2ab \cos C=c^2\end{align*}.

#### Guided Practice

Solve for \begin{align*}x\end{align*} or \begin{align*}\theta\end{align*}.

1.

2.

3.

**Answers:**

1. The Law of Cosines states that \begin{align*}a^2+b^2-2ab \cos C=c^2\end{align*}. Remember that the names of your sides might not match \begin{align*}a, b\end{align*}, and \begin{align*}c\end{align*} exactly. What is important is that \begin{align*}\angle C\end{align*} is the **included angle** of sides \begin{align*}a\end{align*} and \begin{align*}b\end{align*}. Side \begin{align*}c\end{align*} is opposite \begin{align*}\angle C\end{align*}.

In this triangle, the sides 11 and 6 have an included angle of \begin{align*}115^\circ\end{align*}. \begin{align*}x\end{align*} is opposite the \begin{align*}115^\circ\end{align*} angle. Use the Law of Cosines to relate these 4 values.

\begin{align*}11^2+6^2-2 (11)(6) \cos 115^\circ &= x^2\\ 121+36+55.8 &= x^2\\ 212.8 &= x^2\\ x & \approx 14.6\end{align*}

2. In this triangle, the sides 8 and 15 have an included angle of \begin{align*}76^\circ\end{align*}. \begin{align*}x\end{align*} is opposite the \begin{align*}76^\circ\end{align*} angle. Use the Law of Cosines to relate these 4 values.

\begin{align*}8^2+15^2-2(8)(15) \cos 76^\circ &= x^2\\ 64+225-58.06 &= x^2\\ 230.94 &= x^2\\ x & \approx 15.2\end{align*}

3. In this triangle, the sides 9 and 13 have an included angle of \begin{align*}\theta\end{align*}. 11 is opposite the angle \begin{align*}\theta\end{align*}. Use the Law of Cosines to relate these 4 values.

\begin{align*}9^2+13^2-2(9)(13) \cos \theta &= 11^2\\ 81+169-234 \cos \theta &= 121\\ 129 &= 234 \cos \theta\\ 0.5513 &= \cos \theta\\ \theta &= \cos^{-1} (0.5513)\\ \theta &= 56.5^\circ\end{align*}

Note that you can use the Law of Cosines to solve for missing angles as well as missing sides.

#### Practice

1. What is the Law of Cosines?

2. When using the Law of Cosines, how do you decide on the values for \begin{align*}a,b,c\end{align*}, and \begin{align*}C\end{align*}?

3. Show that the Law of Cosines is identical to the Pythagorean Theorem when \begin{align*}\angle C\end{align*} is a right angle.

Use the Law of Cosines to solve for \begin{align*}x\end{align*} or \begin{align*}\theta\end{align*}.

4.

5. The following triangle is isosceles. Solve for \begin{align*}x\end{align*} by first figuring out the measure of \begin{align*}\angle A\end{align*}.

6.

7.

8. Attempt to solve for \begin{align*}x\end{align*}. Explain why you get two solutions.

9.

In problems 10-12, you will investigate the relationship between the cosine of supplementary angles.

10. Find \begin{align*}\cos 30^\circ\end{align*} and \begin{align*}\cos 150^\circ\end{align*}. What do you notice?

11. Find \begin{align*}\cos 80^\circ\end{align*} and \begin{align*}\cos 100^\circ\end{align*}. What do you notice?

12. Make a conjecture based on the last two problems. How are the cosine of supplementary angles related? *Note: You will prove this conjecture in future courses!*

In problems 13-16, you will prove that the Law of Cosines works even if \begin{align*}\angle C\end{align*} is an obtuse angle.

13. Use the Pythagorean Theorem to write an equation relating \begin{align*}h,a\end{align*}, and \begin{align*}x\end{align*}. Then, use the Pythagorean Theorem again to write an equation relating \begin{align*}h, x, b\end{align*}, and \begin{align*}c\end{align*}.

14. Use algebra and your work from #13 to show that the following equation is true: \begin{align*}a^2+b^2+2bx=c^2\end{align*}.

15. Find an equation that relates and \begin{align*}\theta, x\end{align*} and \begin{align*}a\end{align*}. Show that your equation is equivalent to \begin{align*}\cos (180-C)=\frac{x}{a}\end{align*}. Solve for \begin{align*}x\end{align*} and substitute this quantity into the equation from #14.

16. The cosine of supplementary angles are opposites. Substitute \begin{align*}-\cos C\end{align*} for \begin{align*}\cos (180-C)\end{align*}. Show that the result is the Law of Cosines.