The Cosine Rule
When the sine rule is not enough, the cosine rule saves the day. Learn to find any side or angle in any triangle -- and discover that Pythagoras was just a special case all along.
Printable Worksheets
Print or save as PDF — or build a custom worksheet from any module's questions.
In triangle ABC, side a = 7 cm, side b = 9 cm, and angle C = 60°. Can you find side c using anything you already know? If not, what information would you need to use Pythagoras? How might the formula change if the angle were not 90°?
The cosine rule generalises Pythagoras. It works for any triangle -- acute, obtuse, or right-angled. When the included angle is 90°, the cosine rule collapses to $c^2 = a^2 + b^2$ because $\cos 90° = 0$.
The cosine rule has two forms. Finding a side (when you know SAS): $c^2 = a^2 + b^2 - 2ab \cos C$. Finding an angle (when you know SSS): $\cos C = \frac{a^2 + b^2 - c^2}{2ab}$. The key insight is that the $-2ab \cos C$ term measures how much the triangle deviates from being right-angled.
Know
- The cosine rule formula in both forms (finding side and finding angle)
- When to use the cosine rule instead of the sine rule
Understand
- How the cosine rule generalises Pythagoras
- Why the cosine rule is needed for SAS and SSS cases
Can Do
- Use the cosine rule to find an unknown side given SAS
- Use the cosine rule to find an unknown angle given SSS
- Choose between sine and cosine rules appropriately
Wrong: Using the sine rule when you have two sides and the included angle. The sine rule cannot directly find the third side.
Right: For SAS, always use the cosine rule. For AAS or ASA, use the sine rule. For SSS, use the cosine rule to find one angle, then the sine rule for the rest.
Wrong: Forgetting that $\cos 90° = 0$, so the cosine rule becomes Pythagoras for right triangles.
Right: When $C = 90°$, $c^2 = a^2 + b^2 - 2ab \cos 90° = a^2 + b^2 - 0 = a^2 + b^2$. Pythagoras is a special case!
When you know two sides and the included angle (SAS), the cosine rule finds the third side directly. No need for right angles -- the formula works for any included angle.
Step 1: Identify the side opposite the known angle. This is the side you are finding.
Step 2: Write $c^2 = a^2 + b^2 - 2ab \cos C$ where $C$ is the included angle.
Step 3: Substitute and calculate $c^2$.
Step 4: Take the square root. Check reasonableness: if $C < 90°$, then $c < \sqrt{a^2 + b^2}$. If $C > 90°$, then $c > \sqrt{a^2 + b^2}$.
When you know all three sides (SSS), rearrange the cosine rule to find any angle. The angle form is: $\cos C = \frac{a^2 + b^2 - c^2}{2ab}$. Then use inverse cosine ($\cos^{-1}$) to find the angle.
Step 1: Identify which angle you want. It is opposite the side you put on top.
Step 2: Write $\cos C = \frac{a^2 + b^2 - c^2}{2ab}$.
Step 3: Substitute all three side lengths.
Step 4: Calculate the fraction, then use $\cos^{-1}$. The sign of cos tells you the angle type: positive = acute, zero = right, negative = obtuse.
Knowing which rule to use is half the battle. The decision depends entirely on what information you are given. Here is your decision guide.
AAS or ASA (two angles, one side) → Sine rule. You have an angle opposite a known side.
SSA (two sides, non-included angle) → Sine rule. Check ambiguous case.
SAS (two sides, included angle) → Cosine rule. Find the third side.
SSS (three sides) → Cosine rule. Find an angle, then optionally sine rule for others.
Watch Me Solve It · 3 examples
-
1Identify the setupTwo sides and the included angle (SAS) → cosine ruleWe know $a$, $b$ and the angle between them ($C$). We want the side opposite ($c$).
-
2Write the cosine rule$c^2 = a^2 + b^2 - 2ab \cos C$
-
3Substitute and calculate$c^2 = 7^2 + 9^2 - 2(7)(9) \cos 60°$$c^2 = 49 + 81 - 126 \times 0.5$$c^2 = 130 - 63 = 67$
-
4Find c and check$c = \sqrt{67} \approx 8.2$ cmCheck: $C = 60° < 90°$, so $c < \sqrt{7^2 + 9^2} = \sqrt{130} \approx 11.4$. $8.2 < 11.4$ ✓
-
1Identify the setupThree sides known (SSS) → cosine rule for anglesWe want angle $A$, which is opposite side $a$.
-
2Write the angle form$\cos A = \frac{b^2 + c^2 - a^2}{2bc}$
-
3Substitute and calculate$\cos A = \frac{7^2 + 8^2 - 5^2}{2(7)(8)} = \frac{49 + 64 - 25}{112}$$\cos A = \frac{88}{112} = 0.7857$
-
4Find the angle$A = \cos^{-1}(0.7857) \approx 38.2°$Since $\cos A > 0$, angle $A$ is acute. This makes sense: side $a = 5$ is the shortest side, so it faces the smallest angle.
-
1Find side c using cosine rule$c^2 = 9^2 + 11^2 - 2(9)(11) \cos 50°$$c^2 = 81 + 121 - 198 \times 0.643 = 202 - 127.3 = 74.7$$c = \sqrt{74.7} \approx 8.6$ cm
-
2Find angle A using sine rule$\frac{\sin A}{9} = \frac{\sin 50°}{8.6}$$\sin A = \frac{9 \times 0.766}{8.6} = 0.802$$A = \sin^{-1}(0.802) \approx 53.3°$
-
3Find angle B$B = 180° - 50° - 53.3° = 76.7°$Angles in a triangle sum to 180°.
-
4Verify with sine rule$\frac{11}{\sin 76.7°} = \frac{11}{0.973} \approx 11.3$ and $\frac{8.6}{\sin 50°} = \frac{8.6}{0.766} \approx 11.2$Close enough (rounding differences). The solution is consistent.
Cosine Rule (side)
- $c^2 = a^2 + b^2 - 2ab \cos C$
- Use when you know SAS
- $c$ is opposite angle $C$
Cosine Rule (angle)
- $\cos C = \frac{a^2 + b^2 - c^2}{2ab}$
- Use when you know SSS
- Then $\cos^{-1}$ to find angle
Choosing the Rule
- AAS / ASA → Sine rule
- SSA → Sine rule (ambiguous)
- SAS → Cosine rule
- SSS → Cosine rule
Special Case
- $C = 90°$ → Pythagoras
- cos 90° = 0
- Cosine rule generalises Pythagoras
How are you completing this lesson?
Brain Trainer · 4 problems
Four quick problems on the cosine rule. Work each, then reveal the answer.
-
1 In $\triangle ABC$, $a = 8$ cm, $b = 10$ cm, $\angle C = 45°$. Find side $c$.
$c^2 = 8^2 + 10^2 - 2(8)(10) \cos 45° = 64 + 100 - 160 \times 0.707 = 164 - 113.1 = 50.9$. $c = \sqrt{50.9} \approx 7.1$ cm.$c \approx 7.1$ cm -
2 In $\triangle ABC$, $a = 6$ cm, $b = 8$ cm, $c = 10$ cm. Find $\angle B$.
$\cos B = \frac{6^2 + 10^2 - 8^2}{2(6)(10)} = \frac{36 + 100 - 64}{120} = \frac{72}{120} = 0.6$. $B = \cos^{-1}(0.6) \approx 53.1°$.$B \approx 53.1°$ -
3 A triangle has sides 5 cm, 6 cm, 7 cm. Find the largest angle.
Largest angle is opposite longest side (7). $\cos C = \frac{5^2 + 6^2 - 7^2}{2(5)(6)} = \frac{25 + 36 - 49}{60} = \frac{12}{60} = 0.2$. $C = \cos^{-1}(0.2) \approx 78.5°$.$C \approx 78.5°$ -
4 A triangle has sides 8 cm, 10 cm, 14 cm. Is it acute, right, or obtuse? Justify.
Check largest angle (opposite 14): $\cos C = \frac{8^2 + 10^2 - 14^2}{2(8)(10)} = \frac{64 + 100 - 196}{160} = \frac{-32}{160} = -0.2$. Since $\cos C < 0$, $C > 90°$. The triangle is obtuse.Obtuse
Multiple Choice · 5 questions
The cosine rule is used when you know:
In $\triangle ABC$, $a = 5$, $b = 7$, $\angle C = 120°$. Side $c$ is:
In a triangle with sides 5, 6, 7, the largest angle is closest to:
When $\angle C = 90°$, the cosine rule becomes:
A triangle has sides 8 cm, 10 cm, 14 cm. It is:
Short Answer · 3 questions
(a) Find side $c$.
(b) Find $\angle A$ using the sine rule.
(c) Find $\angle B$.
(a) Find all three angles.
(b) Classify the triangle as acute, right, or obtuse. Justify your answer.
(c) Verify that the three angles sum to 180°.
(a) Find the angle between their paths.
(b) Find the distance between the ships after 2 hours.
(c) Find the bearing of ship B from ship A at this time.
(d) A third ship wants to sail directly from ship A to ship B. What course should it steer?
(a) Find $\angle ABC$ using $\triangle ABC$.
(b) Find $\angle ADC$ using $\triangle ADC$.
(c) Hence find the sum of angles $B$ and $D$ in the quadrilateral.
(d) A property of cyclic quadrilaterals is that opposite angles sum to 180°. Is $ABCD$ cyclic? Justify.
Reveal solution
(a) In $\triangle ABC$: $\cos B = \frac{8^2 + 10^2 - 12^2}{2(8)(10)} = \frac{64 + 100 - 144}{160} = \frac{20}{160} = 0.125$. $B = \cos^{-1}(0.125) \approx 82.8°$.
(b) In $\triangle ADC$: $\cos D = \frac{9^2 + 7^2 - 12^2}{2(9)(7)} = \frac{81 + 49 - 144}{126} = \frac{-14}{126} = -0.111$. $D = \cos^{-1}(-0.111) \approx 96.4°$.
(c) $\angle B + \angle D = 82.8° + 96.4° = 179.2°$ (approximately 180° due to rounding).
(d) Since $\angle B + \angle D \approx 180°$, the quadrilateral is cyclic (or very close to cyclic, with the small difference due to rounding in intermediate steps). The exact values would sum to exactly 180°.
Side form
$c^2 = a^2 + b^2 - 2ab \cos C$
Angle form
$\cos C = \frac{a^2 + b^2 - c^2}{2ab}$
SAS
Cosine rule for side
SSS
Cosine rule for angle
Sign check
cos > 0 acute, < 0 obtuse
Pythagoras
Special case: C = 90°
Interactive: Cosine Rule Solver
Practice using the cosine rule to find missing sides and angles. Test your calculations with instant feedback.
Jump your way to the top by answering questions on cosine rule, sine rule, and choosing the right method. The higher you climb, the harder the questions.
Your Badges
0 of 6Mark lesson as complete
Tick when you've finished Learn, Practice and the Stretch. Earns +85 XP and +25 coins.