DEV Community

Calcrio
Calcrio

Posted on

Pythagorean Theorem, Explained: Find Any Side of a Right Triangle

The Pythagorean theorem is one of those ideas that looks like a school formula and turns out to be a tool you use forever. It says that in a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides: a² + b² = c². That one line finds ladders, diagonals, distances, and screen sizes. Here is how it works, with every number checked.

The theorem in one example

Take legs 3 and 4. Square them: 3² = 9 and 4² = 16. Add: 9 + 16 = 25. The hypotenuse is √25 = 5. That is the whole theorem: square, add, square root.

The hypotenuse is the longest side, opposite the 90° angle. The two other sides are the legs. If you know any two sides, the third is fixed — there is exactly one length that completes the triangle.

Finding the hypotenuse

When you know both legs, add their squares and take the square root: c = √(a² + b²).

The example every student should know by heart is 6 and 8: 6² + 8² = 36 + 64 = 100, so c = √100 = 10. Another is 5 and 12: 25 + 144 = 169, so c = √169 = 13. And 8 and 15: 64 + 225 = 289, so c = √289 = 17.

Not every hypotenuse is a whole number. Legs 1 and 1 give c = √2 ≈ 1.4142 — the diagonal of a unit square. If you want the steps shown for any pair of legs, Calcrio's free pythagorean theorem calculator shows the squares, the sum, and the square root.

Finding a missing leg

When you know the hypotenuse and one leg, subtract instead of adding: b = √(c² − a²).

The classic case is c = 13 and a = 5: b = √(169 − 25) = √144 = 12. Another is c = 17 and a = 8: b = √(289 − 64) = √225 = 15. And c = 25 and a = 7: b = √(625 − 49) = √576 = 24.

The rule for which operation to use is simple: finding the longest side means adding; finding a shorter side means subtracting. If you ever get a negative number under the square root, you mixed them up — the hypotenuse must be the longest side.

The ladder problem

A 10-foot ladder leans against a wall with its foot 6 feet from the wall. How high does it reach?

The ladder is the hypotenuse (c = 10) and the distance from the wall is one leg (a = 6). The height is the other leg: b = √(10² − 6²) = √(100 − 36) = √64 = 8 feet. Check it: 6² + 8² = 36 + 64 = 100 = 10². This is the 6-8-10 triple, the 3-4-5 triple doubled, and it is the most common ladder problem in textbooks because the answer comes out whole.

The same idea squares a corner on a building site: mark 3 feet along one edge, 4 feet along the other, and the diagonal must measure exactly 5 feet. Any other diagonal means the corner is not square.

Triples worth memorizing

A Pythagorean triple is three whole numbers that satisfy a² + b² = c² exactly. The ones worth knowing are 3-4-5, 5-12-13, 8-15-17, 7-24-25, and 20-21-29. Multiples work too: doubling 3-4-5 gives 6-8-10, tripling it gives 9-12-15.

Recognizing a triple saves the whole calculation. If the legs are 6 and 8, the hypotenuse is 10 without reaching for a calculator. Our guide on how to find the hypotenuse works through the method step by step, including how to do it without a calculator.

Checking whether a triangle is right-angled

The theorem also works backwards. If a² + b² = c² for the three sides, the triangle is right-angled. Test 3, 4, 5: 9 + 16 = 25 = 5², so yes. Test 2, 3, 4: 4 + 9 = 13, but 4² = 16 — 13 ≠ 16, so no.

Two mistakes that cause most wrong answers

First, adding the legs instead of their squares. For legs 6 and 8, a + b = 14, but the hypotenuse is 10. Square first, then add, then take the square root.

Second, forgetting the square root at the end. 36 + 64 = 100 is c², not c. The hypotenuse is √100 = 10, not 100. If your answer is bigger than the sum of the legs, you forgot the square root.

Where else it shows up

The diagonal of a 3 × 4 rectangle is √(9 + 16) = 5. The distance between the points (3, 4) and (7, 1) is √(4² + 3²) = √(16 + 9) = 5 — that is the distance formula, the Pythagorean theorem in coordinate form. Screen sizes are diagonals. GPS distances are hypotenuses. The theorem is a school formula that never stops being useful.

Try the examples yourself: legs 6 and 8, hypotenuse 13 with leg 5, the 10-foot ladder. Work them by hand, then check them with the calculator. The method is three moves — square, add or subtract, square root — and once it clicks, every right triangle in the world is the same problem.

Top comments (0)