Cosine rule
Relate sides and included angle in any triangle.
This public page keeps the free explanation visible and leaves premium worked solving, advanced walkthroughs, and saved study tools inside the app.
Core idea
Overview
The Cosine Rule is an extension of the Pythagorean theorem that relates the lengths of the sides of any triangle to the cosine of one of its angles. It allows for the calculation of unknown side lengths or angles in non-right-angled triangles using the Side-Angle-Side (SAS) or Side-Side-Side (SSS) configurations.
When to use: Use this rule when you know two sides and the angle between them (SAS) to find the missing third side. It is also the primary method to find any angle of a triangle when all three side lengths (SSS) are known. This rule is essential when the Sine Rule cannot be applied because no side-angle pair is complete.
Why it matters: This formula is foundational for navigation and surveying, allowing for the calculation of distances between points that are not directly reachable. It is also used in computer graphics and robotics to determine the necessary joint angles for limb positioning or camera orientation in 3D space.
Symbols
Variables
a = Side a, b = Side b, C = Angle C, c = Side c
Walkthrough
Derivation
Derivation of the Cosine Rule
The cosine rule generalises Pythagoras’ theorem to any triangle. It is derived by splitting the triangle with a perpendicular and using algebra.
- Triangle has sides a, b, c opposite angles A, B, C.
- Drop a perpendicular from C to side c, splitting it into x and (c-x).
Apply Pythagoras to the Two Right Triangles:
The perpendicular height creates two right-angled triangles where Pythagoras applies.
Expand the Second Equation:
Expand to remove the bracket.
Substitute Using b^2 = h^2 + x^2:
Replace with using the first equation.
Use Cosine to Express x:
In the left triangle, x is adjacent to angle A with hypotenuse b.
Substitute to Get the Cosine Rule:
Substituting gives the final cosine rule.
Result
Source: OCR A-Level Mathematics — Pure (Trigonometry)
Free formulas
Rearrangements
Solve for
Make c the subject
Rearrange the Cosine Rule to make side 'c' the subject of the equation.
Difficulty: 2/5
Solve for
Make C the subject
To make C the subject of the Cosine Rule, first isolate the term containing cos C, then divide to find cos C, and finally apply the inverse cosine function.
Difficulty: 4/5
The static page shows the finished rearrangements. The app keeps the full worked algebra walkthrough.
Visual intuition
Graph
The graph follows an inverse cosine function, creating a smooth, downward-sloping curve that reflects the relationship between side c and angle C. For a student, this shape shows that as the side length c increases, the angle C must also increase to maintain the triangle's geometry. The most important feature is the curve's restricted domain, which demonstrates that side c must remain within a specific range relative to sides a and b for a valid triangle to exist.
Graph type: sinusoidal
Why it behaves this way
Intuition
Imagine a triangle where the length of one side is determined by the other two sides and how 'open' or 'closed' the angle between those two sides is, adjusting from a simple right-angle relationship.
Signs and relationships
- -2ab cos C: This term modifies the Pythagorean sum ( + ). The negative sign means that when C is acute (cos C > 0), the term subtracts, making c shorter than in a right triangle.
Free study cues
Insight
Canonical usage
All side lengths (a, b, c) must be expressed in the same unit. The angle C can be in degrees or radians, but the cosine function itself yields a dimensionless value.
Common confusion
A common mistake is using inconsistent units for the side lengths (e.g., mixing meters and centimeters without conversion) or incorrectly setting the calculator mode (degrees vs. radians) when evaluating cos C.
Dimension note
The term cos C is dimensionless, representing a ratio. The overall equation, however, equates quantities of length squared.
Unit systems
One free problem
Practice Problem
A triangle has two sides of length 5 cm and 8 cm. If the angle between these two sides is 60°, calculate the length of the third side.
Solve for:
Hint: Plug the sides into the formula and remember that the cosine of 60 degrees is 0.5.
The full worked solution stays in the interactive walkthrough.
Where it shows up
Real-World Context
Calculating distance between two ships.
Study smarter
Tips
- Always designate the side opposite the angle you are using or finding as 'c'.
- Confirm your calculator is set to Degrees or Radians as required by the problem.
- Calculate the product term (2ab cos C) entirely before subtracting it from the sum of squares.
- If cos C is negative, the angle C is obtuse (greater than 90 degrees).
Avoid these traps
Common Mistakes
- Order of operations in a²+b²-2ab...
- Sign errors with cos(obtuse).
Common questions
Frequently Asked Questions
The cosine rule generalises Pythagoras’ theorem to any triangle. It is derived by splitting the triangle with a perpendicular and using algebra.
Use this rule when you know two sides and the angle between them (SAS) to find the missing third side. It is also the primary method to find any angle of a triangle when all three side lengths (SSS) are known. This rule is essential when the Sine Rule cannot be applied because no side-angle pair is complete.
This formula is foundational for navigation and surveying, allowing for the calculation of distances between points that are not directly reachable. It is also used in computer graphics and robotics to determine the necessary joint angles for limb positioning or camera orientation in 3D space.
Order of operations in a²+b²-2ab... Sign errors with cos(obtuse).
Calculating distance between two ships.
Always designate the side opposite the angle you are using or finding as 'c'. Confirm your calculator is set to Degrees or Radians as required by the problem. Calculate the product term (2ab cos C) entirely before subtracting it from the sum of squares. If cos C is negative, the angle C is obtuse (greater than 90 degrees).
References
Sources
- Wikipedia: Law of cosines
- Britannica: Law of Cosines
- Stewart, J. (2012). Calculus: Early Transcendentals. Cengage Learning.
- Wikipedia: Euclidean geometry
- OCR A-Level Mathematics — Pure (Trigonometry)