The cosine rule is a fundamental formula in trigonometry that relates the sides and angles of any triangle. It's a generalization of the Pythagorean theorem that works for all triangles, not just right triangles. For a triangle with sides a, b, and c, and angle C opposite to side c, the formula states that c squared equals a squared plus b squared minus two times a times b times the cosine of angle C.
Let's derive the cosine rule by drawing a height h from point C perpendicular to side AB. This creates a right triangle. Using trigonometry, we can express h as b times sine of angle C, and the distance x from point A to the foot of the height as b times cosine of C. By the Pythagorean theorem in the right triangle, a squared equals h squared plus the quantity c minus x squared. Substituting our expressions for h and x, and simplifying using the Pythagorean identity sine squared plus cosine squared equals 1, we arrive at the cosine rule: a squared equals b squared plus c squared minus 2bc times cosine of angle C.