Length of Side of Triangle as Cosines of Angles

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 = a \cos B + b \cos A$

Proof

 * Side-of-Triangle-by-Cosines.png

Let a perpendicular be dropped from $C$ to $AB$ to meet $AB$ at $D$.

There are two cases:

Foot of Perpendicular is on $AB$
See the diagram on the left.

Foot of Perpendicular is outside $AB$
See the diagram on the right.