How this instrument works
This calculator answers one narrow question: do three given side lengths form a right triangle, yes or no? It runs a single arithmetic check, test = a² + b² + c² − 2·max(a², b², c²), and reads the verdict off that one number alone — zero means yes, anything else means no. The max() term does the work of finding whichever side is longest without you having to label it as the hypotenuse first, so Side a, Side b, and Side c can be filled in any order and the test still lands on the correct answer.
The check is really Euclid's Elements, Book I, Proposition 48, run automatically. Proposition 47 is the familiar forward theorem — a right angle implies a² + b² = c² — and Proposition 48 is its converse: if the square on one side equals the sum of the squares on the other two, the angle contained by those other two sides is itself right. Euclid's proof builds a fresh right triangle from the two shorter sides, shows by Proposition 47 that its third side must equal the original triangle's longest side, then concludes the two triangles are congruent by SSS — so the original angle was a right angle all along, settled by construction rather than algebra.
Two consequences are worth knowing before trusting a borderline result. First, feeding the same three lengths in any order gives an identical Test value — 3, 4, 5 and 5, 3, 4 both return exactly 0, because max() hunts for the largest square wherever it happens to sit. Second, a right triangle built from decimal measurements rather than a clean integer triple can land on a Test value that is technically nonzero, something like 0.0000000002 rather than a flat 0, purely from floating-point rounding; a result that close to zero should still read as yes.
- Enter the triangle's three side lengths into Side a, Side b, and Side c — any order works, since the test finds the longest one for you.
- Read Test value: a result of exactly 0 means yes, these three sides form a right triangle.
- Any other Test value, positive or negative, means no — the three sides never meet at a 90° angle.
- A warning replaces the result if the lengths can't close into a triangle at all; the check runs before the right-angle test does.
Worked example — checking the 3-4-5 triangle
Enter Side a = 3, Side b = 4, Side c = 5. Squaring and summing gives a² + b² + c² = 9 + 16 + 25 = 50. The longest side is c = 5, so max(a², b², c²) = 25 and 2 × 25 = 50. Test value comes out to 50 − 50 = 0 exactly, so the sheet reports yes — these three lengths close into a genuine right triangle, the same 3-4-5 shape carpenters have squared corners with for centuries.
Type the same three numbers into the fields in a different order — Side a = 5, Side b = 3, Side c = 4 — and Test value still reads 0, because max() finds the largest square no matter which field it landed in. Compare a near-miss: sides 3, 4, and 6 give a² + b² + c² = 9 + 16 + 36 = 61 and 2 × max(9, 16, 36) = 72, so Test value = 61 − 72 = −11, a firm nonzero no even though 3, 4, and 6 still close into a real triangle.
Questions
What does a Test value of exactly 0 mean?
It means yes — the three side lengths you entered close into a genuine right triangle, with a 90° angle sitting opposite whichever side turned out to be the longest. Any nonzero value, whether positive or negative, means no; those three lengths never meet at a square corner.
How is this different from the acute-triangle classifier?
This calculator only answers one question — is it a right triangle, yes or no — from a single value that reads either 0 or not-0. A separate classifier reports which of three shapes a triangle actually is, acute, right, or obtuse, by reading the sign as well as the zero case. Use this one when a right angle is all you need confirmed.
Why use max() instead of just checking a² + b² = c²?
Because a² + b² = c² only works if you already know c is the longest side. This calculator's formula, a² + b² + c² − 2·max(a², b², c²), finds the longest side automatically, so Side a, Side b, and Side c can be entered in any order and the test still lands correctly — no sorting the lengths first, no guessing which one is the hypotenuse.
What theorem does this test come from?
Euclid's Elements, Book I, Proposition 48 — the converse of the Pythagorean theorem. It states that if the square on one side of a triangle equals the sum of the squares on the other two, the angle between those other two sides is a right angle. Euclid proved it by building a second right triangle from the two shorter sides and showing the two triangles are congruent.
Can a genuinely right triangle show a Test value that isn't exactly 0?
Occasionally, yes, if the sides come from decimal measurements rather than a whole-number triple like 3-4-5. Floating-point arithmetic can leave a tiny residue, something like 0.0000000002, instead of a flat 0. Treat any Test value that small as a yes; only clean integer triples are guaranteed to land on exactly 0.
Does this test also work on triangles that aren't right triangles?
It runs on any three lengths that satisfy the triangle inequality, but it is built to answer only the right-angle question. A nonzero Test value tells you the triangle is not right, without saying whether it leans acute or obtuse — a different calculator, built for that finer three-way classification, reports the full picture.