##### Wiktionary

**law of cosines**

n. (context trigonometry English) A statement that relates the lengths of the side of a triangle to the cosine of one of its angle.

##### Wikipedia

**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

*c* = *a* + *b* − 2*a**b*cos*γ*,

where denotes the angle contained between sides of lengths and and opposite the side of length .

The law of cosines generalizes the Pythagorean theorem, which holds only for right triangles: if the angle is a right angle (of measure 90 °, or radians), then , and thus the law of cosines reduces to the Pythagorean theorem:

*c* = *a* + *b*.

The law of cosines is useful for computing the third side of a triangle when two sides and their enclosed angle are known, and in computing the angles of a triangle if all three sides are known.

By changing which sides of the triangle play the roles of , , and in the original formula, the following two formulas also state the law of cosines:

*a* = *b* + *c* − 2*b**c*cos*α*,

*b* = *a* + *c* − 2*a**c*cos*β*.