The law of cosines is an equation that relates the lengths of two sides of a triangle and their intermediate angle. We can apply the law of cosines when we want to find the length of the third side of a triangle and we know the other two sides and their intermediate angle. Furthermore, we can also apply the law of cosines when we want to find an angle and we have the lengths of the three sides of the triangle.

Here, we will do a review of the law of cosines. Then, we will use a formula to solve some practice problems.

## Summary of the law of cosines

The law of cosines has different variations depending on the sides and angles that we consider. The following are the formulas for the law of cosines of a triangle ABC:

where, *a, b, c* represent the lengths of the sides of the triangle and *α, β, γ* represent the angles of the triangle ABC shown in the diagram below.

The law of cosines can be applied when we have the following situations:

- We have the lengths of two sides of a triangle and the angle between these sides and we want to find the length of the third side.
- We have the lengths of the three sides of the triangle and we want to find the measure of any angle.

For example, in the triangle above, we can apply the law of cosines if we have the lengths of sides *a* and *b* and the measure of angle *γ* and we want to find the length of *c*. Also, we can apply the law of cosines if we have the lengths of *a, b, c* and we want to find the measure of any angle.

## Law of cosines – Examples with answers

The formulas for the law of cosines are used to solve the following application examples. Each example has its respective answer, but try to solve the problems yourself before looking at the answer.

**EXAMPLE 1**

In a triangle we have the lengths a=8 and b=9 and the angle C=50°. What is the length of *c*?

##### Solution

We have the following values:

- a=8
- b=9
- C=50°

We find the length of side *c* using the law of cosines:

The length of *c* is 7.24.

**EXAMPLE 2**

In a triangle, we have the lengths b=12 and c=10 and the angle A=35°. What is the length of side *a*?

##### Solution

We have the following information:

- b=12
- c=10
- A=35°

Using the law of cosines with these values, we have:

The length of *a* is 6.88.

Start now: Explore our additional Mathematics resources

**EXAMPLE 3**

What is the measure of angle A in a triangle that has sides of length *a*=7, *b*=8, and *c*=6?

##### Solution

We have the following lengths:

- a=7
- b=8
- c=6

This is an example where we have to use the law of cosines to find an angle. Therefore, we have:

°

Angle A measures 57.9°.

**EXAMPLE 4**

If we have sides *a*=9, *b*=11, and *c*=10 in a triangle, what is the measure of angle C?

##### Solution

We have the following data:

- a=9
- b=11
- c=10

We use these values in the law of cosines and solve for angle C:

°

Angle C measures 59°.

## Law of cosines – Practice problems

Apply the different formulas of the law of cosines to solve the following problems. Select an answer and check it to see if you got the correct answer.

## See also

Interested in learning more about the law of sines and cosines? Take a look at these pages:

### Learn mathematics with our additional resources in different topics

**LEARN MORE**