Q&A: How does the law of cosines work?

Solve for missing parts of a triangle

Question:

My teacher wants me to find the sides of a triangle, but it's not a right triangle. I know two sides and one of the angles. How can I find the third side? Can I use the Pythagorean Theorem?

Triangle

Answer:

Well, unfortunately the Pythagorean Theorem doesn't apply here because it's not a right triangle. Instead, we can use the Law of Cosines to find the missing side:

$$ c^2 = a^2 + b^2 - 2ab\cos{C} $$

Even though I just said you can't use the Pythagorean Theorem, the formula above looks familiar, right? The Law of Cosines is really a generalized version of the Pythagorean Theorem. If we're given a right triangle, then the angle C is 90 degrees, so its cosine is 0. Plug that into the above equation and the whole extra term disappears.

Anyway, in this case the angle C is 30 degrees, and a is 3 and b is 4. You'll notice that it doesn't matter which we call a or b.

$$ c^2 = a^2 + b^2 - 2ab\cos{C} $$ $$ c^2 = 3^2 + 4^2 - 2*3*4*\cos{30°} $$ $$ c^2 = 25 - 24*\frac{\sqrt{3}}{2} $$ $$ c = 2.05 $$

Of course, if it was a regular right triangle we know that the length of side C would have been 5. In this case, the length is just 2.05 because the angle is a lot smaller.