The cosine law, also called the cosine rule, links the three sides of any triangle to one angle: a² = b² + c² − 2bc cos A. Use it to find a side from two sides and the angle between them, or an angle from three sides.
Pythagoras, with a fix for angles that are not 90°.
a² = b² + c² − 2bc cos A
Hello, curious mind!
What is the cosine law?
The cosine law says a² = b² + c² − 2bc cos A, for any triangle. A is an angle. Side a is the side opposite it. Sides b and c are the two sides that meet at A.
It works for any corner: b² = a² + c² − 2ac cos B, and so on.
To find an angle, turn the formula round:
cos A = (b² + c² − a²) ÷ 2bc
Why the extra term? When A = 90°, cos A = 0 and the formula becomes Pythagoras’ theorem, a² = b² + c². Below 90°, cos A is positive, so a is shorter. Above 90°, cos A is negative, so a is longer.
Remember this
The angle sits between b and c, and opposite a.
How to use the cosine law: 3 worked examples
Example 1: find a side (two sides and the angle between)
On a map (made-up numbers), a metro station is 7 km from home and a mall is 10 km from home, with 52° between the two directions. How far apart are they?
The 52° angle sits between the two known sides: b = 7, c = 10.
a² = 49 + 100 − 2 × 7 × 10 × cos 52° = 149 − 140 × 0.6157 = 149 − 86.19 = 62.81.
a ≈ 7.93 km.
Example 2: find an angle (three sides)
A triangle has sides 5, 7 and 8 cm. Find the angle opposite 7 cm.
Here a = 7, and b and c are 5 and 8.
cos A = (25 + 64 − 49) ÷ (2 × 5 × 8) = 40 ÷ 80 = 0.5.
A = 60°.
Example 3: an obtuse angle
Two sides of a triangle are 6 cm and 10 cm. The angle between them is 120°. Find the third side.
cos 120° = −0.5. Keep the minus sign.
a² = 36 + 100 − 2 × 6 × 10 × (−0.5) = 136 + 60 = 196.
a = 14 cm. Minus times minus is plus.
Sine rule or cosine rule?
Look at what you know. S is a side, A is an angle.
| You know | Use | To find |
|---|---|---|
| SAS: two sides, angle between | Cosine rule | Third side |
| SSS: all three sides | Cosine rule | Any angle |
| ASA or AAS | Sine rule | A side |
| SSA: two sides, angle not between | Sine rule (may give two triangles) | An angle |
| A right angle | Pythagoras or SOH CAH TOA | Sides and angles |
Watch the side grow with the angle
Keep b = 6 and c = 8:
- A = 60°: a² = 100 − 48 = 52, so a ≈ 7.21.
- A = 90°: a² = 100, so a = 10. This is Pythagoras.
- A = 120°: a² = 100 + 48 = 148, so a ≈ 12.17.
Three sides? Start with the largest angle
Only the angle opposite the longest side can be obtuse. It is obtuse when the longest side squared is more than the other two squares added. For 5, 7, 8 it is about 81.79°. Then the sine rule is safe for the other two.
Common cosine law mistakes
- Using an angle that is not between the two sides. If it is not where b and c meet, use the sine rule first.
- Calculator in radians. In Example 1, cos 52 in radians is −0.1630, so a ≈ 13.11 km, not 7.93 km. Check for DEG.
- Multiplying the whole bracket by cos A. (49 + 100 − 140) × cos 52° gives a ≈ 2.35 km. Only the 2bc term takes the cosine.
- Losing the minus sign for an obtuse angle. In Example 3, using +0.5 for cos 120° gives a ≈ 8.72 cm, not 14 cm.
Check this with the Free BMI Maths Test
- Uses an angle that is not between the two sides: CNC, concept not clear.
- Leaves the calculator in radians: DRC, did not read carefully.
- Multiplies the whole bracket by cos A: CMT, calculation mistake.
- Drops the minus sign of an obtuse angle’s cosine: CNC, concept not clear.
The Free BMI Maths Test finds which of the 6 mistake types your child makes, and their real maths level. About the Free BMI Maths Test
Test prep corner
The cosine law in JEE Main: the vector form
NTA’s JEE Main 2027 maths topic list does not name the cosine rule. But Unit 12, Vector Algebra, names the scalar product, and |a − b|² = |a|² + |b|² − 2|a||b| cos θ is the cosine law in vector form. These are JEE-style questions, not past questions.
JEE-style: |a| = 3, |b| = 5 and |a + b| = 7. What is the angle between a and b? (A) 30° (B) 60° (C) 120° (D) 150°
|a + b|² = 9 + 25 + 2 × 3 × 5 cos θ = 49, so cos θ = 15 ÷ 30 = 0.5 and θ = 60°, answer (B). Trap: (C) uses the minus form, which belongs to |a − b|.
JEE-style: |a| = 2, |b| = 3 and the angle between them is 60°. Find |2a − b|.
|2a − b|² = 4 × 4 + 9 − 2 × 4 × 3 × 0.5 = 16 + 9 − 12 = 13. So |2a − b| = √13. Trap: a plus sign gives √37.
For a mixed set with full working, try our JEE-style maths questions and answers.
On the SAT? College Board lists “Right triangles and trigonometry”. The SAT reference sheet gives Pythagoras, not the cosine law.
Facts checked on 14 November 2026 in NTA’s JEE Main 2027 topic list and on satsuite.collegeboard.org.
Quick check: 5 cosine law questions
1. b = 3, c = 8 and A = 60°. What is a?
Yes! 9 + 64 − 24 = 49, so a = 7.
Not quite. That is Pythagoras. The angle is 60°, not 90°.
Not quite. Sides do not subtract.
2. A triangle has sides 3, 5 and 7. What is its largest angle?
Not quite. Check the sign: cos A comes out negative.
Not quite. 49 is more than 9 + 25, so the angle is obtuse.
Yes! cos A = (9 + 25 − 49) ÷ 30 = −0.5.
3. You know two angles and one side. Which rule finds another side?
Not quite. That needs two sides.
Yes! ASA and AAS go to the sine rule.
Not quite. Pythagoras needs a right angle.
4. A triangle has sides 4, 5 and 7. Is its largest angle acute, right or obtuse?
Yes! 49 is more than 16 + 25 = 41.
Not quite. A right angle needs 49 = 41.
Not quite. Acute needs 49 less than 41.
5. What does the cosine law become when A = 90°?
Not quite. cos 90° is 0, not 1.
Yes! cos 90° = 0. That is Pythagoras.
Not quite. Sides do not add like that.
Got 2 or fewer right? Book the Free BMI Maths Test to find the cause.
Questions people ask about the cosine law
What is the cosine law?
For any triangle, a² = b² + c² − 2bc cos A. A is the angle between sides b and c.
When do I use the cosine rule?
With two sides and the angle between them, or all three sides.
How do I find an angle with it?
Use cos A = (b² + c² − a²) ÷ 2bc, then take the inverse cosine. For sides 5, 7 and 8, the angle opposite 7 is 60°.
Is the cosine rule on the SAT?
College Board lists right triangle trigonometry, not the cosine rule, and the SAT reference sheet does not give it.
What is the difference between the sine rule and the cosine rule?
The sine rule pairs each side with the sine of its opposite angle. The cosine rule links all three sides to one angle.
Keep exploring
Right formula, wrong angle?
The Free BMI Maths Test finds your child’s real maths level and the reason for each mistake.
