# Law of sines and cosines

The laws of sine and cosine are relations that allow us to find the length of one side of a triangle or the measure of one of its angles. Depending on the information we have available, we can use the law of sines or the law of cosines. The law of sines relates the length of one side to the sine of its angle and the law of cosines relates the length of two sides of the triangle to their intermediate angle. Here, we will learn about the formulas of the law of sines and the law of cosines. We will learn to differentiate the situations in which we can use the law of sines from the situations in which we can use the law of cosines. In addition, we will see some practice exercises.

###### TRIGONOMETRY

#### Relevant for...

Learning about the the law of sines and cosines with examples.

###### TRIGONOMETRY

#### Relevant for...

Learning about the the law of sines and cosines with examples.

## What is the formula for the law of sines?

The law of sines formula is an equation that relates the sides of a triangle to the sines of their respective angles. The following is the formula for the law of sines:

where, *a, b, c* represent the lengths of the sides of the triangle and A, B, C represent the angles of the triangle. The angles denote their opposite sides. This means that *a* is the side opposite angle A, *b* is the side opposite angle B and *c* is the side opposite angle C as we can see in the following triangle.

## What is the formula for the law of cosines?

The formula for the law of cosines is an equation that relates the lengths of two sides of a triangle to the angle between the two sides. The formula for the law of cosines is:

where, *a, b, c* represent the lengths of the sides of the triangle and *α, β, γ* represent the angles of the triangle as shown in the following image.

## When to use the law of sines and when to use the law of cosines?

The law of sines can be used when we have the following situations:

**•** We want to find the length of one side and we know the measure of two angles and the length of one side.

**•** We want to calculate an angle and we know the measure of two sides and an angle.

To use the law of sines, we have to relate the angles to their opposite sides. For example, we can apply the law of sines in the following triangle if we want to find the length of side *b* and we know the measure of angles A, B and the length of side *a*. Alternatively, we can also apply the law of sines if we want to find the measure of angle A and know the lengths of the sides *a, b,* and the measure of angle B.

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

**•** We want to find the length of one side and we know the lengths of two sides and their intermediate angle.

**•** We want to find the measure of any angle and we know the lengths of the three sides of the triangle.

To use the law of cosines, we always use the angle between the two known sides. For example, we can apply the law of cosines if we want to find the length of side *c* in the triangle below and we know the lengths of *a* and *b* and the measure of angle γ.

## Examples with answers of the law of sines and cosines

The following exercises are solved using the laws of sine and cosine. Each exercise has its respective answer, but it is recommended that you try to solve the exercises yourself before looking at the solution.

**EXAMPLE 1**

We have a triangle with the angles A=40° and B=50° and we have the side *a*=12. What is the length of side *b*?

##### Solution

- A=40°
- B=50°
- a=12

In this case, we can use the law of sines. Therefore, we have:

The length of *b* is 11.9.

**EXAMPLE 2**

What is the measure of angle A in a triangle if we have *a*=10, B=30°, and *b*=8?

##### Solution

- a=10
- B=30°
- b=8

We use the law of sines again. Therefore, we have:

Now, we find the measure of the angle using the inverse sine function:

°

Angle A measures 38.7°.

**EXAMPLE 3**

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

##### Solution

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

In this case, we can use the law of cosines to find the length of *a*:

The length of *a* is 8.62.

**EXAMPLE 4**

In a triangle, we have the sides *a*=7, *b*=8, and *c*=9. What is the measure of angle C?

##### Solution

- a=7
- b=8
- c=9

Again, we use the law of cosines. Therefore, when solving for angle C, we have:

°

Angle C measures 73.4°.

## Law of sines and cosines – Exercises to solve

Use the law of sines and the law of cosines to solve the following practice exercises. Select an answer and click “Check” to check that you got the correct answer.

## See also

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

- Law of Sines – Formula, Proof and Examples
- Law of Cosines – Formula, Proof and Examples
- Examples of Law of Sines
- Examples of Law of Cosines