Law of cosines




In trigonometry, the law of cosines (also known as the cosine formula or cosine rule) relates the lengths of the sides of a triangle to the cosine of one of its angles. Using notation as in Fig. 1, the law of cosines states
where γ denotes the angle contained between sides of lengths a and b and opposite the side of length c.