The Law of Cosines
The Pythagorean theorem is basically a generalization of the Law of Cosines. The Law of Cosines is used in any triangle when given three sides (SSS) or two sides and their included angle (SAS). Using the same triangle as earlier, the Law of Cosines states the following:
Those on the left are used to find a side length and those on the right are used to find the size of an angle. The proof for the Law of Cosines involves the triangle below that has three acute angles.

B has the coordinates (c,0) and C has the coordinates (x,y) where x=bcosA and y=bsinA
Using the distance formula, the side a has length of ![]()
From this point the equation can be altered using substitution.
![]()

This is one form of the Law of Cosines. The others can be found using the same method. Now, in this situation what happens if A is 90°? The cosine of 90° is 0. This leaves the equation a2+b2=c2, which is the Pythagorean theorem. (Larson and Hostetler 522-524)