# Law of cosines

Main Article
Discussion
Related Articles  [?]
Bibliography  [?]
Figure 1: A generic triangle with sides of length ${\displaystyle a}$, ${\displaystyle b}$, and ${\displaystyle c}$ opposite the angles ${\displaystyle A}$, ${\displaystyle B}$, and ${\displaystyle C}$.
${\displaystyle c^{2}=\left(a^{2}+b^{2}\right)-2ab\cos(C)}$
where ${\displaystyle a}$, ${\displaystyle b}$, and ${\displaystyle c}$ are the lengths of the sides of the triangle opposite to angles ${\displaystyle A}$, ${\displaystyle B}$, and ${\displaystyle C}$, respectively (see Figure 1).