8.2 Non-right Triangles: Law of Cosines

Supplies the tool for the two cases the law of sines cannot start. Presents the law of cosines as the Pythagorean theorem with a correction term, uses it for SAS and SSS triangles, shows why solving for an angle with it is never ambiguous, and reaches areas from three sides with Heron's formula.

Subject: Precalculus · 65 slides · symbolic lesson

Open the interactive version of this deck

What this lesson covers

The lesson, slide by slide

1. Lesson 8.2 Non-right Triangles: Law of Cosines

Title

Precalculus · Chapter 8 — Further Applications of Trigonometry

§8.2 Non-right Triangles: Law of Cosines, pp. 923-938

2. By the end of this lesson you can

Objectives

Five things, each one you can check yourself on paper.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 923-938 — the pages these objectives are drawn from

3. Before we start: what if the angle is not quite right?

Warm-up

The Pythagorean theorem needs a right angle. Most triangles do not have one.

Discussion prompt

Two sides of length 3 and 4 meet at an angle slightly less than a right angle. Is the third side more or less than 5?

Hint: Closing the angle brings the far ends closer.

Answer:

Closing the angle brings the two far ends closer together, so the third side is shorter than 5.

And opening the angle past a right angle would push them apart, making it longer. So the third side depends on the angle continuously.

So the Pythagorean theorem needs a correction term that depends on the angle — negative when the angle is acute, zero when it is right, positive when obtuse. That correction is exactly what the law of cosines supplies.

4. The Pythagorean theorem with a correction

Concept

The square of a side equals the sum of the other two squares, minus a term proportional to the cosine of the angle between them.

\[ c^2=a^2+b^2-2ab\cos C \]

When the angle is right its cosine is zero and the correction vanishes, recovering the Pythagorean theorem exactly. That special case is a good way to check the formula has been written down correctly.

Figure (svg): A card showing the law of cosines as the Pythagorean theorem plus a correction term that vanishes at a right angle

Reading it this way makes the formula memorable and its sign behaviour obvious: closing the angle shortens the opposite side, and the correction term is exactly the amount.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 923-927

5. The law and its structure

Section

Section 1

6. One pattern, three instances

Concept

Each version squares the side being found, adds the squares of the other two, and subtracts twice their product times the cosine of the angle opposite the target side.

Only one version needs to be remembered, since the other two follow by relabelling. What must be got right is the pairing: the angle in the formula is opposite the side on the left, and using any other angle gives a wrong answer.

Figure (svg): A triangle with the law of cosines written for each side, showing that the angle used is always the one opposite the side being found

The pattern is identical in all three: the side being found is squared on the left, the other two sides appear on the right, and the angle is the one opposite the target side.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 923-928

7. The same pattern three ways

Picture it

Each version targets a different side.

Figure (svg): A triangle with the law of cosines written for each side, showing that the angle used is always the one opposite the side being found

The pattern is identical in all three: the side being found is squared on the left, the other two sides appear on the right, and the angle is the one opposite the target side.

The structure is identical every time. Writing the target side first and then filling in the other two makes the correct angle obvious.

8. Worked example: an SAS triangle

Worked example

Two sides and the angle between them.

\[ \text{Find } c \text{ when } a=7, \; b=9, \; C=40^\circ. \]

Write the law for c

Why: The angle C is opposite it.

\[ c ^{2} = a ^{2} + b ^{2} - 2 a b \cos C \]

Substitute

Why: All three values known.

\[ 49 + 81 - 126 \cos 40 \]

Evaluate the cosine

Why: About 0.766.

\[ 130 - 96.5 \]

Take the square root

Why: The side length.

\[ \sqrt{33.5} \]

Figure (svg): A card showing the law of cosines as the Pythagorean theorem plus a correction term that vanishes at a right angle

Reading it this way makes the formula memorable and its sign behaviour obvious: closing the angle shortens the opposite side, and the correction term is exactly the amount.

\[ c\approx 5.8 \]

Verify: compare with the right-angle case

Why: If C were a right angle, c would be the root of 130, about 11.4. A 40 degree angle is much closer, so a shorter third side is expected — and 5.8 is well under 11.4. The correction term did what the warmup predicted.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 924-927

9. Predict the correction's sign

Prediction

The angle between the two sides is obtuse.

Predict first

What does the correction term do to the third side?

  • Lengthens it, since the cosine is negative
  • Shortens it
  • Leaves it unchanged
  • It depends on the side lengths

Correct: Lengthens it, since the cosine is negative.

Why: Subtracting a negative adds, so the square of the third side exceeds the sum of the other two squares. That matches the geometry: opening the angle past a right angle pushes the far ends apart.

10. Worked example: check against Pythagoras

Worked example

The special case verifies the formula.

\[ \text{Apply the law of cosines with } C=90^\circ, \; a=3, \; b=4. \]

Write the law

Why: For side c.

\[ c ^{2} = 9 + 16 - 24 \cos 90 \]

Evaluate the cosine

Why: Of a right angle.

\[ 0 \]

Simplify

Why: The correction vanishes.

\[ c ^{2} = 25 \]

Take the root

Why: The hypotenuse.

\[ c = 5 \]

Figure (svg): The solution to Worked example check against Pythagoras shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ c=5 \]

Verify: confirm the reduction is general

Why: The correction term always has a factor of the cosine, so it vanishes for any right angle regardless of the side lengths. The Pythagorean theorem is therefore a special case rather than a separate fact, which is the cleanest way to remember the formula's shape.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 927-928

11. Trap: using an angle that is not opposite the target side

Trap

The trap

\[ c^2=a^2+b^2-2ab\cos A \]

Substitute whichever angle is known

Why: The formula is written with A because A is the angle given.

The result is a number with no relation to the triangle.

The fix

The angle must be opposite the side on the left. For side c that is angle C, always.

If a different angle is known, either relabel so the known angle is opposite the target, or write the version for a different side.

Write the target side first and let it pick the angle. The pairing is forced, and treating it as a choice is what produces the error.

12. Write the law for a different side

Faded example

Targeting side b this time.

Fill in the blanks

b^2=a^2+c^2-2ac\cos B, \textb ___

Why: The angle is always the one opposite the target side, so targeting b uses angle B. The other two sides appear on the right in both the squares and the product, which fixes the whole formula.

13. Is this version correctly written?

Sorting

The angle must face the target side.

Sort into buckets

Sort each formula.

Correct
c^2 = a^2 + b^2 - 2ab cos C; b^2 = a^2 + c^2 - 2ac cos B
Wrong angle
a^2 = b^2 + c^2 - 2bc cos B; c^2 = a^2 + b^2 - 2ab cos A
ok
In both, the angle named is opposite the side on the left, and the two sides in the product are the other two. Everything is consistent.
no
In both, the angle is not opposite the target side. The formula becomes a false statement and produces a number unrelated to the triangle.

14. Explain the correction term

Explain it to yourself

The law is Pythagoras plus a term.

Discussion prompt

Explain what that term is measuring.

Hint: What happens as the angle changes?

Answer:

It measures how far the angle is from a right angle, scaled by the two side lengths. At exactly ninety degrees the cosine is zero and it disappears.

For an acute angle the cosine is positive, so subtracting shortens the third side — which matches the far ends being pulled together.

For an obtuse angle the cosine is negative, so the term adds and the side is longer than Pythagoras would give. The formula encodes the geometry continuously, which is why reading it as a correction makes both the shape and the signs memorable.

15. The SAS case

Section

Section 2

16. Third side first, then finish with the law of sines

Concept

Two sides and their included angle determine the triangle. The law of cosines gives the third side, after which a complete pair exists and the law of sines finishes the job.

The last point is a practical safeguard. The inverse sine cannot return an obtuse angle, so applying it to the angle opposite the shorter side — which cannot be the obtuse one — avoids the issue entirely. The remaining angle then comes from the angle sum, where no ambiguity is possible.

Figure (svg): A triangle with the law of cosines written for each side, showing that the angle used is always the one opposite the side being found

The pattern is identical in all three: the side being found is squared on the left, the other two sides appear on the right, and the angle is the one opposite the target side.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 928-932

17. The triangle to solve

Picture it

One application of the law of cosines opens up the rest.

Figure (svg): A triangle with the law of cosines written for each side, showing that the angle used is always the one opposite the side being found

The pattern is identical in all three: the side being found is squared on the left, the other two sides appear on the right, and the angle is the one opposite the target side.

After the third side is known, every subsequent step is the law of sines or a subtraction. The cosine law is used exactly once.

18. Worked example: solve an SAS triangle completely

Worked example

Cosines once, then sines.

\[ \text{Solve with } a=10, \; b=14, \; C=52^\circ. \]

Find the third side

Why: The law of cosines.

\[ c ^{2} = 100 + 196 - 280 \cos 52 \]

Compute

Why: Take the root.

\[ c = 11.1 \]

Find the smaller remaining angle

Why: Opposite the shorter side a.

\[ \sin A = 10 \sin 52 / 11.1 \]

Compute and finish

Why: Inverse sine, then the angle sum.

\[ A = 45.3, B = 82.7 \]

Figure (svg): The solution to Worked example solve an SAS triangle completely shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ c\approx 11.1,\; A\approx 45.3^\circ,\; B\approx 82.7^\circ \]

Verify: check the ordering

Why: The sides from shortest to longest are 10, 11.1 and 14, and the opposite angles are 45.3, 52 and 82.7 — the same order. That correspondence confirms every value at once, and the three angles sum to 180 as they must.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 929-931

19. Predict which angle could be obtuse

Prediction

A triangle has sides 7, 9 and 12.

Predict first

Which angle might be obtuse?

  • The one opposite the side of length 12
  • The one opposite the side of length 7
  • Any of them
  • None of them

Correct: The one opposite the side of length 12.

Why: The largest angle always faces the longest side, and at most one angle in a triangle can be obtuse. So only that angle is in doubt, which is why the other two can safely be found with the inverse sine.

20. Worked example: why the smaller angle first

Worked example

It removes the ambiguity before it can arise.

\[ \text{Explain why to apply the law of sines to the angle opposite the shorter side.} \]

Recall the inverse sine's range

Why: Only acute angles for positive inputs.

Note which angle could be obtuse

Why: Only the one facing the longest side.

Choose the other one

Why: It must be acute.

Get the last angle by subtraction

Why: The angle sum.

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

\[ \text{smaller angle}\;\Rightarrow\;\text{acute}\;\Rightarrow\;\text{no ambiguity} \]

Verify: check that at most one angle can be obtuse

Why: Two obtuse angles would already exceed a straight angle, so at most one exists and it faces the longest side. Every other angle is acute, and the inverse sine handles acute angles correctly — which is exactly why this ordering works.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 931-932

21. Find the error: taking the inverse sine of the largest angle

Error analysis

A student finishes an SAS triangle by finding the angle opposite the longest side.

Annotate

On: \( \sin B=0.93 \;\Longrightarrow\; B=68.4^\circ \)

  • The inverse sine has returned an acute angle, as it always does.
  • But B faces the longest side, so it may well be the obtuse angle.
  • Its supplement, 111.6 degrees, has the same sine and may be the true value.
  • Solving for the smaller angle instead avoids the question entirely.
  • The remaining angle then comes from the angle sum, with no ambiguity.

The ambiguity here is avoidable rather than intrinsic — unlike the SSA case, the triangle is fully determined and only the method introduced the doubt. Choosing which angle to solve for is what removes it.

22. Complete an SAS solution

Faded example

After the third side is found.

Fill in the blanks

\frac1011.1=\frac______ \;\Longrightarrow\; \sin A=\frac___\sin 52^\circ}___}

Why: The third side creates a complete pair, so the law of sines applies with the known angle C and its side c. Solving for A rather than B is deliberate: A faces the shorter of the two remaining sides, so it cannot be obtuse and the inverse sine returns it correctly.

23. Which law for this step?

Sorting

Cosines to start, sines to finish.

Sort into buckets

Sort each step of an SAS solution.

Law of cosines
find the side opposite the known angle; find the third side from two sides and the angle between
Law of sines or the angle sum
find a second angle once three sides are known; find the last angle
cos
Both find a side from two sides and the included angle, which is exactly what the law of cosines does and what the law of sines cannot start on.
other
Both come after a complete pair exists, so the law of sines applies — and the last angle is fastest by subtraction from the angle sum.

24. What is the first move?

Step zero

You have two sides and the angle between them.

Discussion prompt

What do you compute first?

Hint: What does the law of cosines give directly?

Answer:

The third side, using the law of cosines with the known angle — which is opposite exactly that side.

This is the only step the law of sines cannot do, so it is the one that needs the harder tool. Everything afterwards is easier.

Once the third side is known, a complete pair exists and the rest is the law of sines and a subtraction. Recognising that the cosine law is used exactly once keeps the solution short.

25. The SSS case

Section

Section 3

26. Rearrange to solve for an angle

Concept

With three sides known, the law of cosines rearranges to give the cosine of any angle, and the inverse cosine returns it with no ambiguity.

Finding the largest angle first is the mirror of the SAS advice: once the only possibly-obtuse angle is settled by the cosine, every remaining angle is acute and the sine law is safe. Either order works so long as the obtuse candidate is handled by the cosine.

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 932-935

27. Why the cosine has no ambiguity

Picture it

Its sign separates acute from obtuse.

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

The inverse cosine's range is the whole span from zero to a straight angle, so it can return any triangle angle. The inverse sine's range covers only the acute ones.

28. Worked example: find an angle from three sides

Worked example

Rearrange and take the inverse cosine.

\[ \text{Find the largest angle with } a=7, \; b=9, \; c=12. \]

Identify the largest angle

Why: It faces the longest side.

Rearrange the law

Why: Isolate the cosine.

\[ \cos C = \frac{a ^{2} + b ^{2} - c ^{2}}{2 a b} \]

Substitute

Why: The three side lengths.

\[ \frac{49 + 81 - 144}{126} \]

Take the inverse cosine

Why: A negative input.

\[ \cos C = -0.111, C = 96.4 \]

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

\[ C\approx 96.4^\circ \]

Verify: check the sign's meaning

Why: The cosine came out negative, which the inverse cosine turned into an obtuse angle without any supplement being considered. Compare with Pythagoras: 49 plus 81 is 130, less than 144, so the angle must exceed a right angle — confirming the result independently.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 933-935

29. Predict the angle from the sign

Prediction

The law of cosines gives a negative cosine.

Predict first

What does that say about the angle?

  • It is obtuse
  • It is acute
  • It is right
  • The triangle is impossible

Correct: It is obtuse.

Why: The cosine is negative only for angles between a right angle and a straight one, which within a triangle means obtuse. No further checking is needed — the sign carries the information the sine's would not.

30. Worked example: solve an SSS triangle completely

Worked example

One cosine, then a sine, then a subtraction.

\[ \text{Solve the triangle with sides } 5, \; 6, \; 8. \]

Find the largest angle

Why: Opposite the side of 8.

\[ \cos = \frac{25 + 36 - 64}{60} = -0.05 \]

Take the inverse cosine

Why: Slightly obtuse.

\[ 92.9 ^\circ \]

Find a second angle

Why: By the law of sines.

\[ \sin = 5 \sin 92.9 / 8 \]

Finish by subtraction

Why: The angle sum.

\[ 38.6\text{ and } 48.5 \]

Figure (svg): The solution to Worked example solve an SSS triangle completely shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ 38.6^\circ,\;48.5^\circ,\;92.9^\circ \]

Verify: check the sum and the ordering

Why: The three angles sum to 180 degrees, and their order matches the order of the opposite sides 5, 6 and 8. Both checks pass, and doing the obtuse angle first with the cosine meant the sine law was applied only to an acute one.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 935-936

31. Trap: expecting an ambiguous case in SSS

Trap

The trap

\[ \cos C=-0.111 \;\Longrightarrow\; C=96.4^\circ \text{ or } 263.6^\circ? \]

Look for a second candidate as in SSA

Why: The supplement or the reflex angle is considered.

Time is spent testing possibilities that cannot occur.

The fix

There is no ambiguity here. The inverse cosine's range runs from zero to a straight angle, which is exactly the range of possible triangle angles.

Each cosine value corresponds to exactly one such angle, and its sign already says whether the angle is acute or obtuse.

Three sides determine a triangle uniquely, which is the SSS congruence criterion. The absence of ambiguity is guaranteed by geometry, not just by the formula.

32. Rearrange for the cosine

Faded example

Solving the law for the angle.

Fill in the blanks

\cos C=\frac2}}}2ab}

Why: Moving the correction term to one side and dividing isolates the cosine. The numerator compares the sum of two squares with the third, which is exactly the Pythagorean comparison that decides the angle type.

33. Which angle type does this indicate?

Sorting

Compare the sum of the two smaller squares with the largest.

Sort into buckets

Sort each comparison.

Angle C is acute or right
a^2 + b^2 greater than c^2; a^2 + b^2 equal to c^2
Angle C is obtuse
a^2 + b^2 less than c^2; the numerator comes out negative
acute
A positive or zero numerator gives a positive or zero cosine, which means an angle at or below a right angle. The equality case is exactly the Pythagorean one.
obtuse
A negative numerator gives a negative cosine and hence an obtuse angle. This is the same comparison the Pythagorean theorem makes, extended to non-right triangles.

34. Explain the absence of ambiguity

Explain it

SSA was ambiguous and SSS is not.

Discussion prompt

Explain to a classmate why the difference exists.

Hint: Compare the two inverse functions' ranges.

Answer:

The inverse sine returns only acute angles for positive inputs, so an obtuse triangle angle has to be found by taking a supplement — and whether to do so is a separate question.

The inverse cosine's range runs from zero to a straight angle, which is exactly the range of possible triangle angles. Each cosine value maps to one of them and no other.

So the cosine carries the information the sine loses: its sign already distinguishes acute from obtuse. A good explanation adds that SSS is a congruence criterion, so the uniqueness is guaranteed by geometry too — the formula and the geometry agree.

35. Heron's formula

Section

Section 4

36. Area from three sides alone

Concept

Half the perimeter, called the semiperimeter, combines with the three sides in a single square root to give the area — with no angle required.

The alternative for an SSS triangle is to find an angle with the law of cosines and then use the sine area formula, which works but takes three steps and accumulates rounding. Heron's formula reaches the same answer in one.

Figure (svg): A card giving Heron's formula for the area of a triangle from its three side lengths via the semiperimeter

For an SSS triangle this reaches the area in one step, where finding an angle first and then using the sine formula would take three.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 935-938

37. Heron's formula

Picture it

One computation from three side lengths.

Figure (svg): A card giving Heron's formula for the area of a triangle from its three side lengths via the semiperimeter

For an SSS triangle this reaches the area in one step, where finding an angle first and then using the sine formula would take three.

Every factor under the root involves the semiperimeter, which is why computing it first and reusing it is the efficient order.

38. Worked example: apply Heron's formula

Worked example

Semiperimeter first.

\[ \text{Find the area of a triangle with sides } 5, \; 6, \; 7. \]

Compute the semiperimeter

Why: Half the perimeter.

\[ s = 9 \]

Compute the three differences

Why: Semiperimeter minus each side.

\[ 4, 3, 2 \]

Form the product

Why: All four factors.

\[ 9 \times 4 \times 3 \times 2 \]

Take the square root

Why: The area.

\[ \sqrt{216} \]

Figure (svg): A card giving Heron's formula for the area of a triangle from its three side lengths via the semiperimeter

For an SSS triangle this reaches the area in one step, where finding an angle first and then using the sine formula would take three.

\[ \text{Area}=6\sqrt{6}\approx 14.7 \]

Verify: compare with a rough estimate

Why: The triangle is close to equilateral with side about 6, and an equilateral triangle of side 6 has area about 15.6. A slightly irregular triangle of similar size having area 14.7 is entirely plausible, which is a useful order-of-magnitude check.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 936-937

39. Compute a semiperimeter

Faded example

Sides of 9, 10 and 11.

Fill in the blanks

s=\frac215}=___

Why: The semiperimeter is half the sum of the three sides. Every factor in Heron's formula is built from it, so computing it first and reusing it is the efficient order.

40. Worked example: compare the two routes

Worked example

The same area, two ways.

\[ \text{Find the area of the same triangle using an angle instead.} \]

Find an angle

Why: The law of cosines.

\[ \cos C = \frac{25 + 36 - 49}{60} = 0.2 \]

Take the inverse cosine

Why: The angle between sides 5 and 6.

\[ 78.5 ^\circ \]

Apply the sine area formula

Why: Half the product times the sine.

\[ (\frac{1}{2}) (5) (6) \sin 78.5 \]

Compute

Why: Evaluate.

\[ 14.7 \]

Figure (svg): The solution to Worked example compare the two routes shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ \text{Area}\approx 14.7 \]

Verify: compare the two methods

Why: Both give 14.7, as they must. But this route took an inverse cosine and a sine evaluation, each rounding once, where Heron's took a single square root — so for an SSS triangle Heron's is both shorter and slightly more accurate.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 937-938

41. Find the error: using the perimeter instead of the semiperimeter

Error analysis

A student applies Heron's formula to a 5-6-7 triangle.

Annotate

On: \( s=5+6+7=18, \; \text{Area}=\sqrt{18(13)(12)(11)} \)

  • The full perimeter has been used where the semiperimeter belongs.
  • The letter s stands for half the perimeter, not the whole.
  • The correct value is 9, giving differences of 4, 3 and 2.
  • The wrong version gives about 50 rather than 14.7.
  • A rough size estimate exposes the error immediately.

The wrong answer is over three times too large, which a quick comparison against a similar-sized familiar triangle catches at once. Estimating the area before computing it is a cheap safeguard.

42. Predict when Heron's formula is best

Prediction

You need a triangle's area.

Predict first

When is Heron's formula the right tool?

  • When all three sides are known and no angle is
  • When two sides and the included angle are known
  • When two angles are known
  • Always

Correct: When all three sides are known and no angle is.

Why: With an included angle available the sine formula is one step, so Heron's offers nothing. Its value is in the SSS case, where the alternative requires finding an angle first.

43. Which area method applies?

Sorting

It depends on what is known.

Sort into buckets

Sort each situation.

Heron's formula
three sides known; all three side lengths measured
A simpler formula
two sides and the angle between; a base and a perpendicular height
heron
Both give three sides and no angle, which is exactly the case Heron's formula was made for. The alternative would need an angle computed first.
other
The first is the sine area formula in one step and the second is half base times height. Neither needs Heron's, and both are shorter.

44. Explain the value of Heron's formula

Explain it to yourself

The same area could be found another way.

Discussion prompt

Explain what Heron's formula saves.

Hint: Count the steps in each route.

Answer:

Without it, an SSS area needs the law of cosines to find an angle, then an inverse cosine, then the sine area formula — three steps with three opportunities for rounding.

Heron's does it in one square root from the side lengths directly, with no trigonometry at all.

So it is both faster and slightly more accurate, since intermediate rounding is avoided. It also needs no calculator with trigonometric functions, which is why it long predates them and remains the surveyor's formula for an area from measured distances.

45. Choosing between the two laws

Section

Section 5

46. One test decides

Concept

Look for a complete side-angle pair. If one exists, the law of sines is usually shorter; if none does, the law of cosines is the only way to start.

The law of cosines is always usable when the law of sines is, but it involves more arithmetic and a square root. Using the simpler tool when it applies is worth the moment spent checking.

knownstart withthen
AAS or ASAthe law of sinesfinish with the same law
SSAthe law of sinestest both candidates
SASthe law of cosinesthen the law of sines
SSSthe law of cosinesthen the law of sines
three sides, area onlyHeron's formulanothing further

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 923-938

47. The two inverse functions compared

Picture it

This difference is why the cosine law never produces two candidates.

Figure (svg): A contrast between solving for an angle with the sine, which is ambiguous, and with the cosine, which is not

The cosine's sign distinguishes acute from obtuse, so the inverse cosine returns the right angle with no second candidate to test.

The practical upshot is a rule of thumb: handle any possibly-obtuse angle with the cosine, and everything else with the sine.

48. Worked example: choose the tool

Worked example

Read the given data and decide.

\[ \text{Given } b=11, \; c=14, \; A=38^\circ, \text{ which law starts?} \]

Identify the case

Why: Two sides and the angle between them.

Look for a complete pair

Why: A is known but a is not.

Conclude

Why: The law of sines cannot start.

Apply it

Why: For the side opposite A.

\[ a ^{2} = 121 + 196 - 308 \cos 38 \]

Figure (svg): A card showing the law of cosines as the Pythagorean theorem plus a correction term that vanishes at a right angle

Reading it this way makes the formula memorable and its sign behaviour obvious: closing the angle shortens the opposite side, and the correction term is exactly the amount.

\[ a\approx 8.7 \]

Verify: check the angle A is opposite a

Why: Angle A lies between sides b and c, so the side opposite it is a — which is exactly the side the formula targets. Had a different angle been given, the formula would have targeted a different side and the setup would change.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 928-933

49. Predict the tool

Prediction

Three side lengths are known and an angle is wanted.

Predict first

Which law applies?

  • The law of cosines
  • The law of sines
  • Either works
  • Neither; more data is needed

Correct: The law of cosines.

Why: No angle is known, so no ratio in the law of sines can be computed. The law of cosines rearranges to give any angle's cosine from the three sides, and the inverse cosine returns it unambiguously.

50. Worked example: a mixed strategy

Worked example

Both laws in one problem.

\[ \text{Solve with } a=13, \; b=8, \; C=71^\circ. \]

Find the third side

Why: The law of cosines.

\[ c ^{2} = 169 + 64 - 208 \cos 71 \]

Compute

Why: Take the root.

\[ c = 12.6 \]

Find the smallest angle

Why: Opposite the shortest side b.

\[ \sin B = 8 \sin 71 / 12.6 \]

Finish

Why: Inverse sine, then subtract.

\[ B = 36.9, A = 72.1 \]

Figure (svg): The solution to Worked example a mixed strategy shown as a ladder of expressions, one row per legal move

The whole solution at once: each drop is one legal move.

\[ c\approx 12.6,\; A\approx 72.1^\circ,\; B\approx 36.9^\circ \]

Verify: check the ordering and sum

Why: The sides 8, 12.6 and 13 face angles 36.9, 71 and 72.1 respectively — the same order. And the three angles sum to 180. Solving for B rather than A with the sine law was the right choice, since B faces the shortest side and so cannot be obtuse.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 930-936

51. Trap: using the law of cosines when the sine law would do

Trap

The trap

\[ \text{two angles and a side known, so set up a cosine equation} \]

Reach for the more general tool

Why: The law of cosines is used because it always applies.

The equation involves a square root and more arithmetic than needed.

The fix

When a complete pair exists the law of sines is shorter, needing one division rather than squares and a root.

The cosine law is more general but not more convenient, and every extra operation is an extra chance to round or slip.

Check for a pair first. It takes a glance and decides between a one-line solution and a three-line one.

52. Match the case to its opening move

Matching

Each case has one natural first step.

Match the pairs

  • l1. SAS
  • l2. SSS
  • l3. ASA
  • l4. three sides, area wanted
  • r1. cosine law for the third side
  • r2. cosine law for the largest angle
  • r3. the angle sum, then the sine law
  • r4. Heron's formula

Why: Each opening move is the shortest available for that data. The first two need the cosine law because no complete pair exists, and the third has one available as soon as the angle sum is used.

53. Decide which law

Faded example

Two sides and the angle between them are known.

Fill in the blanks

b=11,\; c=14,\; A=38^\circ \;\Longrightarrow\; a^2}=b^2+c^2-2bc\cos A

Why: The known angle sits between the two known sides, so it is opposite the unknown third side. Without a complete pair the law of sines has nothing to compute, and the cosine law supplies the missing side.

54. Explain the choice

Explain it

Two laws, five cases.

Discussion prompt

Explain to a classmate how to choose between them quickly.

Hint: One question settles it.

Answer:

Ask one question: is there a side with its opposite angle both known? If yes, the law of sines can start; if no, it cannot.

That single test covers all five cases. AAS, ASA and SSA give a pair; SAS and SSS do not.

And add the refinement: when both would work, prefer the sine law — it is one division rather than squares and a root. A good explanation notes that the cosine law is always valid but rarely the shorter route, so generality is not the same as convenience.

55. The two laws side by side

Comparison

Fill the blanks from memory. Which to use is decided by one question.

Comparison matrix

law of sineslaw of cosines
needsa complete side-angle pairtwo sides and the included angle, or all three sides
casesAAS, ASA, SSASAS, SSS
ambiguityyes, in SSAnone, the cosine's sign settles it
reduces tonothing simplerthe Pythagorean theorem at a right angle

The third row is the practical reason to reach for the cosine law whenever an angle might be obtuse, even in a case the sine law could handle.

56. Solving with the law of cosines, in order

Pattern

Five steps, and the fourth is the safeguard.

  1. Draw and label, confirming which angle faces which side.
  2. Write the version whose left side is the quantity you want.
  3. Substitute and solve, taking a square root for a side or an inverse cosine for an angle.
  4. For the remaining angles, use the sine law on an angle that cannot be obtuse.
  5. Check the angle sum and that the largest angle faces the longest side.

Step 4 is what keeps the SSA ambiguity from reappearing in a case that is not actually ambiguous. Choosing the right angle to solve for costs nothing.

OpenStax Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines §10.2

57. Check yourself 1 of 3

Check

The structure of the law.

Check your understanding

In the law of cosines for side c, which angle appears?

  • A. Angle C, which is opposite side c (correct)
  • B. Angle A
  • C. The largest angle
  • D. Any of the three

Answer: A

Why: The angle is always the one opposite the side on the left. Using any other angle makes the equation false and produces a number unrelated to the triangle.

Why B tempts people
Angle A pairs with side a; using it for c breaks the pattern.
Why C tempts people
Size is irrelevant; the pairing is by position.
Why D tempts people
Only the opposite angle makes the formula true.

58. Check yourself 2 of 3

Check

Ambiguity.

Check your understanding

Why does solving for an angle with the law of cosines produce no ambiguity?

  • A. The inverse cosine's range covers every possible triangle angle (correct)
  • B. Because three sides always give an acute triangle
  • C. Because the cosine is always positive
  • D. There is ambiguity; it is just usually ignored

Answer: A

Why: The inverse cosine returns angles from zero to a straight angle, exactly the range a triangle angle can occupy, and each cosine value maps to one of them. The sign already distinguishes acute from obtuse.

Why B tempts people
Three sides can perfectly well give an obtuse triangle.
Why C tempts people
A negative cosine is common and signals an obtuse angle.
Why D tempts people
SSS is a congruence criterion, so the triangle is genuinely unique.

59. Check yourself 3 of 3

Check

Heron's formula.

Check your understanding

In Heron's formula, what does s represent?

  • A. Half the perimeter (correct)
  • B. The full perimeter
  • C. The longest side
  • D. The area

Answer: A

Why: The semiperimeter is half the sum of the three sides, and every factor under the root is built from it. Using the full perimeter roughly triples the computed area.

Why B tempts people
Using the whole perimeter gives an answer several times too large.
Why C tempts people
The individual sides appear only in the differences from s.
Why D tempts people
The area is the result of the formula, not an input to it.

60. Where this shows up outside the classroom

Real world

Satellite positioning is a law-of-cosines computation repeated continuously.

Discussion prompt

A receiver knows its distance to several satellites whose positions are known. How does that fix its position?

Hint: What triangle do two satellites and the receiver form?

Answer:

Two satellites and the receiver form a triangle in which all three sides can be known — the two measured distances and the separation between the satellites, computed from their orbits.

That is the SSS case, so the law of cosines gives every angle, which places the receiver relative to the satellite pair. Additional satellites resolve the remaining freedom.

The computation runs continuously as the satellites move, which is why it has to be fast and unambiguous — and the cosine law's lack of a second candidate matters here. A method that returned two possible positions would need extra work to discard one, at every update.

61. Commit before you check

Commit first

State your confidence along with your answer.

Predict first

Why does the law of cosines reduce to the Pythagorean theorem?

  • The correction term contains a cosine, which is zero at a right angle
  • Because right triangles are a different case entirely
  • Because the sides are then all equal
  • It does not reduce to it

Correct: The correction term contains a cosine, which is zero at a right angle.

Why: With the cosine zero the entire correction vanishes regardless of the side lengths, leaving the sum of the two squares. So the Pythagorean theorem is a special case rather than a separate result, which is the clearest way to remember the formula's shape.

62. Explain it to someone who missed the lesson

Explain it

The test of understanding is being able to say why, not just what.

Discussion prompt

Explain to a classmate how to remember the law of cosines without memorising it as a string of symbols.

Hint: What does it become at a right angle?

Answer:

Start from the Pythagorean theorem, which they already know. The law of cosines is that, with a correction added for the angle not being right.

The correction is twice the product of the two sides times the cosine of the angle between them, subtracted. At ninety degrees the cosine is zero and it disappears.

And the sign behaviour follows the geometry: an acute angle shortens the third side and an obtuse one lengthens it, which is what the cosine's sign delivers. A good explanation ends by noting that this reading makes the formula reconstructible rather than recalled.

63. Exit ticket

Exit ticket

One honest answer, so the next lesson can start in the right place.

Predict first

Which idea from this lesson would you most want to see again?

  • The law as a corrected Pythagorean theorem
  • Solving an SAS triangle
  • Solving an SSS triangle and the absence of ambiguity
  • Heron's formula

Correct: Any of these is a legitimate answer; the useful one is the honest one.

Why: There is no correct choice here. The first is what makes the formula stick. The third contains the most useful practical habit — handle any possibly-obtuse angle with the cosine and everything else with the sine.

64. Draw the map

Connect it up

One page, drawn from memory, is worth more than rereading the section.

Draw it

Write the law of cosines and beside it show what happens when the angle is right. Underneath, work one SAS triangle and one SSS triangle from start to finish, noting at each step which law you used and why. In a box, write Heron's formula and the case it is for.

If your two worked triangles each show why the cosine law was needed to start and why the sine law was safe to finish with, the section's decision structure is on the page.

65. What you can do now

Recap

Five things, and the first makes the formula reconstructible.

if you remember one thingit should be this
about the formulaPythagoras plus a correction that vanishes at a right angle
about the pairingthe angle is opposite the side on the left
about ambiguitythe cosine's sign settles acute versus obtuse
about areaHeron's for three sides, the sine formula for an included angle

Section 8.3 leaves triangles behind for polar coordinates, describing a point by a distance and a direction rather than by two perpendicular displacements.

OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines §8.2, pp. 923-938 — everything on these slides traces back here

Sources

  1. OpenStax, Precalculus, §8.2 Non-right Triangles: Law of Cosines
  2. OpenStax Algebra and Trigonometry 2e, §10.2 Non-right Triangles: Law of Cosines

Want this taught 1-on-1? Alexander tutors Precalculus — $55/session, free consultation.

Book on Wyzant · Text (657) 465-8108