Skip to main content
ExamExplained
NSW · Maths Standard 2
Maths Standard 2 study scene
§-Syllabus dot point
NSWMaths Standard 2Syllabus dot point

How is the cosine rule used to find missing sides and angles in non-right-angled triangles?

Use the cosine rule to find a side given two sides and the included angle, or an angle given three sides

A focused answer to the HSC Maths Standard 2 dot point on the cosine rule. Both forms of the rule, when to use it (SAS or SSS), a stage-by-stage SAS solve, exam wording, the link to Pythagoras, and worked navigation and paddock examples.

Reviewed by: AI editorial process; not yet individually human-reviewed

Have a quick question? Jump to the Q&A page

What this dot point is asking

NESA wants you to apply the cosine rule in the two situations the sine rule cannot handle. The first is finding the third side when you know two sides and the angle between them (SAS). The second is finding an angle when you know all three sides (SSS). The rule is printed on the NESA reference sheet, so you do not need to memorise it. The marks come from choosing it correctly, substituting accurately, and rounding sensibly.

The deciding question is always the same: can I pair a side with the angle opposite it? In SAS the given angle sits between the two given sides, so it has no opposite side among the ones you know. In SSS there are no angles at all. Either way there is no usable pair, so the sine rule cannot start and the cosine rule takes over.

The answer

Triangle ABC in the SAS configuration for the cosine ruleTriangle with two known sides a equals CB and b equals CA meeting at the included angle C. The unknown third side c equals AB, opposite angle C, is found from c squared equals a squared plus b squared minus two a b cosine C.CABCbac (?)SAS: two sides a, b and the included angle C give the third side c = √(a² + b² − 2ab cos C).

The cosine rule for a side (SAS)

For any triangle ABCABC with sides aa, bb, cc opposite angles AA, BB, CC:

c2=a2+b22abcosC.c^2 = a^2 + b^2 - 2 a b \cos C.

Here cc is the side opposite the known angle CC, and aa, bb are the two sides that enclose CC. By symmetry the same pattern rotates around the triangle:

a2=b2+c22bccosA,b2=a2+c22accosB.a^2 = b^2 + c^2 - 2 b c \cos A, \qquad b^2 = a^2 + c^2 - 2 a c \cos B.

The pattern in words: the unknown side squared equals the sum of the squares of the other two sides, minus twice their product times the cosine of the angle between them.

The cosine rule for an angle (SSS)

Rearranging the same equation to make the angle the subject:

cosA=b2+c2a22bc.\cos A = \frac{b^2 + c^2 - a^2}{2 b c}.

The angle AA is opposite the side aa. To find a specific angle, put its opposite side as aa in this formula. A neat feature: the sign of the top tells you the angle's type. If b2+c2a2b^2 + c^2 - a^2 is negative, cosA\cos A is negative and the angle is obtuse; if it is zero the angle is exactly 90°90\degree; if positive, acute.

When to use it (and when not to)

  • SAS (two sides and the included angle): use the side form to get the third side.
  • SSS (three sides, no angle): use the angle form to get one angle. After that you can use the cosine rule again, or switch to the (quicker) sine rule for the remaining angles.

For AAS / ASA or SSA, there is a complete side-angle pair, so use the sine rule instead.

Identifying the included angle

The included angle is the one between the two given sides. In worded problems it shows up as "the angle at BB between ABAB and BCBC", "an angle of 60°60\degree between the two roads", or as the bend in a journey. If the angle you are given is not enclosed by your two sides, you do not have a clean SAS setup, so re-read or redraw before substituting.

The cosine rule, stage by stage (SAS)

Two roads leave a town at an angle of 80°80\degree. A car drives 3030 km along one and 4040 km along the other. How far apart are the two endpoints?

Stage 1, label the SAS triangle. Put the town at vertex CC. The two roads are the sides a=30a = 30 and b=40b = 40, and the angle between them is C=80°C = 80\degree. The distance we want, cc, is the side opposite CC.

Cosine rule SAS: label the two sides and included angleThe two roads from junction C are 30 km and 40 km with an included angle of 80 degrees. The straight-line distance c between the far ends is unknown.CAB80°b = 40a = 30c = ?Stage 1Two roads from junction C: a = 30 km and b = 40 km, with the included angle C = 80°.

Stage 2, confirm the angle is included. The 80°80\degree sits between the two known sides, so this is genuinely SAS and the cosine rule applies directly. If the angle had been at one of the far ends instead, this would not be SAS.

Cosine rule SAS: identify the included angleThe two known sides a and b are highlighted, with the included angle of 80 degrees shaded between them at vertex C. The included angle is the one enclosed by the two given sides.CAB80°b = 40a = 30c = ?Stage 2The included angle (80°) sits BETWEEN the two known sides. This is what makes it SAS.

Stage 3, substitute and solve. c2=302+4022(30)(40)cos80°=900+16002400(0.1736)=2083.3c^2 = 30^2 + 40^2 - 2(30)(40)\cos 80\degree = 900 + 1600 - 2400(0.1736) = 2083.3, so c2083.345.64c \approx \sqrt{2083.3} \approx 45.64 km. Sense-check: cc should be shorter than the two roads added end to end (7070 km) but longer than their difference (1010 km), and 45.6445.64 sits comfortably between.

Cosine rule SAS: the solved third sideThe solved triangle with the third side c approximately 45.64 km highlighted, found from the cosine rule c squared equals 30 squared plus 40 squared minus 2 times 30 times 40 times cosine 80 degrees.CAB80°b = 40a = 30c ≈ 45.64Stage 3c² = 30² + 40² − 2(30)(40)cos 80° = 2083.3, so c ≈ 45.64 km.

The link to Pythagoras

Suppose the included angle is a right angle. Then cos90°=0\cos 90\degree = 0, the term 2abcosC-2ab\cos C becomes zero, and the rule reduces to c2=a2+b2c^2 = a^2 + b^2. So Pythagoras is just the special case of the cosine rule for right-angled triangles. Put the other way round, the cosine rule is Pythagoras plus a correction term, 2abcosC-2ab\cos C, that adjusts for the angle not being 90°90\degree. When CC is acute the correction is negative, so the opposite side is shorter than Pythagoras would predict. When CC is obtuse, cosC<0\cos C < 0, so the correction is positive and the opposite side is longer.

Watch the sign when the angle is obtuse

For an obtuse included angle, cosC\cos C is negative, so 2abcosC-2ab\cos C becomes a positive number you add. Forgetting this is a frequent error. For example with C=110°C = 110\degree, cos110°0.342\cos 110\degree \approx -0.342, and 2abcosC=+0.684ab-2ab\cos C = +0.684 ab. The opposite side comes out longer than either enclosing side, which matches the geometry of a wide-open triangle.

How exam questions ask about the cosine rule

  • "Find the length of ... / how far apart ..." with two sides and the angle between them. SAS: use the side form.
  • "Find the size of the largest / smallest angle" with three sides given. SSS: use the angle form. The largest angle faces the longest side and the smallest faces the shortest, so you can target the one asked for directly.
  • "A ship sails ... then changes course ..." Convert the change of bearing into the interior angle at the bend (often the supplement of the turn), then it is SAS.
  • "Show that the angle is obtuse / acute." Use the angle form and read the sign of b2+c2a2b^2 + c^2 - a^2: negative means obtuse, zero means right, positive means acute.
  • "Hence find the area / the remaining angles." A multi-part question: use the cosine rule first, then feed the result into the area formula or the sine rule.

Exam-style practice questions

Practice questions written in the style of NESA exam questions on this dot point, with worked answer explainers. The year tag is the paper they imitate, not the source.

2022 HSC-style3 marksIn triangle ABCABC, a=7a = 7 cm, b=9b = 9 cm and C=65°C = 65\degree. Find side cc correct to one decimal place.
Show worked answer →

Use c2=a2+b22abcosCc^2 = a^2 + b^2 - 2 a b \cos C.

c2=49+812×7×9×cos65°c^2 = 49 + 81 - 2 \times 7 \times 9 \times \cos 65\degree.

cos65°0.4226\cos 65\degree \approx 0.4226.

c2=130126×0.4226=13053.25=76.75c^2 = 130 - 126 \times 0.4226 = 130 - 53.25 = 76.75.

c=76.758.76c = \sqrt{76.75} \approx 8.76.

Rounded to one decimal place: c8.8c \approx 8.8 cm.

Markers reward the cosine rule stated, correct substitution, intermediate computation kept to at least four decimal places, and final answer at the requested precision.

2023 HSC-style4 marksA triangular paddock has sides 8080 m, 6060 m and 5050 m. Find the largest angle of the paddock correct to the nearest degree.
Show worked answer →

The largest angle is opposite the longest side (8080 m). Use the cosine rule rearranged:

cosA=b2+c2a22bc\cos A = \frac{b^2 + c^2 - a^2}{2 b c}.

Let a=80a = 80, b=60b = 60, c=50c = 50.

cosA=602+5028022×60×50=3600+250064006000=3006000=0.05\cos A = \frac{60^2 + 50^2 - 80^2}{2 \times 60 \times 50} = \frac{3600 + 2500 - 6400}{6000} = \frac{-300}{6000} = -0.05.

A=cos1(0.05)92.87°A = \cos^{-1}(-0.05) \approx 92.87\degree, round to 93°93\degree.

Markers reward identifying the largest angle as opposite the longest side, the rearranged cosine rule, and the angle rounded as requested. Half a mark if you find AA but do not justify which side it sits opposite.

Practice questions

Original practice questions graded from foundation to exam level, each with a full worked solution. Try them before revealing the solution.

foundation1 marksIn triangle ABCABC, the sides a=6a = 6 cm and b=10b = 10 cm meet at an included angle C=50C = 50^\circ. Find the length of the third side cc, correct to one decimal place.
Show worked solution →

State the rule (SAS). The angle CC lies between the two known sides, so use the side form:

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2 a b \cos C

Substitute the given values. With a=6a = 6, b=10b = 10 and cos500.6428\cos 50^\circ \approx 0.6428:

c2=62+1022×6×10×cos50=36+100120×0.6428=58.87c^2 = 6^2 + 10^2 - 2 \times 6 \times 10 \times \cos 50^\circ = 36 + 100 - 120 \times 0.6428 = 58.87

Take the square root.

c58.877.7 cmc \approx \sqrt{58.87} \approx 7.7 \text{ cm}

Answer: c7.7c \approx 7.7 cm.

foundation2 marksA triangle has sides of length 44 cm, 55 cm and 66 cm. Find the size of the angle opposite the 44 cm side, correct to the nearest degree.
Show worked solution →

State the rule (SSS). Three sides and no angle means use the angle form, with the wanted angle's opposite side as a=4a = 4 and the enclosing sides as b=5b = 5 and c=6c = 6:

cosA=b2+c2a22bc\cos A = \frac{b^2 + c^2 - a^2}{2 b c}

Substitute the given values.

cosA=52+62422×5×6=25+361660=4560=0.7500\cos A = \frac{5^2 + 6^2 - 4^2}{2 \times 5 \times 6} = \frac{25 + 36 - 16}{60} = \frac{45}{60} = 0.7500

Invert to find the angle.

A=cos1(0.7500)41A = \cos^{-1}(0.7500) \approx 41^\circ

Answer: the angle opposite the 44 cm side is about 4141^\circ.

foundation2 marksIn triangle ABCABC, the side a=8a = 8 cm and the side b=11b = 11 cm meet at an included angle C=40°C = 40\degree. Find the length of the third side cc, correct to two decimal places.
Show worked solution →

State the rule (SAS). The angle CC sits between the two known sides, so use the side form of the cosine rule:

c2=a2+b22abcosCc^2 = a^2 + b^2 - 2 a b \cos C

Substitute the given values. With a=8a = 8, b=11b = 11 and C=40°C = 40\degree, and using cos40°0.7660\cos 40\degree \approx 0.7660:

c2=82+1122×8×11×cos40°=64+121176×0.7660=50.18c^2 = 8^2 + 11^2 - 2 \times 8 \times 11 \times \cos 40\degree = 64 + 121 - 176 \times 0.7660 = 50.18

Take the square root.

c50.187.08 cmc \approx \sqrt{50.18} \approx 7.08 \text{ cm}

Check. The included angle is acute, so cc should be shorter than the Pythagoras value 82+11213.60\sqrt{8^2 + 11^2} \approx 13.60 cm, and it should sit between the difference of the sides (33 cm) and their sum (1919 cm). Since 7.087.08 cm satisfies both, the answer is reasonable.

foundation3 marksA triangular garden bed has sides of length 55 m, 66 m and 99 m. Find the size of the largest angle, correct to the nearest degree.
Show worked solution →

Identify the largest angle. The largest angle lies opposite the longest side, which is the 99 m side. Put that side as a=9a = 9 and the two enclosing sides as b=6b = 6 and c=5c = 5.

State the rule (SSS). Three sides and no angle means use the angle form:

cosA=b2+c2a22bc\cos A = \frac{b^2 + c^2 - a^2}{2 b c}

Substitute the given values.

cosA=62+52922×6×5=36+258160=20600.3333\cos A = \frac{6^2 + 5^2 - 9^2}{2 \times 6 \times 5} = \frac{36 + 25 - 81}{60} = \frac{-20}{60} \approx -0.3333

Invert to find the angle.

A=cos1(0.3333)109°A = \cos^{-1}(-0.3333) \approx 109\degree

Check. The numerator b2+c2a2b^2 + c^2 - a^2 is negative, which predicts an obtuse angle, and 109°109\degree is indeed obtuse. The largest angle of the garden bed is about 109°109\degree.

core3 marksIn triangle ABCABC, the side a=12a = 12 cm and the side b=15b = 15 cm meet at an included angle C=95C = 95^\circ. Find the length of the third side cc, correct to two decimal places.
Show worked solution →

Label the SAS triangle. The angle C=95C = 95^\circ sits between the two known sides a=12a = 12 and b=15b = 15, so the side cc opposite CC comes from the side form.

Mind the obtuse angle. Because 9595^\circ is obtuse, cos950.0872\cos 95^\circ \approx -0.0872 is negative, so the last term is added rather than subtracted:

c2=122+1522×12×15×cos95=144+225360×(0.0872)=400.38c^2 = 12^2 + 15^2 - 2 \times 12 \times 15 \times \cos 95^\circ = 144 + 225 - 360 \times (-0.0872) = 400.38

Take the square root.

c400.3820.01 cmc \approx \sqrt{400.38} \approx 20.01 \text{ cm}

Check. The angle is just past a right angle, so cc should be a little longer than the Pythagoras value 122+15219.21\sqrt{12^2 + 15^2} \approx 19.21 cm, and 20.0120.01 cm is, as expected. The third side is about 20.0120.01 cm.

core3 marksTwo straight fences meet at a corner post at an angle of 115°115\degree. One fence runs 4545 m and the other runs 7070 m from the post. Find the distance between the two far ends of the fences, correct to two decimal places.
Show worked solution →

Label the SAS triangle. Put the corner post at vertex CC. The two fences are the sides a=45a = 45 and b=70b = 70, and the angle between them is the included angle C=115°C = 115\degree. The distance we want, cc, is opposite that angle.

State and substitute the side form. Because 115°115\degree is obtuse, cos115°0.4226\cos 115\degree \approx -0.4226 is negative, so the last term is added:

c2=452+7022×45×70×cos115°=2025+49006300×(0.4226)=9587.50c^2 = 45^2 + 70^2 - 2 \times 45 \times 70 \times \cos 115\degree = 2025 + 4900 - 6300 \times (-0.4226) = 9587.50

Take the square root.

c9587.5097.92 mc \approx \sqrt{9587.50} \approx 97.92 \text{ m}

Check. With a wide obtuse angle the far ends should be well separated, close to the sum of the fences (115115 m) rather than their difference (2525 m), and 97.9297.92 m sits sensibly in that range. The ends are about 97.9297.92 m apart.

core3 marksA triangle has sides of length 1313 cm, 1414 cm and 1515 cm. Find the size of the smallest angle, correct to the nearest degree.
Show worked solution →

Identify the smallest angle. The smallest angle lies opposite the shortest side, which is the 1313 cm side. Put that side as a=13a = 13 and the enclosing sides as b=14b = 14 and c=15c = 15.

State the rule (SSS).

cosA=b2+c2a22bc\cos A = \frac{b^2 + c^2 - a^2}{2 b c}

Substitute the given values.

cosA=142+1521322×14×15=196+225169420=252420=0.6000\cos A = \frac{14^2 + 15^2 - 13^2}{2 \times 14 \times 15} = \frac{196 + 225 - 169}{420} = \frac{252}{420} = 0.6000

Invert to find the angle.

A=cos1(0.6000)53°A = \cos^{-1}(0.6000) \approx 53\degree

Check. The numerator is positive, so the angle is acute, and 53°53\degree is the smallest of the three angles because it faces the shortest side. The smallest angle is about 53°53\degree.

core4 marksA bushwalker leaves a campsite on a bearing of 070°070\degree and walks 1818 km, then changes course to a bearing of 150°150\degree and walks a further 2424 km. Find the straight-line distance from the campsite to the walker's finishing point, correct to two decimal places.
Show worked solution →
Find the interior angle at the bend
The bearing turns by 150°070°=80°150\degree - 070\degree = 80\degree. The interior angle of the triangle at the turning point is the supplement, 180°80°=100°180\degree - 80\degree = 100\degree, because the new leg makes an 80°80\degree angle with the straight-ahead direction.
Set up the SAS triangle
The two legs 1818 km and 2424 km enclose the 100°100\degree angle, and the unknown cc is the distance from the campsite.
State and substitute the side form
Since cos100°0.1736\cos 100\degree \approx -0.1736, the last term is added:

c2=182+2422×18×24×cos100°=324+576864×(0.1736)=1050.03c^2 = 18^2 + 24^2 - 2 \times 18 \times 24 \times \cos 100\degree = 324 + 576 - 864 \times (-0.1736) = 1050.03

Take the square root.

c1050.0332.40 kmc \approx \sqrt{1050.03} \approx 32.40 \text{ km}

Check. The result lies between the difference of the legs (66 km) and their sum (4242 km), as it must, so the walker finishes about 32.4032.40 km from the campsite.

exam5 marksA triangular paddock PQRPQR has two sides meeting at corner PP: the side PQ=95PQ = 95 m and the side PR=120PR = 120 m, with an included angle of 78°78\degree at PP. (a) Find the length of the remaining side QRQR, correct to two decimal places. (b) Hence find the area of the paddock, correct to the nearest square metre.
Show worked solution →

Part (a), label the SAS triangle. The included angle P=78°P = 78\degree sits between the two known sides PQ=95PQ = 95 and PR=120PR = 120, so the side QRQR opposite PP comes straight from the side form.

Substitute and solve for QRQR. Using cos78°0.2079\cos 78\degree \approx 0.2079:

QR2=952+12022×95×120×cos78°=9025+1440022800×0.2079=18684.61QR^2 = 95^2 + 120^2 - 2 \times 95 \times 120 \times \cos 78\degree = 9025 + 14400 - 22800 \times 0.2079 = 18684.61

QR18684.61136.69 mQR \approx \sqrt{18684.61} \approx 136.69 \text{ m}

Part (b), choose the area formula. We already know two sides and the angle between them, so the included-angle area formula is the quickest route:

Area=12×PQ×PR×sinP=12×95×120×sin78°\text{Area} = \tfrac{1}{2} \times PQ \times PR \times \sin P = \tfrac{1}{2} \times 95 \times 120 \times \sin 78\degree

Substitute. Using sin78°0.9781\sin 78\degree \approx 0.9781:

Area12×95×120×0.97815575 m2\text{Area} \approx \tfrac{1}{2} \times 95 \times 120 \times 0.9781 \approx 5575 \text{ m}^2

Check. The third side QR136.69QR \approx 136.69 m is longer than each given side, which fits an angle near 78°78\degree opening the triangle wide, and the area is a little under the right-angled maximum of 12×95×120=5700\tfrac{1}{2} \times 95 \times 120 = 5700 m2^2, exactly as expected when the angle is just under 90°90\degree.

exam5 marksA ship sails from port AA to port BB on a bearing of 035°035\degree, a distance of 6060 km. At BB it changes course to a bearing of 110°110\degree and sails 9090 km to port CC. Find the direct distance from AA to CC, correct to two decimal places.
Show worked solution →
Find the interior angle at BB
The bearing changes by 110°035°=75°110\degree - 035\degree = 75\degree, so the interior angle of triangle ABCABC at the bend is the supplement, 180°75°=105°180\degree - 75\degree = 105\degree.
Set up the SAS triangle
The two legs AB=60AB = 60 km and BC=90BC = 90 km enclose the 105°105\degree angle at BB, and the unknown is the side ACAC opposite BB.
State and substitute the side form
Because 105°105\degree is obtuse, cos105°0.2588\cos 105\degree \approx -0.2588 is negative and the final term is added:

AC2=602+9022×60×90×cos105°=3600+810010800×(0.2588)=14495.25AC^2 = 60^2 + 90^2 - 2 \times 60 \times 90 \times \cos 105\degree = 3600 + 8100 - 10800 \times (-0.2588) = 14495.25

Take the square root.

AC14495.25120.40 kmAC \approx \sqrt{14495.25} \approx 120.40 \text{ km}

Check. The distance lies between the difference of the legs (3030 km) and their sum (150150 km), and the obtuse turn pushes it towards the upper end, so AC120.40AC \approx 120.40 km is sensible.

exam4 marksA triangle has sides of length 77 m, 88 m and 1212 m. (a) Show that the angle opposite the 1212 m side is obtuse. (b) Find that angle, correct to the nearest minute.
Show worked solution →

Part (a), set up the angle form. Put the side opposite the wanted angle as a=12a = 12, and the two enclosing sides as b=7b = 7 and c=8c = 8:

cosA=b2+c2a22bc=72+821222×7×8=49+64144112=311120.2768\cos A = \frac{b^2 + c^2 - a^2}{2 b c} = \frac{7^2 + 8^2 - 12^2}{2 \times 7 \times 8} = \frac{49 + 64 - 144}{112} = \frac{-31}{112} \approx -0.2768

Read the sign. The numerator b2+c2a2=31b^2 + c^2 - a^2 = -31 is negative, so cosA\cos A is negative and the angle must lie between 90°90\degree and 180°180\degree. The angle opposite the 1212 m side is therefore obtuse.

Part (b), invert to find the angle.

A=cos1(0.2768)106.0685°A = \cos^{-1}(-0.2768) \approx 106.0685\degree

Convert the decimal part to minutes. The whole-degree part is 106°106\degree, and 0.0685°×6040.0685\degree \times 60 \approx 4', so

A106°04A \approx 106\degree 04'

Check. The angle is obtuse as shown in part (a), and 106°106\degree is the largest angle of the triangle because it faces the longest side, which is consistent. The angle is about 106°04106\degree 04'.

exam6 marksA surveyor standing at station SS sights two boundary markers MM and TT. The distance SM=110SM = 110 m, the distance ST=140ST = 140 m, and the angle MSTMST between the two lines of sight is 6262^\circ. (a) Find the direct distance MTMT between the two markers, correct to two decimal places. (b) Hence find the size of the angle SMTSMT at marker MM, correct to the nearest degree.
Show worked solution →

Part (a), label the SAS triangle. The angle S=62S = 62^\circ sits between the two known sides SM=110SM = 110 and ST=140ST = 140, so the side MTMT opposite SS comes from the side form.

Substitute and solve for MTMT. Using cos620.4695\cos 62^\circ \approx 0.4695:

MT2=1102+14022×110×140×cos62=12100+1960030800×0.4695=17240.28MT^2 = 110^2 + 140^2 - 2 \times 110 \times 140 \times \cos 62^\circ = 12100 + 19600 - 30800 \times 0.4695 = 17240.28

MT17240.28131.30 mMT \approx \sqrt{17240.28} \approx 131.30 \text{ m}

Part (b), set up the angle form at MM. Now all three sides are known, so use the angle form with the wanted angle's opposite side as ST=140ST = 140, and the enclosing sides SM=110SM = 110 and MT131.30MT \approx 131.30:

cosM=SM2+MT2ST22×SM×MT=1102+131.30214022×110×131.300.3372\cos M = \frac{SM^2 + MT^2 - ST^2}{2 \times SM \times MT} = \frac{110^2 + 131.30^2 - 140^2}{2 \times 110 \times 131.30} \approx 0.3372

Invert to find the angle.

M=cos1(0.3372)70M = \cos^{-1}(0.3372) \approx 70^\circ

Check. The three angles should sum to 180180^\circ. With S=62S = 62^\circ and M70M \approx 70^\circ, the angle at TT would be about 4848^\circ, and 62+70+48=18062 + 70 + 48 = 180, so the working is consistent. The angle SMTSMT is about 7070^\circ.

ExamExplained