Derivation of the Law of Cosines
The best way to approach this is to draw a picture. We shall draw two pictures, one for each possibility: (i) the angle (angle C) is acute or (ii) the angle is obtuse. Regardless, the calculations are the same.
In both pictures, one vertex (angle C) is at the origin, the vertex of angle A is at (b,0), and the vertex of angle B is at (acos C, asin C).
To justify this, think of point B lying on a circle with radius a. The x-coordinate is expressed as the radius times the cosine of the angle while the y-coordinate is expressed as the radius times the sine of the angle.
Now, let’s use the distance formula to find the length of c2. The distance formula is
. In this case, our two points are (b,0) and (acos C, asin C) and our distance is the length of the hypotenuse, c.
So, using the above information, we get the following:
And so, we have shown one case. We could repeat the above steps for a2 and for b2, by drawing similar triangle, but the above diagram suffices. (Just label angles differently.) Therefore, we are done.
Note that the placement of the triangle simplified the calculations, but the triangle could be positioned anywhere. Since the placement was arbitrary, our results are true, even though we put it at origin as was described above.