Trigonometric Law of Cosines is a generalization of Pythagorean Theorem from right triangles to any other type of triangles.

The Law of Cosines states that in any triangle the length of one side can be expressed in terms of two other sides and an angle between them.

Consider a triangle #ΔABC# with sides #AB=c#, #AC=b#, #BC=a# and angle #∠BAC=γ#.

Then the following equality, called the Law of Cosines, is true:

#a²+b²−2·a·b·cos(γ) = c²#

For right triangles with #AB# as a hypotenuse the angle #∠BAC=γ# is the right angle, so #γ=π/2#. Then #cos(γ)=cos(π/2)=0# and the Law of Cosines is exactly the same as Pythagorean Theorem.

*Proof*

Drop an altitude from vertex #A# onto opposite side #BC#. Let's assume that the base of this altitude - point #H# - lies in between vertices #B# and #C#. Other cases are similar.

Triangle #ΔAHB# is a right triangle with catheti #AH# and #BH# and hypotenuse #AB=c#. Using the Pythagorean Theorem we can express the hypotenuse in terms of the catheti:

#AH²+BH²=AB²=c²#

Triangle #ΔAHC# is also a right triangle with catheti #AH# and #CH# and hypotenuse #AC=b#. Let's express catheti in this triangle in terms of a hypotenuse and an angle #∠ACH=γ#:

#AH=b·sin(γ)#

#CH=b·cos(γ)#

The final preparation is to replace the length of #AH# with #b·sin(γ)#, the length of #BH# with a difference between #BC=a# and #CH=b·cos(γ)# in the Pythagorean equation for triangle #ΔAHB#:

#(b·sin(γ))²+(a−b·cos(γ))²=c²#.

Simplifying:

#b²·sin²(γ) + a² − 2·a·b·cos(γ) + b²·cos²(γ) = c²#

or

#b²·[sin²(γ)+cos²(γ)] + a² − 2·a·b·cos(γ) = c²#

or, since #sin²(γ)+cos²(γ) = 1#,

#b² + a² − 2·a·b·cos(γ) = c²#

which is exactly what the Law of Cosines is.

In this proof we relied on the fact that a base of an altitude #H# lies in between vertices #B# and #C#. Other cases and more detailed video presentation of this theorem can be found on Unizor by following the menu *Trigonometry - Simple Trigonometric Identities - Law of Cosine*.