Law of sines and law of cosines, with examples
Solve any triangle, not just right ones: when to use the law of sines and when to use the law of cosines, with worked examples.
SOH CAH TOA only works in right triangles. These two laws work in any triangle (side a is opposite angle A, and so on).
Law of sines
a / sin A = b / sin B = c / sin C
Use it when you know an angle and its opposite side, plus one more piece.
A = 40°, B = 60°, a = 10. Then C = 180° − 40° − 60° = 80°.
- b = 10 × sin 60° / sin 40° ≈ 10 × 0.8660 / 0.6428 ≈ 13.47
- c = 10 × sin 80° / sin 40° ≈ 9.848 / 0.6428 ≈ 15.32
Law of cosines
c² = a² + b² − 2ab cos C
Use it when you know two sides and the angle between them, or all three sides.
a = 7, b = 9, C = 50°: c² = 49 + 81 − 126 × cos 50° ≈ 130 − 80.99 = 49.01, so c ≈ 7.00.
A check that it makes sense
If C = 90°, cos C = 0 and the law of cosines becomes a² + b² = c². It's Pythagoras with a correction for non-right angles.
Which one?
- Have a matching angle–side pair? Law of sines.
- Two sides and the included angle, or three sides? Law of cosines.
Practice it free
Watch the full lesson and try questions with new numbers every time, with the worked steps shown if you get one wrong.