Cosine Rule (AA HL)

The cosine rule is c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C, where CC is the angle opposite side cc. Use it to find a side when two sides and the included angle are known, or rearrange it to find an angle when all three sides are known. It reduces to Pythagoras' theorem when C=90∘C=90^\circ. It's part of the broader Triangles & Circular Functions topic.

11 questions on this sub-topic.

Syllabus

CodeSyllabus content
SL3.2The sine rule asin⁡A=bsin⁡B=csin⁡C\dfrac{a}{\sin A}=\dfrac{b}{\sin B}=\dfrac{c}{\sin C} (excluding the ambiguous case). The cosine rule c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C. Area of a triangle 12absin⁡C\tfrac12ab\sin C.

Official IB source: Mathematics: analysis and approaches subject brief (PDF, ibo.org).

Skills practised on this page:

The cosine rule

Both forms below are in the formula booklet.

Cosine rule

c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C

Label the angle you know (or want) as CC, with a,ba,b the two sides enclosing it.

In the formula booklet

Rearranged - finds an angle

cos⁡C=a2+b2−c22ab\cos C=\dfrac{a^2+b^2-c^2}{2ab}

Use this form when all three sides are known and you need one of the angles.

Need the sine rule and triangle area formula too? See Triangles & Circular Functions.

Key terms

Which angle is C in the cosine rule?

CC is the angle opposite side cc, the side on the left of the formula. The other two sides, aa and bb, are the sides that form the angle CC.

e.g. For a=5a=5, b=7b=7 and C=60∘C=60^\circ, c2=25+49−70cos⁡60∘=39c^2=25+49-70\cos60^\circ=39, so c=39c=\sqrt{39}.

When do you need the cosine rule rather than the sine rule?

Use the cosine rule when you know two sides and the angle between them, or all three sides. In both cases there is no angle with its opposite side, so the sine rule cannot be set up.

e.g. Sides 44 and 55 with included angle 70∘70^\circ give no angle with its opposite side, so the cosine rule is needed.

What does a negative value of cos C tell you?

A negative cosine means the angle is obtuse, a positive cosine means it is acute, and zero means it is a right angle.

e.g. For sides 77, 99 and 1212, cos⁡C=49+81−1442×7×9=−19\cos C=\dfrac{49+81-144}{2\times7\times9}=-\dfrac19, so CC is obtuse.

How does the cosine rule link to Pythagoras' theorem?

When C=90∘C=90^\circ, cos⁡C=0\cos C=0, so the last term disappears and the rule becomes c2=a2+b2c^2=a^2+b^2.

e.g. With a=3a=3, b=4b=4 and C=90∘C=90^\circ, c2=9+16−0=25c^2=9+16-0=25, so c=5c=5.

Worked examples

1
Medium
No calc
[5 marks]

In triangle ABCABC, b=6, c=6, A=120∘.b=6,\ c=6,\ A=120^\circ.

diagram not to scale120°6 cm6 cmACB

Find the exact length of a.a.

Worked solution

a2=36+36−2(36)cos⁡120∘.a^2 = 36 + 36 - 2(36)\cos120^\circ. M1
Use cos⁡120∘=−12\cos120^\circ = -\tfrac12: =72+36.= 72 + 36. A1
giving 108.108. A1
a=108a = \sqrt{108} M1
a=63.a = 6\sqrt3. A1

M1 Cosine rule A1 Exact cosine A1 a2=108a^2=108 M1 Take root A1 636\sqrt3
2
Medium
GDC
[4 marks]

A triangle has sides a=7, b=9, c=12.a=7,\ b=9,\ c=12.

diagram not to scale7912ABC

Find the largest angle.

Worked solution

cos⁡C=49+81−1442(7)(9).\cos C = \dfrac{49 + 81 - 144}{2(7)(9)}. M1
cos⁡C=−14126=−0.1111.\cos C = \dfrac{-14}{126} = -0.1111. A1
Inverse cosine: M1
C≈96.4∘.C \approx 96.4^\circ. A1On the GDC. Find cos−1⁡((7×7+9×9−12×12)(2×7×9))\cos^{-1}\left(\frac{(7\times 7+9\times 9-12\times 12)}{(2\times 7\times 9)}\right) in degrees. The calculator shows about 96.4.

TI-84 Plus CE: mode move down to the RADIAN DEGREE line ▶ enter 2nd mode degree mode set 2nd cos (cos⁻¹), type (7*7+9*9-12*12)/(2*7*9) ) enterCasio fx-CG50: MENU Run-Matrix SHIFT MENU move down to Angle F1 EXIT degree mode set SHIFT cos (cos⁻¹), then ( (7*7+9*9-12*12)/(2*7*9) ) EXECasio fx-CG100: HOME Calculate Settings key Angle Degree OK SHIFT cos (cos⁻¹), type (7*7+9*9-12*12)/(2*7*9) ) EXETI-Nspire CX: home Settings Document Settings tab Angle Degree enter on a Calculator page press trig cos⁻¹ type (7*7+9*9-12*12)/(2*7*9) ) enterFull GDC guide: Switch between degrees and radians Topic page

M1 Rearranged cosine rule A1 cos⁡C\cos C M1 cos−1\cos^{-1} A1 96.4∘96.4^\circ
3
Hard
No calc
[7 marks]

A triangle PQRPQR has side lengths PQ=x, QR=x+2PQ=x,\ QR=x+2 and PR=x+4,PR=x+4, where x>0.x>0. It is known that cos⁡R=45.\cos R=\dfrac45.

Show that x=6.x=6.

Worked solution

Side PQ=xPQ=x is opposite angle RR, with adjacent sides QR=x+2QR=x+2 and PR=x+4PR=x+4: cos⁡R=QR2+PR2−PQ22⋅QR⋅PR=(x+2)2+(x+4)2−x22(x+2)(x+4).\cos R=\dfrac{QR^2+PR^2-PQ^2}{2\cdot QR\cdot PR}=\dfrac{(x+2)^2+(x+4)^2-x^2}{2(x+2)(x+4)}. M1
(x+2)2+(x+4)2−x2=x2+12x+20.(x+2)^2+(x+4)^2-x^2=x^2+12x+20. A1
2(x+2)(x+4)=2x2+12x+16.2(x+2)(x+4)=2x^2+12x+16. A1
x2+12x+202x2+12x+16=45⇒5(x2+12x+20)=4(2x2+12x+16).\dfrac{x^2+12x+20}{2x^2+12x+16}=\dfrac45\Rightarrow5(x^2+12x+20)=4(2x^2+12x+16). M1
5x2+60x+100=8x2+48x+64⇒3x2−12x−36=0⇒x2−4x−12=0.5x^2+60x+100=8x^2+48x+64\Rightarrow3x^2-12x-36=0\Rightarrow x^2-4x-12=0. A1
(x−6)(x+2)=0⇒x=6(x-6)(x+2)=0\Rightarrow x=6 or x=−2.x=-2. M1
Since x>0x>0 (a length), reject x=−2x=-2: x=6.x=6. R1AG

M1 Set up the cosine rule A1 Numerator x2+12x+20x^2+12x+20 A1 Denominator 2x2+12x+162x^2+12x+16 M1 Clear fractions A1 x2−4x−12=0x^2-4x-12=0 M1 Factorising x2−4x−12=0x^2-4x-12=0 as (x−6)(x+2)=0(x-6)(x+2)=0 R1 Reject x=−2x=-2

Common mistakes

  • Using the sine rule when the cosine rule is needed. If you know two sides and the angle between them, or all three sides, the sine rule can't be set up directly - reach for the cosine rule instead.
  • Rounding too early. Carry full calculator accuracy through the cosine rule calculation, and only round the final answer - early rounding (especially before a square root) can shift the last significant figure.
  • Labelling the wrong angle as CC. The angle in c2=a2+b2−2abcos⁡Cc^2=a^2+b^2-2ab\cos C must be the one enclosed by the sides you call aa and bb - relabel the triangle consistently before substituting.

Quick questions

What is the cosine rule?

c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C, used to find a side of a triangle when the other two sides and the angle between them are known.

How do you use the cosine rule to find an angle?

Rearrange to cos⁡C=a2+b2−c22ab\cos C = \dfrac{a^2+b^2-c^2}{2ab}, then take the inverse cosine. This works when all three sides are known.

How do I find the largest angle when I know all three sides?

The largest angle is opposite the longest side. Call that side cc and use cos⁡C=a2+b2−c22ab\cos C=\dfrac{a^2+b^2-c^2}{2ab}.

Can I use the cosine rule to find an angle other than C?

Yes. Relabel so that the angle you want is opposite the side on the left, for example cos⁡A=b2+c2−a22bc\cos A=\dfrac{b^2+c^2-a^2}{2bc}.

Why do I get an error when I take the inverse cosine?

The value must lie between −1-1 and 11. A value outside this range means there is an arithmetic slip or the lengths cannot form a triangle.

Ready to practise properly?

11 cosine-rule questions, marked instantly like the real exam.