Which Three Lengths Can Form a Triangle
Test any three lengths in one comparison, find the allowed range for a missing side, and see why the rule is enough to build the triangle.
Key takeaways
- Compare the longest length with the sum of the other two; it must be strictly smaller.
- If the longest equals that sum, the points fall on a straight line and no true triangle forms.
- Given two sides a and b, the third side must lie strictly between |a − b| and a + b.
- When sides contain a variable, write all three inequalities unless you know which side is longest.
- Passing the test guarantees exactly one triangle shape, up to flipping and moving it.
Three positive lengths form a triangle exactly when the longest one is shorter than the other two added together. With lengths 4, 6 and 7, compare 7 with 4 + 6 = 10. Since 7 < 10, a triangle exists. With 3, 4 and 9, the two short pieces total only 7, so they can never reach across the long one.
This single comparison settles the question completely. Below you will find why it is necessary, why it is also sufficient, and how to use it when some of the lengths are unknown.
The one comparison you need
The full rule, often called the triangle inequality, lists three conditions for sides a, b and c:
- a < b + c
- b < c + a
- c < a + b
If c is the largest of the three, the first two are automatic. For example, a < b + c holds because c alone is already at least as large as a, and b is positive. Only c < a + b can fail.
So sort, then test once.
| Lengths | Longest against the rest | Verdict |
|---|---|---|
| 5, 8, 11 | 11 < 13 | triangle |
| 6, 6, 6 | 6 < 12 | triangle |
| 2, 10, 11 | 11 < 12 | triangle, very thin |
| 4, 5, 9 | 9 = 9 | flat, not a triangle |
| 1, 2, 5 | 5 > 3 | impossible |
All lengths must be in the same unit. Sides of 80 cm, 0.5 m and 1.4 m become 80, 50 and 140 cm, and since 140 > 130, they fail.
Why the condition is necessary
A straight segment is the shortest path between its endpoints. In a triangle, going from one end of side c to the other by way of the third corner is a detour of length a + b. A real detour is strictly longer than the direct route. A fuller proof appears in the triangle inequality as a shortest path rule.
Picture two sticks hinged to the ends of a long one. Swing them toward each other. If their combined length is too small, their free ends stay apart however you turn them. If it is exactly equal, they touch only when both lie flat along the long stick.
That flat case is called a degenerate triangle. It has zero area and angles of 0°, 0° and 180°. School geometry normally excludes it.
Why the condition is sufficient
Passing the test must also guarantee that the triangle can be built. Here is the compass construction.
- Draw a segment of length c, the longest side.
- Draw a circle of radius b about one end.
- Draw a circle of radius a about the other end.
- Join either crossing point to both ends.
Because a + b > c, the circles are large enough to overlap. Because neither radius exceeds c, neither circle swallows the other. So they cross twice, once above and once below the segment, giving two mirror-image triangles.
You can confirm this with coordinates. Put the ends at (0, 0) and (c, 0), and seek a point (x, y) at distance b from the first and a from the second.
x² + y² = b²
(x − c)² + y² = a²
subtract: x = (b² + c² − a²) / (2c)
then: 4c²y² = (a + b + c)(−a + b + c)(a − b + c)(a + b − c) A point off the line needs y² > 0. The last three factors are positive exactly when the three triangle inequalities hold. The same product appears inside Heron's formula for area.
The range for a missing side
Suppose two sides are 7 and 12 and the third is x. Two things must be true. The third side cannot be too long: x < 7 + 12 = 19. Nor can it be too short, since 12 < 7 + x requires x > 5.
So 5 < x < 19. In general the third side lies strictly between the difference and the sum of the other two:
|a − b| < x < a + b.
If x must be a whole number, the choices here run from 6 to 18, which is 13 values. For two whole-number sides with a ≤ b, there are always 2a − 1 whole-number choices.
The ends of the range correspond to the hinge fully closed and fully open. Between them, the angle between the two fixed sides takes every value from 0° to 180°.
Sides that contain a variable
When lengths are expressions, you may not know which is longest. Write every condition, including positivity.
Take sides x, x + 2 and 2x − 3.
positive: x > 0 and 2x − 3 > 0, so x > 1.5
x + (x + 2) > 2x − 3 gives 2 > −3, always true
x + (2x − 3) > x + 2 gives x > 2.5
(x + 2) + (2x − 3) > x gives x > 0.5 All must hold at once, so x > 2.5. Test a value: x = 3 gives 3, 5, 3, and 5 < 6. Test the boundary: x = 2.5 gives 2.5, 4.5, 2, and 4.5 = 2.5 + 2, which is flat. There is no upper limit here, because the two sides that grow together always outpace the third.
What kind of triangle you get
Once existence is settled, the squares tell you the largest angle. With c longest:
- c² < a² + b² gives an acute triangle.
- c² = a² + b² gives a right triangle.
- c² > a² + b² gives an obtuse triangle.
For 4, 6, 7 we have 49 < 52, so the triangle is acute, though only just. For 4, 6, 8 we have 64 > 52, so it is obtuse. The middle case is the subject of the converse of Pythagoras.
Existence also implies uniqueness. Any two triangles with the same three side lengths are congruent, which is side-side-side congruence. Three lengths either give one shape or none.
Counting and probability puzzles
Choosing sticks. From lengths 2, 3, 4, 5 and 6, how many sets of three make a triangle? There are ten sets in all. The ones that fail are 2, 3, 5; 2, 3, 6; and 2, 4, 6. The other seven work.
Sticks that never work. The lengths 1, 2, 3, 5, 8, 13 come from the Fibonacci pattern, where each term is the sum of the two before. No three of them form a triangle, because the largest of any three is at least the sum of the others.
The broken stick. Break a stick at two points chosen independently and uniformly along its length. A triangle can be made from the three pieces exactly when every piece is shorter than half the stick. The probability works out to 1/4. Other ways of breaking the stick give other answers, so the method of breaking has to be stated.
A fixed perimeter
Many problems fix the total length instead of two sides. Say a 20 cm wire is bent into a triangle. The condition "longest side less than the other two combined" becomes simpler, because the other two combined equal 20 minus the longest. So the test is c < 20 − c, or c < 10.
In words, every side must be shorter than half the perimeter. If you also require whole centimeters, no side may exceed 9. The possible sets are 9, 9, 2; 9, 8, 3; 9, 7, 4; 9, 6, 5; 8, 8, 4; 8, 7, 5; 8, 6, 6; and 7, 7, 6. That gives eight different triangles.
Listing with the largest side first, and never letting a later number exceed an earlier one, avoids counting the same triangle twice.
The same idea covers shapes with more sides. A collection of lengths can be joined into a flat polygon when the longest is shorter than all the others added together. With four rods of 2, 3, 4 and 8, the test passes, since 8 < 9. Unlike a triangle, that four-sided frame is not fixed in shape.
Related length questions
The three medians of any triangle can themselves be used as the sides of a new triangle. Altitudes behave differently. Since each altitude is twice the area divided by its side, side lengths are proportional to the reciprocals of the altitudes.
Three positive numbers can therefore be the altitudes of a triangle only if their reciprocals pass the usual test. For heights 2, 3 and 12, the reciprocals are about 0.500, 0.333 and 0.083. The two smaller ones total about 0.417, which is less than 0.500, so no triangle has those heights.
Using the range as a check
The range |a − b| to a + b also works as a quick estimate when a distance cannot be measured directly. Say a cabin is 3 km from a bridge and a lookout is 8 km from the same bridge, both measured in straight lines. Without any angle, you know the cabin and lookout are between 5 km and 11 km apart.
Run it the other way to catch errors. If someone reports that the cabin and lookout are 13 km apart, at least one of the three figures is wrong. The test cannot tell you which one, only that they are inconsistent. Distances measured along winding roads are a different matter, since road lengths can be much longer than the straight sides of any triangle.
Common mistakes
- Allowing equality. "At least as large" is not enough; the sum must be strictly larger.
- Testing the wrong pair. Checking that 3 + 9 > 4 proves nothing. Always test the longest side.
- Forgetting positive lengths. An algebraic answer that makes any side zero or negative must be rejected.
- Trusting rounded measurements. Lengths of 5.0, 7.0 and 12.0 measured to the nearest tenth could describe a very flat triangle or an impossible one. State the uncertainty.
- Ignoring the two options. An isosceles triangle with sides 4 and 10 must have its third side equal to 10, since 4, 4, 10 fails. For more on the families, see scalene, isosceles and equilateral triangles.