The sine rule and the cosine rule
a / sin A = b / sin B = c / sin C, and a² = b² + c² − 2bc · cos A: which one to use, how to solve any triangle, and a solver that draws the result.
First, the rules
For triangles that are not right-angled
Side a is across from angle A, b from B, c from C. Pythagoras and SOH-CAH-TOA need a right angle; these two rules work in every triangle.
Each side divided by the sine of its opposite angle gives the same number (the diameter of the circumscribed circle, 2R).
Two angles given means the third is free.
Also b² = a² + c² − 2ac cos B and c² = a² + b² − 2ab cos C. With A = 90°, cos A = 0 and it is Pythagoras.
A negative cosine means an obtuse angle.
See it
Solve a triangle and watch it drawn to scale
Pick what you know — three sides, two sides and the included angle, or two angles and a side — type the numbers and the rest is computed with the rules above and drawn to scale. Impossible triangles are refused with the reason.
Step by step
Worked examples
A side across an obtuse angle
cosine rule twiceD is on AB and E on AC with |AD| = 3, |AE| = 2, |DE| = 4; |AB| = 6, |AC| = 8. Find |BC|.
Drawn with the real measurements: angle A really is obtuse.
Ask yourself: Are the triangles similar? Check 3/6 against 2/8 — they differ, so no. Both triangles share angle A: find cos A in the small one, use it in the big one.
Show the solution
- Cosine rule in ADE: 4² = 3² + 2² − 2 · 3 · 2 · cos A, so 16 = 13 − 12 cos A and cos A = −14 (A is obtuse).
- Cosine rule in ABC with |AB| = 6, |AC| = 8: x² = 6² + 8² − 2 · 6 · 8 · (−14) = 100 + 24 = 124.
- x = √124 = √4 · 31 = 2√31 ≈ 11.1.
Answer |BC| = 2√31
A side from two angles and a side
sine ruleIn triangle ABC, B = 75°, C = 60° and c = 4√3. Find a.
Ask yourself: Which angle is opposite a? Do you know it? (A, from the angle sum.)
Show the solution
- A = 180° − 75° − 60° = 45°.
- Sine rule, side over the sine of its opposite angle: asin 45° = 4√3sin 60°.
- Insert the values: a√2/2 = 4√3√3/2 = 8.
- a = 8 · √22
Answer a = 4√2
Which rule?
choosingYou are given (i) sides 5, 7 and the 60° angle between them; (ii) sides 4, 6, 8; (iii) angles 40°, 65° and the side between them 10. Which rule solves each, and what comes out first?
Ask yourself: Count what you have: two sides + included angle, three sides, or two angles + a side.
Show the solution
- (i) SAS → cosine rule for the third side: a² = 25 + 49 − 2 · 5 · 7 · 12 = 39, a = √39.
- (ii) SSS → cosine rule for an angle, say the one opposite 8: cos = 16 + 36 − 642 · 4 · 6 = −14, an obtuse angle.
- (iii) ASA → third angle 75°, then the sine rule: asin 40° = 10sin 75° and the same for the other side.
Answer cosine · cosine · sine
Practice: sine and cosine rules
0 / 0Special angles only, so every answer is exact — a side like 4√2, or a cosine like −1/4. Your best score is kept in this browser only.
About this lesson
The law of sines and the law of cosines for triangles that are not right-angled: when to use each, how the cosine rule contains Pythagoras as the special case A = 90°, and how to solve a triangle from three sides, two sides and the included angle, or two angles and a side. Enter your values, see the solved triangle drawn to scale, and practise with exact values.
Part of Learn mathematics · unit Triangles. Check a number with the scientific calculator or draw a function with the function plotter. Everything on this page runs in your browser; nothing you type is sent or stored, and your practice score stays in this browser only. Spotted an error? Tell us.