LearnViz Math
Advanced ∿ Trigonometry Topic 47 of 98

Law of Cosines

Generalised Pythagorean theorem for any triangle.

Key idea

Generalised Pythagorean theorem for any triangle.

In depth

c² = a² + b² − 2ab cos C. Use it when you know two sides and the included angle (SAS) or all three sides (SSS). It reduces to Pythagoras when C = 90°.

Worked example

Sides 7, 9, 12: cos C = (49 + 81 − 144)/(2·7·9) = −14/126 ≈ −0.111, C ≈ 96.4°.

Formula

c² = a²+b²−2ab cosC

Real-world uses

Common mistake

Dropping the 2 or the negative sign.

How to learn this

  1. Read the key idea and say it in your own words.
  2. Work through the worked example, then try a similar problem.
  3. Use the interactive lesson’s visual and mini-quiz to check the pattern.

Frequently asked questions

What is Law of Cosines?

Generalised Pythagorean theorem for any triangle. It is a topic at the advanced level in Trigonometry.

What is the formula for Law of Cosines?

The key formula is c² = a²+b²−2ab cosC.

Where is Law of Cosines used in real life?

Real-world examples: Calculating the distance between two ships from their distances to a lighthouse and the angle.

What should I learn before Law of Cosines?

Make sure you are comfortable with Ambiguous Case of Law of Sines, the previous topic in Trigonometry.

What is a common mistake with Law of Cosines?

Dropping the 2 or the negative sign.

How can I practise Law of Cosines?

Open the interactive lesson, play with the visual, then answer the three-question mini-quiz. Getting two right marks the topic complete.

What comes after Law of Cosines?

Move on to Area of Triangle with Sine next.

Related advanced topics in Trigonometry