Trigonometry
Intermediate

Law of Cosines

Generalises Pythagoras to any triangle.

Formula

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2ab\cos C

Variables

a,b,cSides
CAngle opposite c

Example

a=3,b=4,C=90° ⇒ c=5

Did You Know?

The law of cosines is the Pythagorean theorem generalized to any triangle — the extra cosine term vanishes at 90°.