GCSE, A-Level & IB Maths
The cosine rule
a² = b² + c² − 2bc cos A — use this form to find a side. Rearranged, cos A = (b² + c² − a²) ÷ 2bc finds an angle. Reach for it when you know two sides and the angle between them, or all three sides. In every other case you want the sine rule.
The cosine rule connects all three sides of a triangle to one of its angles. It works in any triangle, not just right-angled ones, and that is the whole point of it.
Before anything else, get the labelling straight, because every mistake on this topic starts here.
Scroll the diagram sideways →
With that in place, here is the rule in the form you use to find a side:
Use this when you know two sides and the angle between them.
And here it is rearranged to find an angle:
Use this when you know all three sides.
They are the same statement. The second is just the first with cos A made the subject, and it is worth doing that rearrangement yourself once so you trust it. Which of these you are handed in the exam depends entirely on your qualification, and the next section sets that out.
The letters are interchangeable, as long as you keep each pair together. If the angle you want is B, write b² = a² + c² − 2ac cos B. The squared side on the left always matches the angle on the right, and the two sides in the 2bc term are the other two.
The side you are solving for and the angle you are using must be opposite each other. Everything else follows.
This is worth knowing before you spend any time memorising, and the answer is different for every qualification. No revision site seems to say so, which is why students arrive at A level assuming it will be printed for them.
| Qualification | Side form a² = b² + c² − 2bc cos A | Angle form cos A = … |
|---|---|---|
| GCSE Higher AQA, Edexcel, OCR | Given on the formula sheet | Not given — rearrange it yourself |
| GCSE Foundation | Not on the sheet — and not on the syllabus either | Not needed |
| AS and A-Level all boards | Not given. You must recall it | Not given |
| IB AA and AI, SL and HL | Given in the formula booklet | Also given |
At GCSE it is Higher tier only, and all three boards print the same thing: the side form and nothing else. So the skill that actually earns marks is rearranging it to find an angle, under time pressure, from a formula sheet that will not help you do it.
At A level there is no formula sheet entry at all. The cosine rule sits on the national list of formulae students are expected to recall, and it is deliberately left out of every board’s booklet — Pearson’s own specification says in so many words that it “will not appear in the booklet”. Worth knowing because it used to be there: the old 2009 Edexcel booklet printed it in the C2 section. If an older textbook or an older teacher tells you it is given, they are remembering a booklet that no longer exists.
IB students have it easiest. Both forms are printed, in both the Analysis and Approaches booklet and the Applications and Interpretation one, and in the SL and HL band of each — so every IB maths student has both. There is no reason ever to rearrange it by hand. It sits at syllabus point 3.2 in both courses.
One thing that catches IB students out
The IB booklet writes the rule with different letters. UK boards print a² = b² + c² − 2bc cos A; the IB prints c² = a² + b² − 2ab cos C. These are the same rule — somebody simply chose a different letter to solve for. The pattern is identical: the squared letter on the left matches the angle on the right, and the other two letters fill the rest. If you are moving between a UK textbook and the IB booklet, expect the swap and do not let it throw you.
This is the decision that costs more marks than the arithmetic ever does. Students who know both formulas perfectly still pick the wrong one, because they go looking for the formula before they look at what the question has given them.
There are only four ways a triangle question can be set up, and each one points at a single rule.
Scroll the diagram sideways →
The quickest test is a single question: does the angle you know sit between the two sides you know?
Cosine rule
Sine rule
Notice the asymmetry. The sine rule needs a matching pair — a side together with the angle directly opposite it — and it simply cannot start without one. The cosine rule needs no pair at all. That is why the cosine rule is the one that rescues you: it works on exactly the triangles the sine rule cannot touch.
A useful habit in the exam: label the triangle first, tick off what you have been given, and only then choose. If you have a pair, use the sine rule because the arithmetic is lighter. If you have no pair, you need the cosine rule.
Worth knowing
Many questions need both. You use the cosine rule once to get a missing side or angle, which creates a complete pair, and then the sine rule is available for everything after that. If a question seems to need three steps, this is usually why.
This is the straightforward direction. You know two sides, you know the angle wedged between them, and you want the side opposite that angle.
Scroll the diagram sideways →
In triangle ABC, b = 8 cm, c = 5 cm and angle A = 60°. Find side a.
The rule
a² = b² + c² − 2bc cos A
Substitute
a² = 8² + 5² − 2(8)(5)cos 60°
Work out each piece
a² = 64 + 25 − 80 × 0.5
a² = 89 − 40
a² = 49
a = 7 cm
That one comes out exactly, which is a gift from the question setter rather than the norm. Most will leave you rounding to three significant figures. The method does not change.
The classic slip
The term is 2bc cos A, all multiplied together. It is not (2bc) − cos A, and the minus sign in front applies to that whole product. Students who get a² = 89 − 80 × 0.5 right but then compute 89 − 80 first and multiply after will get 4.5 instead of 49.
When you know all three sides you can find any angle you like. Choose which one by choosing which letter goes on the left of the formula.
Scroll the diagram sideways →
A triangle has sides a = 7 cm, b = 3 cm and c = 5 cm. Find angle A.
The rule
cos A = (b² + c² − a²) / 2bc
Substitute
cos A = (9 + 25 − 49) / (2×3×5)
Top and bottom
cos A = −15 / 30
cos A = −0.5
Inverse cosine
A = 120°
Two things in that answer are worth pausing on. The cosine came out negative, and the angle came out obtuse. Those two facts are the same fact, and the next section is about why.
Between 0° and 90°, cosine is positive. Between 90° and 180°, cosine is negative. Since every angle in a triangle lies somewhere in that range, the sign of your answer tells you the shape of the angle before you even press the inverse cosine button.
cos A is positive
cos A is negative
Check it against the example above. There a² = 49 while b² + c² = 9 + 25 = 34. The 49 is bigger, so the angle opposite is obtuse — which is exactly the 120° we got.
You can use this as a free sanity check on every question. Square the side opposite your angle, compare it with the sum of the other two squares, and you will know whether to expect an acute or an obtuse answer. If your calculator disagrees with that prediction, you have made a slip.
Bigger than the sum of the other two squares means obtuse. Smaller means acute. Equal means exactly 90°.
If you have met the sine rule, you will know it has a trap: when you use it to find an angle, there are sometimes two valid answers, because sin 30° and sin 150° are both 0.5. Your calculator hands you one and silently drops the other.
The cosine rule has no such problem, and it is worth understanding why rather than just being grateful.
Across the range that matters — 0° to 180° — the cosine function never repeats a value. It starts at 1, falls steadily through 0 at 90°, and ends at −1. Every possible angle in a triangle has its own cosine, and no two share one. So when your calculator returns an inverse cosine, that is the only answer there is.
Sine does not behave like that. It rises to 1 at 90° and then falls back, so it hits every value twice on the way up and down. That symmetry is the whole source of the ambiguous case.
If a question gives you three sides and you are worried about a second answer, stop worrying. With the cosine rule there is never one.
IB students should note where this sits in the syllabus, because the two maths courses differ. The ambiguous case is explicitly excluded from topic 3.2, where the sine and cosine rules live. It comes back at 3.5 in Analysis and Approaches, so every AA student meets it — but in Applications and Interpretation it is HL only. An AI SL student is never examined on it at all.
This also gives you a practical strategy. If a triangle could be set up for either rule and you are asked for an angle, the cosine rule is the safer choice, because it cannot give you the wrong one of two answers.
Put A = 90° into the cosine rule and watch what happens. Since cos 90° = 0, the last term vanishes completely:
which is simply a² = b² + c²
Scroll the diagram sideways →
So Pythagoras’ theorem is not a separate fact you also have to know. It is the cosine rule applied to one particular triangle. The − 2bc cos A term is the correction you need when the angle is not a right angle, and it quietly disappears when it is.
That is a genuinely useful way to remember the formula. Start from Pythagoras, which you already know, and add the correction on the end.
You will not often be asked to prove it, but seeing the derivation once makes the formula much harder to misremember — especially the sign.
Scroll the diagram sideways →
Drop a perpendicular of height h from vertex B down onto side AC. That creates two right-angled triangles, and now ordinary trigonometry works.
In the left-hand triangle, h = c sin A and the base is c cos A. The remaining piece of the base must therefore be b − c cos A. Now apply Pythagoras in the right-hand triangle:
Pythagoras on the right
a² = h² + (b − c cos A)²
Put h = c sin A in
a² = c²sin²A + b²
− 2bc cos A + c²cos²A
Group the two c² terms
a² = c²(sin²A + cos²A)
+ b² − 2bc cos A
And sin²A + cos²A = 1
a² = b² + c² − 2bc cos A
The minus sign comes from expanding the bracket, which is why it is there and why it belongs to the whole 2bc cos A product rather than to the cosine alone.
The side squared on the left must be opposite the angle on the right. If you are finding angle B, the formula starts b², not a². Label the diagram before you write anything and this one disappears.
a² = 64 + 25 − 80 × 0.5 means multiply 80 by 0.5 first, then subtract. Ordinary order of operations, but under exam pressure people subtract left to right and end up with a wildly wrong answer.
The formula gives you a², not a. Writing 49 as the final answer when the side is 7 is one of the most common lost marks on the whole topic.
cos A = −0.5 is not an error. It means the angle is obtuse. Put it straight into inverse cosine and you get 120°. Students who assume they have slipped and change the sign lose the question.
It is not wrong, but it is slower and gives more places to go astray. If you have a side with its opposite angle, the sine rule is one line.
If cos 60° gives you −0.952 instead of 0.5, your calculator is in radian mode. Worth checking before the exam starts rather than halfway through.
Keep the full value in your calculator until the last line. Rounding cos A to two decimal places before taking the inverse cosine can shift the final angle by a degree or more, which is enough to lose accuracy marks.
Work each one through before you open the answer.
Two sides, angle between: cosine rule
a² = 12² + 9² − 2(12)(9)cos 110°
a² = 144 + 81 − 216 × (−0.342)
a² = 225 + 73.9
a = 17.3 cm (3 s.f.)
Largest angle is opposite the longest side
so a = 7, b = 4, c = 5
cos A = (16 + 25 − 49) / (2×4×5)
cos A = −8 / 40 = −0.2
A = 101.5° (1 d.p.)
Compare the longest side squared
7² = 49
3² + 5² = 9 + 25 = 34
49 is greater than 34
Obtuse
Two sides with the angle between
a² = 6² + 9² − 2(6)(9)cos 48°
a² = 36 + 81 − 108 × 0.6691
a² = 117 − 72.26
a = 6.69 km (3 s.f.)
The angle form with C on the right
c² = a² + b² − 2ab cos 90°
cos 90° = 0, so the last term goes
c² = 100 + 36 = 136
c = 11.7 (3 s.f.) — Pythagoras
The cosine rule links all three sides of a triangle to one of its angles, and it works in any triangle, not just right-angled ones. To find a side it is written a squared equals b squared plus c squared minus 2bc cos A. Rearranged to find an angle it becomes cos A equals b squared plus c squared minus a squared, all divided by 2bc. Side a is always the side opposite angle A.
Use the cosine rule when you know two sides and the angle between them, or when you know all three sides. Use the sine rule when you have a side together with the angle directly opposite it. The quick test is whether the angle you know sits between the two sides you know: if it does, you need the cosine rule.
cos A equals b squared plus c squared minus a squared, all over 2bc. You then take the inverse cosine to get the angle. Remember that a is the side opposite the angle you are finding, so if you want angle B the formula starts with b squared on the subtracted side instead.
It depends on your qualification. At GCSE Higher all three boards print the side form on the formula sheet, but not the rearrangement for finding an angle. At AS and A level it is not given at all, on any board, because it sits on the national list of formulae students must recall. At IB both forms are printed in the formula booklet, for Analysis and Approaches and for Applications and Interpretation, at SL and at HL.
Yes. The sine rule, the cosine rule and the half a b sin C area formula are all Higher tier content, and they appear only on the Higher tier formula sheet. The Foundation sheet has right-angled trigonometry and nothing beyond it.
Because it solves for a different letter. UK exam boards print a squared equals b squared plus c squared minus 2bc cos A, while the IB booklet prints c squared equals a squared plus b squared minus 2ab cos C. They are the same rule. The squared letter on the left always matches the angle on the right, and the other two letters make up the rest, so you can switch between them freely.
Yes, and it reduces to Pythagoras when it does. Putting A equal to 90 degrees makes cos A zero, so the final term disappears and the formula becomes a squared equals b squared plus c squared. In practice you would just use Pythagoras directly because it is quicker, but the cosine rule gives the same answer.
Because the angle is obtuse. Cosine is positive for angles under 90 degrees and negative for angles between 90 and 180 degrees. A negative value is not a mistake, so put it straight into the inverse cosine and you will get an angle above 90 degrees. It also tells you that the side opposite is longer than Pythagoras would predict.
No. Across the range 0 to 180 degrees the cosine function never takes the same value twice, so every cosine corresponds to exactly one angle and the inverse cosine gives the only answer. The sine rule has an ambiguous case because sine does repeat values, for example sin 30 degrees and sin 150 degrees are both 0.5.
The largest angle is always opposite the longest side, so label the longest side a and use the angle form of the cosine rule to find A. For a triangle with sides 4, 5 and 7, the largest angle is opposite the 7, and cos A works out as minus 0.2, giving 101.5 degrees.
They are the same thing. Cosine rule is the usual name in the UK, including at GCSE, A level and IB. Law of cosines is the American name, so you will see it on international sites and in some textbooks. The formula is identical.
Not directly, but it often gets you there. The area formula for any triangle is one half times a times b times sin C, which needs two sides and the angle between them. If a question gives you three sides, you can use the cosine rule to find an angle first and then the area formula, or use Heron’s formula instead.
It comes from expanding a bracket in the derivation. Dropping a perpendicular splits the base into c cos A and b minus c cos A, and squaring that second piece produces the minus 2bc cos A term. The minus sign belongs to the whole 2bc cos A product, not to the cosine on its own.
Degrees, for almost every exam question at GCSE and A level, and for most at IB. If cos 60 degrees gives you minus 0.952 instead of 0.5, your calculator is in radian mode. Check the mode before the exam starts rather than discovering it halfway through a question.
Most students who lose marks on triangle questions know both formulas perfectly well. What goes wrong is the thirty seconds before they start writing. Our tutors teach GCSE, A‑level and IB maths and work through your own past papers, so the habits we fix are the ones actually costing you marks.
Book a free 30-minute meetingStill on the other rule? Our guide to the sine rule and its ambiguous case is the companion to this one, and the exact value chart covers the angles worth knowing by heart.
Get free IB notes, exam tips and new resources in your inbox.
I am a
Teachers log in with the details IB Demystified sent them. No account yet? Please contact us.