The law of cosines is the general form of the Pythagorean theorem, which means it can be used on any triangle. You can see that when , you get , and you’re left with the Pythagorean theorem.
Formula
If and are two sides that span an angle , then
Rule
Example 1
You have a quadrilateral , where , and . Find the diagonal .
The first thing to do is to make an auxiliary figure to help you visualize the problem.
You can see that this fits with the law of cosines in (1). Insert the numbers to find :
Thus .
Example 2
You have a triangle , where , and . Find .
The first thing to do is to make an auxiliary figure, to help you visualize the problem.
You can see that this fits with the law of cosines in (2). Insert the numbers to find .
So the angle is about .