Free maths tool · Level: Ages 15 to 17
Sine rule and cosine rule
Pythagoras only works in a right-angled triangle. Drag the corners and see what takes its place for every other triangle.
The sine rule says a/sin A = b/sin B = c/sin C in any triangle, so each side pairs up with the angle facing it. The cosine rule says c² = a² + b² - 2ab·cos C. Use the cosine rule when you know two sides and the angle between them. Use the sine rule when you know a side together with the angle opposite it.
The cosine rule is Pythagoras with a correction
Set angle C to 90 degrees and watch the term -2ab·cos C. It goes to zero, because cos 90° = 0, and what is left is c² = a² + b². That is Pythagoras theorem, exactly.
Now make C sharper and the term goes negative: the opposite side comes out shorter than Pythagoras would predict. Make the angle obtuse and the term goes positive, so the side gets longer. The cosine rule is not a second formula to memorise, it is the same formula with a correction for angles that are not right angles.
Why the three ratios are always equal
Switch the tool to the sine rule and the three ratios a/sin A, b/sin B and c/sin C sit side by side. Drag a corner anywhere you like and they stay equal.
That shared number is not a coincidence. It is the diameter of the circle through all three corners. That is why the longest side always faces the largest angle, which makes a quick sanity check on any answer.
Which rule should you use?
Look at what you were given. Two sides with the angle between them, or all three sides: cosine rule. A side with the angle directly opposite it, plus one more fact: sine rule.
One trap with the sine rule: sin 30° and sin 150° are both 0.5, so your calculator hands back only one of the two possible angles. If your sketch looks obtuse but the calculator gives you an acute angle, subtract from 180 degrees. Drag a corner in the tool until an angle passes 90 degrees to see when this matters.
Are triangles still hard work?
A tutor works through the questions you are stuck on and shows which rule belongs where.
Frequently asked questions
- What is the sine rule?
- In any triangle, a/sin A = b/sin B = c/sin C. Every side is in the same ratio to the sine of the angle facing it. You use it when you know a side together with its opposite angle.
- What is the cosine rule?
- c² = a² + b² - 2ab·cos C, where C is the angle between sides a and b. Use it when you know two sides and the angle between them, or all three sides and want an angle.
- Does the cosine rule work in a right-angled triangle?
- Yes. At C = 90° the cosine is zero, the last term disappears and c² = a² + b² is what remains. Pythagoras is simply the special case of the cosine rule.
- How do you find an angle from three sides?
- Rearrange the cosine rule to cos C = (a² + b² - c²) / (2ab) and take the inverse cosine. The angle that comes out is always between 0 and 180 degrees, so the two-possible-angles problem does not arise here.
- Why does my calculator sometimes give the wrong angle?
- Because an acute and an obtuse angle can share the same sine. Inverse sine always returns the acute one. If you suspect an obtuse angle, work out 180 degrees minus the answer and check that triangle against your sketch.
More interactive maths tools
- Derivative and tangent →Drag the point and watch the tangent tilt, with the secant closing in on it.
- Integral and Riemann sum →Push the rectangle count up and watch the sum close in on the exact area.
- Boxplot and spread →Type in your own numbers and watch the boxplot, the quartiles and both standard deviations move live.