Law Of Cosines

The Law of Cosines expresses the relationship between the length of a triangle's sides and one of its angles. For the cover triangle, the expression is:

c2=a2+b22abcosθc^2 = a^2 + b^2 - 2ab \cos \theta

We can use it to find the length of one side of a triangle if we know the opposite angle and length of the other sides.

c=a2+b22abcosθc = \sqrt{a^2 + b^2 - 2ab \cos \theta}

We can also use it to find the angle, given the length of the triangle's sides.

cosθ=a2+b2c22ab\cos \theta = \frac{a^2 + b^2 - c^2}{2ab}

or

θ=arccos(a2+b2c22ab)\theta = \arccos(\frac{a^2 + b^2 - c^2}{2ab})

An interesting note is that cos(90°)=0\cos(90°) = 0, so when you have a right triangle, we can simplify the expression to:

c2=a2+b2c^2 = a^2 + b^2

...which is the Pythogorean theorem.

KhanAcademyLabs (2013)

References

Khan Academy Labs. Law of cosines. August 2013. URL: https://www.khanacademy.org/math/precalculus/x9e81a4f98389efdf:trig/x9e81a4f98389efdf:law-of-cosines/v/law-of-cosines-example.