Pythagorean Theorem Calculator
Calculate the hypotenuse (c = √(a² + b²)) or missing leg (a = √(c² - b²)) of any right-angled triangle, verify integer Pythagorean triples, and visualize geometric dimensions with an interactive SVG right triangle canvas.
Enter Leg Lengths (a and b)
Step-by-Step Mathematical Derivation
How to Calculate the Pythagorean Theorem
In any right-angled Euclidean triangle, the square of the hypotenuse c equals the sum of the squares of legs a and b: a² + b² = c². To solve for the hypotenuse, calculate c = √(a² + b²). To solve for an unknown leg, calculate a = √(c² − b²).
Fundamental Formula (a² + b² = c²) & Triangle Anatomy
The Pythagorean Theorem is one of the foundational relationships in Euclidean geometry. It establishes that for every triangle possessing a 90° right angle, the area of the square constructed on the hypotenuse (c²) is precisely equal to the sum of the areas of the squares constructed on the two adjacent perpendicular legs (a² + b²).
The horizontal or base perpendicular leg forming the 90° vertex with leg b.
The vertical perpendicular leg. Together with leg a, legs enclose the right angle vertex C.
The side directly opposite the 90° angle. It is strictly the longest side in any right triangle (c > a and c > b).
How to Calculate Hypotenuse vs. Missing Legs
Depending on which two dimensions are known, the Pythagorean Theorem provides distinct algebraic equations for computing the missing third side:
Solving for Hypotenuse (c)
When both perpendicular legs (a and b) are given:
- Square leg a (a²) and square leg b (b²).
- Add the two squares together (a² + b²).
- Take the positive square root of the sum.
Solving for Missing Leg (a or b)
When the hypotenuse (c) and one leg are known:
- Square the hypotenuse (c²) and the known leg (b²).
- Subtract the leg square from hypotenuse square (c² − b²).
- Take the positive square root of the difference.
Classic Mathematical Proofs of a² + b² = c²
Over 370 distinct mathematical proofs have been recorded for the Pythagorean Theorem, ranging from Euclidean geometry to algebraic rearrangements and differential equations:
Proof by Algebraic Square Expansion
Consider a large square of side (a + b) enclosing 4 identical right triangles of area ½ab around an interior tilted square of side c:
Euclid’s Windmill Proof (Elements Book I, Proposition 47)
Euclid demonstrated the theorem by dropping an altitude from the right angle to the hypotenuse, splitting the square on the hypotenuse into two rectangles whose respective areas equal the squares on the two adjacent legs using triangle congruences.
Pythagorean Triples & Euclid’s Generating Formula
A Pythagorean Triple consists of three positive integers (a, b, c) satisfying a² + b² = c². If gcd(a, b, c) = 1, the triple is called primitive.
| Primitive Triple (a, b, c) | Leg Squares (a² + b²) | Hypotenuse Square (c²) | Area (½ab) |
|---|---|---|---|
| (3, 4, 5) | 9 + 16 = 25 | 25 | 6 sq units |
| (5, 12, 13) | 25 + 144 = 169 | 169 | 30 sq units |
| (8, 15, 17) | 64 + 225 = 289 | 289 | 60 sq units |
| (7, 24, 25) | 49 + 576 = 625 | 625 | 84 sq units |
| (9, 40, 41) | 81 + 1600 = 1681 | 1681 | 180 sq units |
| (11, 60, 61) | 121 + 3600 = 3721 | 3721 | 330 sq units |
| (20, 21, 29) | 400 + 441 = 841 | 841 | 210 sq units |
For any two integers m > n > 0:
3D Distance Formula & Space Diagonals
The Pythagorean Theorem generalizes directly to 3D Cartesian coordinates. To find the distance between two points (x₁, y₁, z₁) and (x₂, y₂, z₂), apply the 2D theorem twice sequentially:
For a rectangular box with length L, width W, and height H, the interior space diagonal is d = √(L² + W² + H²).
Real-World Applications of the Pythagorean Theorem
Carpentry & Construction (3-4-5 Rule)
Framers and bricklayers measure 3ft and 4ft along perpendicular foundation lines to ensure the 5ft diagonal guarantees a true 90-degree square corner.
Navigation & GPS Triangulation
Marine navigation and flight planning systems calculate straight-line Euclidean distances and crosswind drift vectors using Cartesian Pythagorean offsets.
Television & Display Screen Sizing
Televisions and monitors are marketed by their diagonal measurement. With a 16:9 aspect ratio, screen height and width are derived directly via the Pythagorean theorem.
Graded Step-by-Step Worked Examples
Problem: Find hypotenuse c if leg a = 6 cm and leg b = 8 cm.
Problem: A 13-foot ladder leans against a vertical wall. If the base of the ladder is 5 feet from the wall, how high up the wall does it reach?
Common Pitfalls & Calculation Mistakes
Applying Theorem to Non-Right Triangles
The equation a² + b² = c² fails for acute or obtuse triangles. Always check that an exact 90° right angle is present before calculating.
Subtracting Under the Radical Incorrectly
When solving for a missing leg, you must subtract (c² − a²), not add. Adding results in a leg longer than the hypotenuse, which is geometrically impossible.
Confusing (a + b) with √(a² + b²)
√(a² + b²) ≠ a + b. The square root of a sum is strictly less than the sum of square roots (e.g. √(9 + 16) = 5 ≠ 3 + 4 = 7).
Lead Developer & Founder of Basic Math Tools. Specializes in browser-native computational algorithms and applied mathematics.
Mathematics & curriculum specialists. Audited against standard algebraic and arithmetic principles.