Skip to content
Home › Math Glossary: Key Terms from 6th to 12th Grade › Law of Cosines: Definition and Example

Law of Cosines: Definition and Example

Math Glossary: Geometry – Mathbot, the Math Made Easy robot coach

Definition: The law of cosines states that c^2 = a^2 + b^2 – 2ab cos C, relating the three sides of any triangle to the angle between two of them.

Grade 10 – Geometry

When do you use it?

When you know two sides and the included angle (SAS), or all three sides (SSS). These are the cases where the law of sines has no complete side-angle pair to start from.

How is it related to the Pythagorean theorem?

If C = 90 degrees, then cos C = 0, and the formula becomes c2 = a2 + b2. So it is a generalization that adds a correction term.

Example. A triangle has sides a = 9 and b = 14 with included angle C = 40 degrees. Then c2 = 81 + 196 – 2(9)(14)cos 40 degrees = 277 – 252(0.7660) = 277 – 193.0 = 84.0, so c is about 9.2. For SSS, solve for the angle: cos C = (a2 + b2 – c2) / (2ab).

What mistakes are common?

Subtracting wrongly by computing (a2 + b2 – 2ab) first and then multiplying by the cosine. The cosine multiplies only the product term. Also, c is the side opposite angle C. An obtuse angle gives a negative cosine, which makes the third side longer.

Example: Sides 5, 7 and included angle 60 degrees give c^2 = 25 + 49 – 35 = 39.

Where to learn it

Related terms

← Back to the math glossary