How to Tell if Three Lengths Can Actually Form a Triangle

The short answer

a + b > c

Sort the three lengths, then add the two shortest. If that total is greater than the longest, a triangle exists. If it equals or falls below it, no triangle can be built from those lengths.

This is the triangle inequality, and it decides whether three measurements describe a real shape before you waste any effort trying to find its area or its angles. It is worth running first whenever the lengths came off a tape, a drawing or a data file rather than out of a textbook.

Why it works

Picture the longest side lying flat on a table. The other two are hinged to its ends and have to swing up and meet somewhere above it. Laid out flat along that longest side, they either overreach it, exactly reach it, or fall short.

Overreach and there is slack, which is what lets them lift off the table and meet at a point above it. Exactly reach and they meet, but only by staying flat, so what you get is a straight line rather than a triangle. Fall short and no amount of angling closes the gap, because moving them upward only makes them span less horizontal distance, not more.

1

Sort the three lengths

Put them in order so you know which one is longest. Everything depends on identifying it.

2

Add the two shortest

One addition. This is the only arithmetic the test needs.

3

Compare against the longest

Greater and a triangle exists. Equal gives a flat line. Less and nothing can be built.

You only need to check once

The rule is usually stated as all three pairs having to beat the remaining side, which makes it sound like three separate checks. In practice one is enough. If the two shortest sides already beat the longest, then any pair including the longest side beats the remaining one automatically, because you have swapped a shorter length for a longer one on the larger side of the inequality.

So sort first, check once, and move on. The only way to get this wrong is to test a pair that does not include the two shortest, which can pass while the real constraint fails.

Three panels each laying the two shorter lengths flat along the longest. Three and four overlap across five and form a triangle, five and five exactly span ten and lie flat, and two and three fall four short of nine so no triangle exists.
Laying the pieces flat is the whole test made visible. Overlap means a triangle, an exact meeting means a straight line, and a gap means nothing can be built.

The exact case is not a triangle

Lengths of 5, 5 and 10 are the case people argue about. The two shorter sides do meet, but only by lying flat along the longest one, so what you get is a straight line with a point marked on it. It has no height, no area and no angles worth naming.

This is called a degenerate triangle, and the inequality is deliberately strict about it. The requirement is that the sum be greater than the longest side, not greater than or equal, precisely so this case is excluded.

Test the two shortest, not any two

Picking a pair that includes the longest side can pass while the real constraint fails, and the test then tells you nothing. Sorting first removes the choice, which is why it is step one rather than an optional tidy up.

9 + 2 vs 3gives11 is more than 3passes

a pair including the longest side always passes, so this proves nothing

2 + 3 vs 9gives5 is less than 9fails

the two shortest against the longest is the only test that decides it

Where this matters outside a textbook

Any time three distances arrive from measurement rather than from a diagram, this is the check that catches a transcription error before it turns into a wrong answer. A digit dropped from a chainage, a tape read against the wrong mark, two values swapped in a spreadsheet column: all of them show up here as lengths that cannot close.

It is also the fastest sanity check on data you did not collect yourself. If a survey file lists a parcel edge longer than the other two combined, the file is wrong, not the geometry.

Mistakes that catch people out

  • Testing a pair that includes the longest side. That comparison always passes. Sort first and test the two shortest.
  • Accepting the equal case. A sum exactly matching the longest side gives a straight line, not a triangle.
  • Comparing before converting units. Lengths in mixed units cannot be compared at all. Convert everything first.
  • Assuming a failed test means bad arithmetic. It usually means one of the measurements is wrong. Check the data before the working.
  • Skipping the check on measured data. Textbook lengths always work. Field measurements do not.

Practice questions

  1. Lengths of 7, 10 and 5. Do they form a triangle?
  2. Lengths of 1, 1 and 3. Do they form a triangle?
  3. Lengths of 6, 6 and 6. Do they form a triangle?
  4. Lengths of 8, 15 and 7. Do they form a triangle?
  5. Lengths of 4.2, 5.1 and 9.0. Do they form a triangle?
Show the answers
  1. sorted 5, 7, 10, and 5 + 7 = 12 which is more than 10, so yes
  2. sorted 1, 1, 3, and 1 + 1 = 2 which is less than 3, so no
  3. sorted 6, 6, 6, and 6 + 6 = 12 which is more than 6, so yes
  4. sorted 7, 8, 15, and 7 + 8 = 15 which equals 15, so they lie flat and form no triangle
  5. sorted 4.2, 5.1, 9.0, and 4.2 + 5.1 = 9.3 which is more than 9.0, so yes, but only just

Common questions

How do I know if three lengths form a triangle?

Sort them, add the two shortest, and compare against the longest. If the total is greater, a triangle exists. If it is equal or smaller, no triangle can be built.

Do I have to check all three pairs?

No. If the two shortest already beat the longest, every other pair passes automatically. Sorting first means one check is enough.

What if the two shortest add up to exactly the longest?

The three lengths lie flat in a straight line. Mathematicians call this degenerate. It has zero area and no angles, so it is not a triangle.

Why can a gap not be closed by angling the sides?

Tilting either side upward reduces the horizontal distance it covers. Moving away from flat always makes the reach shorter, never longer.

Does Heron formula catch this too?

Yes. If the lengths cannot form a triangle, the product under the square root comes out negative and there is no real answer. The inequality test is faster.

Does the rule apply to shapes with more sides?

A related rule does. For any polygon, no single side can be longer than all the others added together, for the same reason.

Related lessons and calculators