Home / How to check a right triangle

How to check if a triangle is a right triangle

Sort the three sides so the longest one is last. First make sure the two shorter sides add up to more than the longest side. Only then compare squares: if the sum of the squares of the shorter sides equals the square of the longest side, the triangle is right.

Why the triangle test comes first

Lengths such as 1, 2, and 10 fail before any Pythagorean check. 1 + 2 is not greater than 10, so they are not a triangle. Calling that “not a right triangle” skips the real problem.

Steps

  1. Write the three lengths in any order, then sort them. Call the sorted sides x, y, and z, with z the longest.
  2. If x + y is less than or equal to z, stop. This is not a valid triangle.
  3. Compute x² + y² and z².
  4. If those two values match, within a small tolerance for decimals, the triangle is right and z is the hypotenuse.
  5. If they do not match, the triangle is valid but not right. A 4-5-6 triangle is an example: 16 + 25 = 41, which is not 36.

Examples

Common mistakes

How the app does it

Open Check a Triangle and enter the three sides in any order. A right result includes the equation and, when the sides are a whole-number triple, the triple badge. Read how triples are recognized. A failed triangle-inequality result says it is not a valid triangle, which is a different message from “not a right triangle.”

Get Pythagorean Theorem Calculator on Google Play

Related guides

Questions

Does the order of the sides matter?

No. The longest side is treated as the candidate hypotenuse no matter which field you use.

Is 1, 2, 10 a right triangle?

No. Those lengths do not form a triangle, because 1 + 2 is not greater than 10.