# The Law of Cosines

For any triangle:

C is the angle opposite side c

The Law of Cosines (also called the Cosine Rule) says:

c 2 = a 2 + b 2 2ab cos(C)

It helps us solve some triangles. Let’s see how to use it.

### Example: How long is side c . ?

We know angle C = 37Вє, and sides a = 8 and b = 11

## How to Remember

How can you remember the formula?

Well, it helps to know it’s the Pythagoras Theorem with something extra so it works for all triangles:

(only for Right-Angled Triangles) a 2 + b 2 = c 2

(for all triangles) a 2 + b 2 2ab cos(C) = c 2

So, to remember it:

## When to Use

The Law of Cosines is useful for finding:

• the third side of a triangle when we know two sides and the angle between them (like the example above)
• the angles of a triangle when we know all three sides (as in the following example)

### Example: What is Angle C .

The side of length 8 is opposite angle C, so it is side c. The other two sides are a and b.

Now let us put what we know into The Law of Cosines:

Now we use our algebra skills to rearrange and solve:

## In Other Forms

### Easier Version For Angles

We just saw how to find an angle when we know three sides. It took quite a few steps, so it is easier to use the direct formula (which is just a rearrangement of the c 2 = a 2 + b 2 2ab cos(C) formula). It can be in either of these forms:

### Example: Find Angle C Using The Law of Cosines (angle version)

In this triangle we know the three sides:

Use The Law of Cosines (angle version) to find angle C :

### Versions for a, b and c

Also, we can rewrite the c 2 = a 2 + b 2 2ab cos(C) formula into a 2 = and b 2 = form.

Here are all three:

a 2 = b 2 + c 2 2bc cos(A)

b 2 = a 2 + c 2 2ac cos(B)

c 2 = a 2 + b 2 2ab cos(C)

But it is easier to remember the c 2 = form and change the letters as needed !

As in this example:

### Example: Find the distance z

The letters are different! But that doesn’t matter. We can easily substitute x for a, y for b and z for c

Did you notice that cos(131Вє) is negative and this changes the last sign in the calculation to + (plus)? The cosine of an obtuse angle is always negative (see Unit Circle).