Navigation 
 Home 
 Search 
 Site map 

 Contact Graeme 
 Home 
 Email 
 Twitter

 Skip Navigation LinksMath Help > Trigonometry > Law Of Cosines

Law of Cosines:  c² = a² + b� − 2ab cos C

Perhaps you have the same trouble as me: I find it very hard to remember formulas.  So I've developed some coping mechanisms that you might also find helpful.  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 (1) know the Pythagorean Theorem and (2) use it to quickly derive the law of cosines.

Here's how:

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.

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

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

Now Pythagoras gives us b² =  (a - c cos B)² + (c sin B)²

Multiply out the squares to get b² = a² - 2ac cos B + c² cos² B + c² sin² B

Collect the c² cos² B and the c² sin² B to make c², so you have b² = a² - 2ac cos B + c² 

 This is the final result: b² = a² − 2ac cos B + c² 

Does that seem like a lot of work? Maybe, but it's the sort of thing you can practice to the point where you can do it in less than a minute whenever you need it.  By the way, the two given sides are most often given as a and b, and the included angle is then C.  I just didn't draw the diagram that way, so my result uses different letters. . . . . . . maybe someday I'll redo the diagrams, but it's not a high priority for me.  When or if I get around to it, the new final result becomes:

 The Law of Cosines:  c² = a² + b� − 2ab cos C 

More about the Law of Cosines can be found here.

Related pages in this website:

Triangles -- formulas for area and circumscribed and inscribed circles

Law of Sines: a/(sin A) = b/(sin B) = c/(sin C) = diameter of circumcircle

Trig Equivalences -- cos(x) = 1 - 2sin²(x/2) = 2cos²(x/2) - 1 

Heron's formula for the area of a triangle, if all you know is the lengths of its sides.


The webmaster and author of this Math Help site is Graeme McRae.