# Law of Sines and Cosines – Formulas and Examples

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 problems.

##### TRIGONOMETRY

Relevant for

Learning about the law of sines and cosines with examples.

See examples

##### TRIGONOMETRY

Relevant for

Learning about the law of sines and cosines with examples.

See 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 γ.

## Law of sines and cosines – Examples with answers

The following examples 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 problems 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?

We have the following information:

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

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

$latex \frac{a}{\sin(A)}=\frac{b}{\sin(B)}$

$latex \frac{12}{\sin(40)}=\frac{b}{\sin(50)}$

$latex \frac{12}{0.643}=\frac{b}{0.766}$

$latex 15.55=\frac{b}{0.766}$

$latex b=15.55(0.766)$

$latex b=11.9$

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?

We have the following values:

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

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

$latex \frac{a}{\sin(A)}=\frac{b}{\sin(B)}$

$latex \frac{10}{\sin(A)}=\frac{8}{\sin(30)}$

$latex \frac{10}{\sin(A)}=\frac{8}{0.5}$

$latex \frac{10}{\sin(A)}=16$

$latex \sin(A)=\frac{10}{16}$

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

$latex A={{\sin}^{-1}}(\frac{10}{16})$

$latex A=38.7$°

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?

We extract the following values:

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

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

$latex {{a}^2}={{b}^2}+{{c}^2}-2bc~\cos(A)$

$latex {{a}^2}={{12}^2}+{{10}^2}-2(12)(10)~\cos(45)$

$latex {{a}^2}=144+100-169.7$

$latex {{c}^2}=74.3$

$latex c=8.62$

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?

We have the following information:

• a=7
• b=8
• c=9

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

$latex {{c}^2}={{a}^2}+{{b}^2}-2ab~\cos(C)$

$latex {{9}^2}={{7}^2}+{{8}^2}-2(7)(8)~\cos(C)$

$latex 81=49+64-2(7)(8)~\cos(C)$

$latex 81=113-112~\cos(C)$

$latex 112~\cos(C)=32$

$latex C={{\cos}^{-1}}(\frac{32}{112})$

$latex C=73.4$°

Angle C measures 73.4°.

## Law of sines and cosines – Practice problems

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