math.wiki
Geometry › Triangles › Triangle inequality
Open on the map
Math 7 · 7.G.A.2 · G.CO.C.10

Triangle inequality

You have three sticks. Will they close into a triangle, and if two of them are fixed, how long can the third be?

Where you are 18 in Triangles

Why this exists

Take three sticks of length 3, 4 and 8. Lay the long one down, and start the 3 stick at one end and the 4 stick at the other, both pointing inward. Together they reach only 3 + 4 = 7, one short of 8. However you turn them, their free ends cannot meet, so the three sticks cannot close into a triangle.

3 4 gap 1 8 3, 4, 8: no triangle 5 6 8 5, 6, 8: a triangle
Figure 1Sticks of 3, 4 and 8 leave a gap of 1, so they cannot close. Sticks of 5, 6 and 8 do.

Swap the two short sticks for a 5 and a 6. Together they reach 5 + 6 = 11, more than 8, and sticks of 5, 6 and 8 close up at once. Whether three lengths make a triangle is not a matter of luck or of how carefully you draw. It is decided by the three numbers alone, and the decision takes one addition.

That is worth having. A builder cutting three beams, a designer choosing the sides of a frame, and a surveyor checking three measured distances all ask the same question: can these three lengths be the sides of a triangle? And the question has a partner. If two sides are already fixed, how long can the third one be? Both questions are answered by one rule, the triangle inequality.

Definition

Write AB for the length of the segment \overline{AB}. In a triangle ABC name the sides by the corner they face, a = BC, b = CA and c = AB.

The triangle inequality says that in every triangle, any two sides together are longer than the third:

a < b + c \qquad b < a + c \qquad c < a + b

That is three statements, one for each side. “Longer than” means strictly longer: the sum is never equal to the third side in a real triangle.

The same rule in words about a journey: going from A to B by way of C is always a longer trip than going straight, unless C is already on the straight road between them.

Intuition

Fix a stick AB of length 8. Fasten a stick of length 3 to it at B with a pin, so that it swings freely. Its loose end C goes round a circle of radius 3 about B, and the third side of the triangle is the distance from A to C.

A B C D E
AD=5
AB=8
AE=11
Figure 2Swing the stick BC about B. The distance AC runs from 5 (at D) to 11 (at E). In between, ABC is a real triangle.

Watch that distance as the stick turns. With C at D, on the line toward A, the distance is 8 - 3 = 5. With C at E, on the far side, it is 8 + 3 = 11. At these two positions the three points lie on one straight line, so there is no triangle. At every other position A, B and C are a real triangle, and AC is somewhere strictly between 5 and 11. Because C moves smoothly, AC takes every value between the two ends.

So a triangle with sides 8 and 3 has a third side anywhere from just over 5 to just under 11, and nowhere else. Nothing about 8 and 3 was special. Swing any stick about any end and the same picture appears.

This is a picture of the rule, not a proof of it: it reads the two extremes off the figure. Why no triangle can reach them is proved in a lesson of its own, linked under Why it is true.

Results

Triangle Inequality. In every triangle, each side is shorter than the sum of the other two.

The converse (stated here without proof). If three positive lengths a \le b \le c have c < a + b, there is a triangle with those three sides, and only one: any two such triangles can be slid, turned and flipped onto each other.

Three consequences, each one used in the examples.

Only the longest side needs checking. For three positive lengths a \le b \le c, all three inequalities hold exactly when

c < a + b

The other two hold automatically, so one comparison settles the whole question: pass it and the converse gives a triangle, fail it and there is none.

The third side lies between the difference and the sum. If two sides are p and q, the third side x satisfies

|p - q| < x < p + q

and every x in that range gives a triangle. Figure 3 shows this for p = 8 and q = 3.

0 1 2 3 4 5 6 7 8 9 10 11 12
5 < x < 11
Figure 3With two sides 3 and 8, the third side x can be anything strictly between 5 and 11.

A side is less than half the perimeter. If the perimeter is P = a + b + c, then every side is shorter than half of it, c < P/2 for the longest side c. And the other way round: if the longest side is shorter than P/2, the three lengths make a triangle.

The range and the half-perimeter form each follow from the triangle inequality by a few lines of algebra, and the next section gives them.

Why it is true

The proof. Why no triangle can have a side as long as the other two together is a proof in its own right, and it has its own lesson: proving the triangle inequality indirectly. It proves the rule two ways, one by assuming the opposite and finding an angle of a triangle that is too big, and one directly from the order of sides and angles. This lesson states the rule and uses it, and does not repeat either proof.

Why only the longest side matters. With a \le b \le c, compare each side with the sum of the other two. For the side a: a \le c < c + b, because b is positive. For the side b: b \le c < c + a. Both are automatic. Only c < a + b can fail.

Where the range comes from. Start from the three inequalities for sides p, q and x:

x < p + q \qquad p < q + x \qquad q < p + x

The second says x > p - q and the third says x > q - p. One of p - q and q - p is the absolute value |p - q| and the other is its negative, so together they say x > |p - q|. With the first, |p - q| < x < p + q.

Where half the perimeter comes from. Add c to both sides of c < a + b:

2c < a + b + c = P \qquad\text{so}\qquad c < \frac{P}{2}

Every step reverses, so c < P/2 and c < a + b say the same thing.

Why passing the test is enough: stated, not proved. The converse says that if a, b and c are positive, a \le b \le c and c < a + b, then some triangle has sides a, b and c. This lesson uses it without proving it, and the swing picture shows why it is believable. Put the longest side down as AB, with AB = c, and swing a stick of length a about B. The distance from A to the free end starts at c - a and ends at c + a, and b lies strictly between the two:

c - a < b < c + a

The left half is the test c < a + b rearranged, and the right half is automatic, since b \le c < c + a. If the distance passes through every value on its way, it passes through b, and at that moment the three ends make the triangle. Making “passes through every value” exact needs more than this lesson has; a full proof is Theorem 3.18 in Petrunin’s book, listed in the references. The lesson triangle from three sides builds the triangle with a compass.

Worked examples

Example 1

Can these lengths be the sides of a triangle?

Decide for each set of lengths: (a) 7, 10, 12 (b) 4, 5, 11 (c) 6, 8, 14 (d) 1.2, 1.3, 2.4

Solution

Only the longest side can fail, so in each case compare the longest with the sum of the other two.

(a) The longest is 12, and 7 + 10 = 17. Since 12 < 17, the test passes: these make a triangle.

(b) The longest is 11, and 4 + 5 = 9. Since 11 is not less than 9, the test fails. No triangle.

(c) The longest is 14, and 6 + 8 = 14. The two sums are equal, and equal is not good enough: the test needs the longest to be strictly less. No triangle. The sticks lie end to end along the long one, exactly as in Figure 1 with the gap closed to nothing.

(d) The longest is 2.4, and 1.2 + 1.3 = 2.5. Since 2.4 < 2.5, these make a triangle, though a very flat one.

Example 2

The range of the third side

Two sides of a triangle are 5 and 9. (a) Between what values must the third side x lie? (b) How many whole-number values can x take? (c) Between what values does the perimeter lie?

Solution

(a) Write the three inequalities, one for each side:

\begin{aligned} x &< 5 + 9 = 14 \\ 9 &< 5 + x \\ 5 &< 9 + x \end{aligned}

The second gives x > 4. The third gives x > -4, which tells us nothing new, since a length is positive anyway. So

4 < x < 14

which agrees with |9 - 5| < x < 9 + 5.

(b) Both ends are left out. x = 4 and x = 14 are the flat cases, since 4 + 5 = 9 and 5 + 9 = 14. The whole numbers strictly between are 5, 6, \dots, 13, which is 9 of them.

(c) The perimeter is 5 + 9 + x = 14 + x. Adding 14 to every part of 4 < x < 14 gives 18 < 14 + x < 28. So the perimeter is strictly between 18 and 28.

Example 3

An isosceles triangle with two given lengths

An isosceles triangle has one side of length 3 and one side of length 8. Find its perimeter.

Solution

An isosceles triangle has two equal sides. The lengths 3 and 8 are different, so one of them must be the repeated one. There are two cases to test.

If the sides are 3, 3, 8, the longest is 8 and 3 + 3 = 6. Since 8 is not less than 6, this triangle does not exist.

If the sides are 3, 8, 8, the longest is 8 and 3 + 8 = 11. Since 8 < 11, the test passes.

Only the second works, so the sides are 3, 8, 8 and the perimeter is 3 + 8 + 8 = 19.

Example 4

Sides that depend on a variable

For which values of x are 2x, x + 5 and 4x - 7 the sides of a triangle?

Solution

We do not know which side is longest, so write all three inequalities, one for each side, and simplify each:

  • For 2x: 2x < (x + 5) + (4x - 7) becomes 2x < 5x - 2, so \displaystyle x > \frac{2}{3}.
  • For x + 5: x + 5 < 2x + (4x - 7) becomes x + 5 < 6x - 7, so \displaystyle x > \frac{12}{5}.
  • For 4x - 7: 4x - 7 < 2x + (x + 5) becomes 4x - 7 < 3x + 5, so x < 12.

The sides must also be positive. For the third side that says

4x - 7 > 0 \qquad\text{so}\qquad x > \frac{7}{4}

and once that holds the other two sides are positive as well. All the lower bounds must hold at once, and of \displaystyle \frac{2}{3}, \displaystyle \frac{12}{5} and \displaystyle \frac{7}{4} the largest is \displaystyle \frac{12}{5}, so that is the one that counts:

\frac{12}{5} < x < 12

Check the ends. At the lower end the sides are 4.8, 7.4 and 2.6, and 4.8 + 2.6 = 7.4 is flat. At the upper end, x = 12, they are 24, 17 and 41, and 24 + 17 = 41 is flat. In the middle, x = 5 gives 10, 10 and 13, and 10 + 10 > 13.

Example 5

Three towns

Town B is 9 km from town A, and town C is 14 km from A. What can the distance from B to C be?

Solution

There are two cases. If the towns do not lie on one straight road, they are the corners of a triangle with sides 9, 14 and BC, and the range of the third side applies:

\begin{aligned} |14 - 9| < BC &< 14 + 9 \\ 5 < BC &< 23 \end{aligned}

But towns can lie on one road, and then there is no triangle, so the two flat cases must be added. If B is between A and C, the distance BC is 14 - 9 = 5. If A is between B and C, the distance BC is 9 + 14 = 23. The third order, C between A and B, cannot happen, because C is farther from A than B is. Figure 4 shows the two that can.

A B C 9 5
BC=5
B A C 9 14
BC=23
Figure 4Three towns on one road give the two extreme distances between B and C.

Every value strictly between 5 and 23 is possible: for such a value d, the three lengths 9, 14 and d pass the test, so by the converse they are the sides of a triangle.

So BC can be any distance from 5 km to 23 km, ends included:

5 \le BC \le 23

The ends are included here, and left out in the earlier examples, for one reason: a triangle needs the three points off a line, and three towns do not.

Example 6

Counting triangles among sticks

You have sticks of lengths 2, 3, 4, 5 and 6 cm. You pick three different sticks. How many of the possible choices make a triangle?

Solution

There are 10 ways to choose three of five sticks. List each one, and test the two shorter sticks added together against the longest:

SticksTestTriangle?
2, 3, 42 + 3 = 5 > 4yes
2, 3, 52 + 3 = 5 = 5no
2, 4, 52 + 4 = 6 > 5yes
3, 4, 53 + 4 = 7 > 5yes
2, 3, 62 + 3 = 5 < 6no
2, 4, 62 + 4 = 6 = 6no
2, 5, 62 + 5 = 7 > 6yes
3, 4, 63 + 4 = 7 > 6yes
3, 5, 63 + 5 = 8 > 6yes
4, 5, 64 + 5 = 9 > 6yes

The table has 7 rows marked yes. Two of the three failures, 2, 3, 5 and 2, 4, 6, are flat: the sum equals the longest exactly.

So 7 of the 10 choices make a triangle.

Example 7

Whole-number triangles with a given perimeter

How many different triangles have whole-number side lengths and perimeter 12? Two triangles with the same three lengths count as one.

Solution

A side less than half the perimeter is the triangle test in another form, and half of 12 is 6. So every side must be less than 6, that is, at most 5. Conversely, three sides adding to 12 that are all less than 6 do make a triangle, so the test is exactly this.

Write the sides as a \le b \le c with a + b + c = 12. Since c is the largest, 3c \ge 12, so c \ge 4. With c \le 5, there are two cases.

If c = 5, then a + b = 7 with a \le b \le 5. That gives (a, b) = (2, 5) and (3, 4), since (1, 6) would need b = 6.

If c = 4, then a + b = 8 with a \le b \le 4. That gives only (4, 4).

So the triangles have sides 2, 5, 5 and 3, 4, 5 and 4, 4, 4. There are 3 of them: one isosceles, one with all sides different, and one equilateral.

Boundaries

Equality belongs to flat figures. When the longest length equals the sum of the other two, the three points lie on one line and there is no triangle. The statement that a journey by way of a third point is never shorter than the straight road holds for any three points, with equality exactly when the third point is on the segment between the other two. The strict inequality belongs to real triangles.

Lengths only. The rule decides whether a triangle exists, and then the three lengths fix the triangle completely, up to sliding and turning and flipping (this is the SSS case of congruent triangles). It does not tell you any angle. Two sides alone leave the third free, inside the range, and what pins it down is the angle between them.

Two sides give a range, not a value. The range |p - q| < x < p + q is the complete answer to “how long can the third side be?” when nothing else is known. It is never a single number, and it is open at both ends when a real triangle is required.

The lengths must be positive. A side of length 0 would be a point, not a side. The lower bound for the third side is |p - q|, and when p = q that bound is 0, which is still not allowed: two equal sides of length 10 allow a third side anywhere above 0 and below 20, but never 0 itself.

Where this goes next

The proof of the rule is its own lesson, which shows how to argue that something never happens.

Inside one triangle, the side lengths and the angles go in the same order: the longest side is opposite the largest angle. That is sides and angles in order, and it carries on to the hinge theorem: when two triangles have two pairs of equal sides, the one with the larger angle between those sides has the longer third side. That is the swing of Figure 2 made into a comparison.

The test tells you when a triangle can be built, and the compass construction builds it. With the triangle built from its three sides, solving it with the law of cosines finds every angle, and the trigonometry lesson on when no triangle exists, where a given side is too short to reach, is the same picture of sticks that cannot meet.

Applied again and again along a path of many straight pieces, the rule says no such path between two points is shorter than the straight segment. The same inequality turns up for vectors: the arrow for a sum is never longer than the two arrows laid tip to tail. And it turns up for numbers as |x + y| \le |x| + |y|, which is the three-points-on-a-line case for 0, x and x + y, once absolute value is read as distance.

Exercises

Can these make a triangle?

  1. 4, 6, 9
  2. 5, 5, 11
  3. 8, 15, 23
  4. 2.4, 3.1, 5.4
  5. \displaystyle \frac{1}{3}, \frac{1}{4}, \frac{7}{12}
  6. 100, 100, 1

The range of the third side

  1. Two sides of a triangle are 7 and 12. Between what values must the third side lie?
  2. Two sides of a triangle are both 10. Between what values must the third side lie?
  3. Two sides of a triangle are 4.5 and 11. Between what values must the third side lie?
  4. Two sides of a triangle are 6 and 13, and the third side is a whole number. How many different perimeters are possible?
  5. An isosceles triangle has perimeter 26 and one of its sides is 12. Find every possible set of three side lengths.
  6. Two sides of a triangle are 3 and 4, and the third side is a whole number. List every possible third side, and say which of the triangles are isosceles.

Using algebra

  1. For which values of x are x, x + 3 and 2x + 1 the sides of a triangle?
  2. For which values of x are x, 2x - 3 and 15 - x the sides of a triangle?
  3. Two sides of a triangle are 5 and 8, and the third side is 3x + 1. Find every x that works.

Applications

  1. A stick 30 cm long is cut into three pieces whose lengths are whole numbers of centimeters. How many different triangles can be made from the three pieces? Triangles with the same three side lengths count as one.
  2. A hiker walks 7 km from camp, turns through any angle, and walks 4 km more. What is the shortest and the longest possible distance from camp at the end?
  3. Two towns are 20 km apart. A third town is 12 km from the first. Can it be 5 km from the second?

Reasoning

  1. Why is it enough to compare the longest side with the sum of the other two? Why do the other two inequalities never need checking?
  2. A triangle has perimeter P. Show that every side is shorter than P/2, and that if the longest side is shorter than P/2, the three lengths make a triangle.
  3. Why can sticks of 2, 3 and 5 not make a triangle, even though 2 + 3 is “as much as” 5? What do the sticks form instead?
  4. Town B is 9 km from town A, and town C is 14 km from A. The towns need not be the corners of a triangle. Use the inequality for three points on a line to explain why BC cannot be 4 km.
Answers
  1. Yes. The longest is 9, and 4 + 6 = 10 > 9.
  2. No. The longest is 11, and 5 + 5 = 10, which is less than 11.
  3. No. The longest is 23, and 8 + 15 = 23, which is not more than 23. It is the flat case.
  4. Yes. The longest is 5.4, and 2.4 + 3.1 = 5.5 > 5.4.
  5. No. \displaystyle \frac{1}{3} + \frac{1}{4} = \frac{7}{12}, which is not more than \displaystyle \frac{7}{12}. Flat again.
  6. Yes. The longest is 100, and 100 + 1 = 101 > 100. The triangle is very thin.
  7. The third side is between 5 and 19. It is more than 12 - 7 = 5 and less than 12 + 7 = 19.
  8. The third side is between 0 and 20. It is less than 10 + 10 = 20 and more than |10 - 10| = 0, and a side of length 0 is not allowed, so 0 < x < 20.
  9. The third side is between 6.5 and 15.5. It is more than 11 - 4.5 = 6.5 and less than 11 + 4.5 = 15.5.
  10. There are 11 perimeters. The third side x satisfies 7 < x < 19, so x = 8, 9, \dots, 18, which is 11 values. Each gives a different perimeter 19 + x, from 27 to 37.
  11. 12, 12, 2 and 12, 7, 7. If 12 is one of the two equal sides, the third is 26 - 24 = 2, and 12 < 12 + 2 works. If 12 is the odd side, the equal sides are (26 - 12) \div 2 = 7 each, and 12 < 7 + 7 works. Both triangles exist.
  12. The third side x satisfies 1 < x < 7, so x = 2, 3, 4, 5 or 6. The triangle with x = 3 has sides 3, 3, 4 and the triangle with x = 4 has sides 3, 4, 4, and these two are isosceles. The others have three different sides.
  13. x > 1. The three inequalities are x < 3x + 4 (true for x > -2), x + 3 < 3x + 1, which gives x > 1, and 2x + 1 < 2x + 3 (always true). There is no upper limit. At x = 1 the sides are 1, 4, 3, which is flat.
  14. \displaystyle \frac{9}{2} < x < 9. The inequality for the side x is x < x + 12, always true. For the side 2x - 3 it is 2x - 3 < 15, so x < 9. For the side 15 - x it is 15 - x < 3x - 3, so \displaystyle x > \frac{9}{2}. At these ends the sides are 4.5, 6, 10.5 and 9, 15, 6, both flat.
  15. \displaystyle \frac{2}{3} < x < 4. The third side must satisfy 3 < 3x + 1 < 13, since |8 - 5| = 3 and 8 + 5 = 13. Subtract 1 to get 2 < 3x < 12, then divide by 3.
  16. 19. Every piece is less than 15, and the longest is at least 10. Counting by the longest piece: 10 gives 1 triangle, 11 gives 2, 12 gives 4, 13 gives 5 and 14 gives 7. For example, with longest 14 the other two add to 16 with neither above 14: (2, 14), (3, 13), (4, 12), (5, 11) and (6, 10), (7, 9), (8, 8). The total is 1 + 2 + 4 + 5 + 7 = 19.
  17. The shortest is 3 km and the longest is 11 km. The distance from camp is at least 7 - 4 = 3 km, when she turns straight back, and at most 7 + 4 = 11 km, when she goes straight on. Any turn in between gives a distance strictly between.
  18. No. The three distances would be 20, 12 and 5, and 12 + 5 = 17 is less than 20. The longest is more than the sum of the other two, so the towns cannot be a triangle, and they cannot be on one road either, since then the longest would equal the sum.
  19. Call the sides a \le b \le c. The inequality for a is a < b + c, and it is true because a \le c and b is positive, so b + c > c \ge a. The one for b is true the same way, since b \le c < c + a. Both compare a side with a sum that contains the longest side, so they cannot fail. Only c < a + b, where the longest side is on its own, can fail.
  20. Start from c < a + b for the longest side c and add c to both sides: 2c < a + b + c = P, so c < P/2. The steps reverse: if c < P/2 then 2c < P, and taking c away from both sides gives c < a + b, which is the test for the longest side. So a triangle exists.
  21. 2 + 3 = 5, so the two short sticks laid end to end along the long one fit it exactly, with no gap and no room to swing. The three sticks form a straight segment of length 5. A triangle needs the three corners off one line, and here the corner where the two short sticks meet sits on the long one, so the “triangle” is flat.
  22. For any three points, AC \le AB + BC, with equality exactly when B is on the road between A and C. That gives 14 \le 9 + BC, so BC \ge 5. A distance of 4 km would break it, so BC cannot be 4 km.
kg1128 · updated 2026-09-30 · CC-BY-SA-4.0