*** Welcome to piglix ***

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.

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 π/2 radians), then cos γ = 0, and thus the law of cosines reduces to the Pythagorean theorem:

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 a, b, and c in the original formula, the following two formulas also state the law of cosines:

Though the notion of the cosine was not yet developed in his time, Euclid's Elements, dating back to the 3rd century BC, contains an early geometric theorem almost equivalent to the law of cosines. The cases of obtuse triangles and acute triangles (corresponding to the two cases of negative or positive cosine) are treated separately, in Propositions 12 and 13 of Book 2. Trigonometric functions and algebra (in particular negative numbers) being absent in Euclid's time, the statement has a more geometric flavor:


...
Wikipedia

...