Law of Cosines

Theorem
Let $$\triangle ABC$$ be a triangle whose sides $$a, b, c$$ are such that $$a$$ is opposite $$A$$, $$b$$ is opposite $$B$$ and $$c$$ is opposite $$C$$.

Then $$c^2 = a^2 + b^2 - 2ab \cos C$$.

Proof 1
We can place this triangle onto a Cartesian coordinate system by plotting:


 * $$A = (b \cos C, b \sin C)$$;
 * $$B = (a,0)$$;
 * $$C = (0,0)$$.

By the distance formula, we have $$c = \sqrt{(b \cos C - a)^2 + (b \sin C - 0)^2}$$.

Now, we just work with this equation:

$$ $$ $$ $$

Proof 2
Let be ABC a triangle the using how radius AB we contruc a circunfernce, now we extend $$BC$$ to $$D$$ ,extend $$AC$$ to $$F$$ ,extend $$CA$$ to $$G$$ ,Extend $$BA$$ to $$E$$ and join $$D$$ with $$E$$



Then using the Chord theorem we have

$$ $$ $$ $$ $$ $$

now how the $$\angle BDE = 90$$º (EB is a diameter) ,then using the definition of Cosine we have

$$ $$ $$

A similar argument can be used to show that the statement holds for the others sides