Become a math whiz with AI Tutoring, Practice Questions & more.

HotmathMath Homework. Do It Faster, Learn It Better.

Law of Cosines

Understanding the cosine function is one thing, but we can go a few steps further. By using the principles of this trigonometric ratio and applying something called the "Law of Cosines," we can solve a number of mathematical problems. But what exactly is the Law of Cosines, and how can we use it to our advantage? Let's find out:

What is the Law of Cosines?

The Law of Cosines comes in very handy when we need to find unknown values in an oblique triangle. You might recall that an oblique triangle lacks a 90-degree or "right" angle.

We use the Law of Cosines if we know the values of SAS or SSS, in other words, "side-angle-side" or "side-side-side." You might already be familiar with the Law of Sines. Although we can't use the Law of Sines if we know the values of SAS or SSS, we can use the Law of Cosines in these situations.

But what exactly is the Law of Cosines? Here's how we write it:

${c}^{2}={a}^{2}+{b}^{2}-2abcos\left(C\right)$

You might have noticed that this formula looks similar to the Pythagorean Theorem $\left({a}^{2}+{b}^{2}={c}^{2}\right)$ when the angle C is a right angle because the cosine of 90 degrees is zero. In other words, we can say that the Pythagorean Theorem is a "special case" of the Law of Cosines.

Note that we can rearrange the Law of Cosines to solve for different known values. We can write this formula in two other ways:

${b}^{2}={a}^{2}+{c}^{2}-2accos\left(B\right)$

${a}^{2}={b}^{2}+{c}^{2}-2bccos\left(A\right)$

The Law of Cosines is a more general formula that works for all types of triangles, not just right triangles. It doesn't rely on creating an "imaginary" right triangle, but rather generalizes the relationship between side lengths and angles in any triangle.

Working with the Law of Cosines

Now let's use the Law of Cosines to solve a few math problems.

Consider the following triangle:

Let's assume that we know the following values:

• a is 11
• b is 5
• ∠ C is 20 degrees

We know the values of two sides and one angle (SAS). This means that the Law of Cosines will work here. To find all values, we can use the Law of Cosines and the Law of Sines. Let's give it a try:

In this situation, we know the value of angle C. This means we should use the following variation of the Law of Cosines:

${c}^{2}={a}^{2}+{b}^{2}-2abcos\left(C\right)$

Let's turn this into a slightly different expression n by turning the squared exponent into a radical sign on the other side of the equation:

$c=\sqrt{{a}^{2}+{b}^{2}-2abcos\left(C\right)}$

Now let's plug in our values for a and b:

$\sqrt{{11}^{2}+{5}^{2}-2\left(11\right)\left(5\right)\left(\mathrm{cos}20\right)}$

We are left with a value of approximately 6.53.

Now we know the value of side c.

We still have a few other values to find -- so let's switch over to the Law of Sines.

As you may recall, we write the Law of Sines in the following way:

$\frac{a}{\mathrm{sin}A}=\frac{b}{\mathrm{sin}B}=\frac{c}{\mathrm{sin}C}$

We can use this law to determine the remaining angles:

$\mathrm{sin}A\approx \frac{11\mathrm{sin}\left(20\right)}{6.53}$

$A\approx 144.82°$

$\mathrm{sin}B\approx \frac{5\mathrm{sin}\left(20\right)}{6.53}$

$B\approx 15.2°$

Note that the symbol "≈" means "approximately equal to."

We should also note that angle A is opposite to the longest side of the triangle. Since we know that our triangle is not a right triangle, we need to consider the obtuse angle when we take the inverse. The sine of this obtuse angle is $\frac{11\mathrm{sin}\left(20\right)}{6.53}\approx 0.5761$ .

Let's try to use the Law of Cosines in a slightly different way:

Suppose we know the following values:

• a is 8
• b is 19
• c is 14

In this case, we don't know any of the values for our angles -- but we do know the values for all our sides (SSS). This means we can use the Law of Cosines.

$\mathrm{cos}\left(B\right)=\frac{{b}^{2}-{a}^{2}-{c}^{2}}{-2ac}$

Let's plug in our values:

$\frac{{19}^{2}-{8}^{2}-{14}^{2}}{\left(-2\right)\left(8\right)\left(14\right)}$

We are left with a value of approximately -0.45089

If $\mathrm{cos}\left(B\right)$ is negative, we know that angle B must be an obtuse angle. This is an angle greater than 90 degrees.

$B\approx 116.8°$

We also know that if B is obtuse, then angles A and C must be acute.

Let's switch over to the Law of Sines to find the remaining two angles:

$\frac{a}{\mathrm{sin}A}=\frac{b}{\mathrm{sin}B}=\frac{c}{\mathrm{sin}C}$

Let's plug in our values once more:

$\frac{8}{\mathrm{sin}A}\approx \frac{19}{\mathrm{sin}116.80}=\frac{14}{\mathrm{sin}C}$

$\mathrm{sin}A\approx \frac{8\mathrm{sin}\left(116.8\right)}{19}$

$B\approx 22.08°$

$\mathrm{sin}C\approx \frac{14\mathrm{sin}\left(116.8\right)}{19}$

$C\approx 41.12°$

Technically, that last step wasn't exactly necessary. Why? Because the sum of a triangle's angles always equals 180 degrees. If we know the values of A and B, we can find the value of C:

$180=\angle C+22.08+116.8$

$\angle C+138.88=180$

$\angle C=41.12$

Pair your student with a tutor who can clearly explain the Law of Cosines

The Law of Cosines may prove to be one of the most useful tools at your student's disposal -- but only if they fully understand it. While students often leave class feeling less than confident about concepts like the Law of Cosines, they can reinforce their knowledge with help from a tutor in supplementary, 1-on-1 tutoring sessions. Tutors can explain concepts in new ways and use examples that match your student's hobbies to keep them engaged. Reach out to our Educational Directors today to learn more. Varsity Tutors matches your student with a suitable tutor.

;