The Law of Cosines


To totally unlock this section you need to Log-in


Login

The Law of Cosines (also called the Cosine Rule) is very useful for solving triangles. It works for any triangle. The Law of Cosines is most useful when you know two sides a, b, and the included angle.

c2 = a2 + b2 - (2ab x cos(C))

Or when you know all three sides:

cos(C) = (a2 + b2 - c2) / (2ab)

The Law of Cosines

Let's see how to use it in an example:

We know angle C = 37°, a = 8 and b = 11.

The Law of Cosines says: c2 = a2 + b2 - (2ab x cos(C))

Put in the values we know: c2 = 82 + 112 − 2 × 8 × 11 × cos(37°)
Do some calculations: c2 = 64 + 121 − 176 × 0,798...
Take the square root: c = √44,44 = 6,67
Answer: c = 6,67

Another example: suppose you know a = 58, b = 120, and C = 45°. The third side, c, is found using the law of cosines: cos(C) = (a2 + b2 - c2) / (2ab).

582 + 1202 - 2 * 58 * 120 * cos(45) = 7921.074, sqrt(7921.074) = 89.0004.

Now that we know both side c and angle C we can use the Law of Sines to find the other two angles. This gives us:

sin(A) = (a/c) sin(C)

sin(B) = (b/c) sin(C)

Now, watch out! It's possible that the largest angle of a triangle may be obtuse or acute, and you can't tell from the sine of an angle which it is, so here's a word to the wise: find the smaller angle first, knowing it's acute. So we will use the Law of Sines to find the smaller angle A first, using:

sin(A) = (a/c) sin(C).

sin(A) = (58 / 89.0004) sin(45) = 0.46081, so A = 27.43932

Now, finding angle B is easy: B = 180 - C - A, so B = 107.56068.

How to remember this formula?

One way to deal with this problem is to get really good at deriving the formula over and over again. So the talent of "knowing" the law of cosines is to know the Pythagorean Theorem and use it to quickly derive the law of cosines. Here's how:

First draw a triangle ABC, and label the sides opposite each angle a, b, c. Make it so the horizontal "base" is the side labeled a.

The Law of Cosines

Draw an altitude from the base, a, to the apex, A. Label the altitude c(sin(B)).

The Law of Cosines

The altitude divides the base, a, into two segments of length c(cos(B)) and a - c(cos(B)).

The Law of Cosines

Now Pythagoras gives us: b2 = (a - c(cos(B))2 + (c(sin(B)))2.

Multiply out the squares to get: b2 = a2 - 2ac(cos(B)) + c2cos2(B) + c2sin2(B).

Collect the c2 cos2(B) and the c2(sin2(B)) to make c2, so you have b2 = a2 - 2ac(cos(B)+ c2.

This is the final result: b2 = a2 − 2ac(cos(B)) + c2.