What is the cosine rule?
The cosine rule states c² = a² + b² − 2ab·cos C for any triangle, where C is the angle opposite side c. It links all three sides with one angle.
// maths › Non-Right-Angle Trigonometry
Use the cosine rule c squared equals a squared plus b squared minus 2ab cos C to find a third side from two sides and the included angle, or any angle from all three sides, in degrees or radians, with a triangle whose angle links back to Pythagoras at ninety degrees.
c² = a² + b² − 2ab·cos C
The cosine rule states c² = a² + b² − 2ab·cos C for any triangle, where C is the angle opposite side c. It links all three sides with one angle.
Use the cosine rule when you have two sides and the included angle (SAS) to find the third side, or all three sides (SSS) to find an angle — cases the sine rule cannot start from.
With a = 5, b = 7, and the included angle C = 60°: c² = 25 + 49 − 2·5·7·cos 60° = 74 − 35 = 39, so c = √39 ≈ 6.24. The same angle in radians is 60° = π/3 ≈ 1.0472 rad; switch the Degrees/Radians toggle and the working updates to match.
When C = 90° (π/2 ≈ 1.5708 rad), cos C = 0 and the formula reduces to c² = a² + b² — exactly Pythagoras' theorem. The cosine rule is its generalisation to any angle.
Navigators and surveyors compute distances across awkward terrain, engineers analyse forces and frameworks, and it is used in GPS, robotics arm geometry, and computer graphics.