Understanding the triangle inequality theorem calculator — concept and principle
This calculator checks whether three lengths can form a triangle using the triangle inequality theorem. It shows each of the three checks, the allowed range for the third side, the type of triangle, the perimeter and the area. Use it for geometry homework, design and construction checks, and puzzles.
How it is calculated
- The three conditions: a + b > c, a + c > b and b + c > a. It is enough that the two shorter sides together exceed the longest.
- If the sum equals the longest side exactly, the triangle is degenerate: a flat line with zero area.
- Third side range for sides a and b: |a − b| < c < a + b.
- Type by sides: equilateral, isosceles or scalene.
- Type by angles, with c the longest side: c² < a² + b² acute, = right, > obtuse.
- Area by Heron's formula: A = √(s(s − a)(s − b)(s − c)), s = (a + b + c)/2.
The principle
The straight line between two points is the shortest path. Going from one corner to another along the other two sides is a detour, so it must be longer than the direct side. That is the triangle inequality, proved by Euclid (Elements I.20). If the two shorter sides only just equal the longest, they lie flat along it and there is no space between them. The angle type follows from the law of cosines: c² = a² + b² − 2ab·cos C, so c² is larger than a² + b² exactly when cos C is negative, which means angle C is obtuse.
Worked example
Default inputs: a = 5, b = 7, c = 10.
- 5 + 7 = 12 > 10 ✓; 5 + 10 = 15 > 7 ✓; 7 + 10 = 17 > 5 ✓. Yes, a valid triangle.
- Third side range for 5 and 7: 2 < c < 12.
- All sides differ: scalene. 10² = 100 > 5² + 7² = 74: obtuse-angled.
- Perimeter = 22, so s = 11.
- Area = √(11 × 6 × 4 × 1) = √264 ≈ 16.2481.
How to read the result
If any check fails, no triangle can be built from those lengths. The range for the third side tells you which lengths are possible when two sides are fixed. A triangle close to the edge of the range is very flat and has a small area, which in real structures can mean poor stiffness.
Common mistakes
- Checking only one inequality, not the one with the longest side.
- Treating a sum equal to the longest side as a valid triangle.
- Using ≥ instead of > for a real (non-degenerate) triangle.
- Mixing units among the three sides.
Frequently asked questions
Can sides 3, 4 and 8 form a triangle?
No. 3 + 4 = 7, which is less than 8.
What is the range of the third side if two sides are 5 and 7?
Strictly between 2 and 12.
Does the triangle inequality apply to vectors?
Yes. |u + v| ≤ |u| + |v| is the same idea for lengths of vectors.
Sources: Euclid, Elements, Book I, Proposition 20 · Weisstein, E. W., "Heron's Formula", Wolfram MathWorld