Hersi Maths WhatsApp me

Understand · explore · practise

Cosine rule

Find missing sides and angles with the cosine rule. Includes opposite-side labels, bearings, algebraic lengths, triangle inequalities and minimum-length problems.

Before you startPythagoras, right-triangle trigonometry and solving quadratics

01 / Choose the rule

Match every angle to its opposite side.

In triangle ABC, lowercase a is opposite angle A, b is opposite B, and c is opposite C. A side is opposite an angle when it does not touch that vertex.

The cosine rule connects three sides with one angle. Use it for two sides and their included angle (SAS), or for all three sides (SSS). An included angle lies between the two known sides.

a² = b² + c² − 2bc cos A

All three lengths must use the same unit. This chapter uses degrees: check your calculator is in degree mode.

Right-triangle refresher

sin θ = opposite / hypotenuse
cos θ = adjacent / hypotenuse
tan θ = opposite / adjacent

These side-ratio definitions apply directly to an acute angle of a right triangle. For an ordinary triangle, use the sine or cosine rule instead of pretending it has a right angle.

02 / Find a side

Keep the angle between the two known sides.

In the model, b = 5 and c = 7 stay fixed. Change their included angle A. The opposite side a grows as A increases from 0° towards 180°.

A = 120°: a² = 5² + 7² − 2(5)(7)cos 120°
= 74 − 70(−1/2) = 109
a = √109 ≈ 10.4

Take the positive square root because a length is positive. For an obtuse A, cos A is negative, so subtracting 2bc cos A adds to b² + c². Keep √109 or your calculator’s stored value for later work.

Two fixed sides, one changing angleChoose and compare
The cosine rule with a projected heightb = 5, c = 7, A = 60°. The opposite side is √39 ≈ 6.245. Its square is 74 − 70 cos A.ABCbcahA = 60° · b = 5 · c = 7a ≈ 6.24 · h ≈ 4.33

b = 5, c = 7, A = 60°. The opposite side is √39 ≈ 6.245. Its square is 74 − 70 cos A.

Watch the projection produce the cosine rule

Pause, replay or seek freely. The notes explain the same idea and stay in view.

03 / Why it works

Use a horizontal projection and Pythagoras.

Put A at (0,0), B at (c,0) and C at (b cos A, b sin A). The horizontal and vertical differences from B to C give:

a² = (c − b cos A)² + (b sin A)²
= c² − 2bc cos A + b²(cos² A + sin² A)
= b² + c² − 2bc cos A

The identity sin² A + cos² A = 1 comes from a unit circle and Pythagoras. This coordinate argument also handles an obtuse A: the projection b cos A is then negative. When A = 90°, the cosine term vanishes and the rule becomes Pythagoras.

04 / Find an angle

Rearrange first, then use inverse cosine.

cos A = (b² + c² − a²) / (2bc)

For sides 5, 7 and 8, the smallest angle is opposite 5. Using 7 and 8 as the adjacent sides:

The angle opposite 5Worked example

cos A = (7² + 8² − 5²)/(2 × 7 × 8)
= 11/14

Keep the exact ratio until the inverse-cosine step.

A = cos⁻¹(11/14) ≈ 38.2°

cos⁻¹ means inverse cosine, not 1/cos. In a triangle, 0° < A < 180° gives one angle for a valid cosine value.

05 / Check the triangle

Positive lengths alone do not guarantee a triangle.

The largest side must be shorter than the sum of the other two. Equality gives a flat, degenerate shape. For sides b and c, the third side satisfies:

|b − c| < a < b + c

If a proposed cosine value lies outside [−1,1], the data cannot form the requested triangle (or a calculation is wrong). The largest side faces the largest angle. That angle may be acute, right or obtuse; “largest” does not mean “obtuse”.

Classify the largest angle without finding it

Let a be the largest side. Compare a² with b² + c²: smaller gives an acute largest angle, equal gives a right angle, larger gives an obtuse angle. This follows from the sign of cos A.

06 / Lengths with an unknown

Solve the equation, then check every length.

Suppose two sides are x and x + 2, their included angle is 60°, and the opposite side is √28.

28 = x² + (x + 2)² − 2x(x + 2)(1/2)
28 = x² + 2x + 4
(x − 4)(x + 6) = 0

Only x = 4 gives positive lengths: 4, 6 and √28. Always check the geometric constraints after algebra, even if both roots are real.

Minimise a third side

Two sides have lengths x and 6 − x with included angle 120°, where 0 < x < 6. The opposite side d satisfies:

d² = x² + (6 − x)² + x(6 − x)
= x² − 6x + 36 = (x − 3)² + 27

The minimum occurs at the permitted value x = 3 and is d = 3√3. Minimising d² also minimises d because d is positive.

07 / Your turn

Identify the included angle before substituting.

Give exact answers where possible; otherwise use three significant figures.

01 · SAS

Two sides are 4 and 7 with included angle 60°. Find the opposite side.

Hint

cos 60° = 1/2.

Worked solution

a² = 16 + 49 − 28 = 37
a = √37

02 · Obtuse angle

Two sides are 3 and 8 with included angle 120°. Find the opposite side.

Hint

The cosine is negative.

Worked solution

a² = 9 + 64 − 48(−1/2) = 97
a = √97

03 · Find an angle

A triangle has sides 4, 6 and 8. Find its largest angle.

Hint

Place 8 opposite the angle.

Worked solution

cos A = (16 + 36 − 64)/48 = −1/4
A = cos⁻¹(−1/4) ≈ 104°

04 · Ratios of sides

The sides of a triangle are in the ratio 3 : 4 : 6. Find the cosine of the largest angle.

Hint

Use lengths 3k, 4k and 6k. The scale cancels.

Worked solution

cos A = (9k² + 16k² − 36k²)/(24k²)
= −11/24

05 · Possible lengths

Two sides are 5 and 9. What values can the third side t take?

Hint

Use both the sum and the absolute difference.

Worked solution

4 < t < 14

The endpoints are degenerate and are excluded.

06 · Algebraic length

Two sides are x and x + 1 with included angle 60°. The opposite side is √13. Find x.

Hint

Use cos 60° = 1/2 and require x > 0.

Worked solution

13 = x² + x + 1
x² + x − 12 = (x + 4)(x − 3) = 0
x = 3

07 · Can the triangle exist?

A student claims sides 2, 3 and 6 form a triangle. Test the claim two ways.

Hint

Compare the longest side with the other two, then calculate its cosine expression.

Worked solution

2 + 3 < 6
cos A = (4 + 9 − 36)/12 = −23/12

The triangle inequality fails and the proposed cosine is below −1. No such triangle exists.

08 · Minimum length

Two sides are x and 8 − x, with included angle 120° and 0 < x < 8. Find the minimum opposite side.

Hint

Complete the square for its square.

Worked solution

d² = x² − 8x + 64 = (x − 4)² + 48
x = 4 ⇒ d = 4√3

08 / Recap

Use the data to choose the rule.

  • SAS: the known angle must be between the two known sides.
  • SSS: use inverse cosine for the requested opposite angle.
  • An obtuse angle has negative cosine.
  • Keep unrounded values until the final answer.
  • Check positive lengths, strict triangle inequalities and any extra conditions.

Next: the sine rule →

Section 1 of 8 · Choose the rule