Pythagorean Theorem Calculator: a² + b² = c² for right triangles
Pythagorean theorem calculator: find hypotenuse or leg of right triangle. Area, perimeter, angles. Pythagorean triples (3-4-5, 5-12-13), proofs, history.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
The Pythagorean theorem: a² + b² = c²
The Pythagorean theorem is perhaps the most famous theorem in mathematics: in a right triangle, the sum of the squares of the two legs (sides forming the right angle) equals the square of the hypotenuse (side opposite the right angle). Formally: a² + b² = c², where c is the hypotenuse and a, b are legs. This calculator has 4 modes: find hypotenuse, find a leg, or verify a complete triangle with area, perimeter, and angles.
Working formulas
- c = √(a² + b²) — hypotenuse from legs
- a = √(c² − b²) — leg a from hypotenuse and other leg
- b = √(c² − a²) — leg b from hypotenuse and other leg
- Area = ½·a·b — right triangle area
- Perimeter = a + b + c
- sin(α) = a/c, cos(α) = b/c, tan(α) = a/b — acute angles
Key consequence: the hypotenuse is always the longest side. If c ≤ max(a,b), sides don't form a valid right triangle.
Pythagorean triples
A Pythagorean triple is a triple of positive integers (a, b, c) satisfying a² + b² = c². The most famous is (3, 4, 5): 9 + 16 = 25. A triple is primitive if GCD(a, b, c) = 1.
| Triple | Check | Primitive? |
|---|---|---|
| (3, 4, 5) | 9 + 16 = 25 | Yes |
| (5, 12, 13) | 25 + 144 = 169 | Yes |
| (8, 15, 17) | 64 + 225 = 289 | Yes |
| (7, 24, 25) | 49 + 576 = 625 | Yes |
| (20, 21, 29) | 400 + 441 = 841 | Yes |
| (9, 40, 41) | 81 + 1600 = 1681 | Yes |
| (6, 8, 10) | 36 + 64 = 100 | No (2× of 3-4-5) |
Euclid's formula for primitive triples
Given integers m > n > 0 with GCD(m,n)=1 and m-n odd, the triple (m² − n², 2mn, m² + n²) is a primitive Pythagorean triple. Examples:
- m=2, n=1: (3, 4, 5)
- m=3, n=2: (5, 12, 13)
- m=4, n=1: (15, 8, 17)
- m=4, n=3: (7, 24, 25)
- m=5, n=2: (21, 20, 29)
All primitive triples come from this formula. Infinitely many exist.
Practical examples
Example 1: ladder against wall
5 m ladder against wall, base 3 m from wall. How high?
- c = 5 (ladder, hypotenuse)
- a = 3 (distance from wall)
- b = √(25 − 9) = √16 = 4 m
- 3-4-5 triple
Example 2: rectangle diagonal
Rectangle 8 × 6 m. Diagonal?
- c = √(64 + 36) = √100 = 10 m
- 6-8-10 (multiple of 3-4-5)
Example 3: 2D distance
Distance between P₁(1, 2) and P₂(4, 6):
- Δx = 3, Δy = 4
- d = √(9 + 16) = 5
Example 4: 55-inch TV
55" TV with 16:9 ratio:
- width = 16k, height = 9k
- k = 55/√337 ≈ 3.0
- width ≈ 48", height ≈ 27"
Example 5: tree height
Top of tree at 30 m distance, 45° elevation:
- height = 30 m (45° isosceles)
- line of sight = 30√2 ≈ 42.43 m
Proofs of the theorem
The theorem has hundreds of proofs (Loomis 1940 collected 367). Three most famous:
1. Euclid's proof (Elements I.47)
Uses similarity between original triangle and two sub-triangles from the altitude to the hypotenuse.
2. Algebraic rearrangement
Build a square of side (a+b). Put 4 copies of the right triangle inside. Total area is (a+b)² = a² + 2ab + b². The 4 triangles' area is 4·(½ab) = 2ab. The inner square's area is c². So: (a+b)² = 2ab + c² → a² + b² = c².
3. Garfield's proof (1876)</h3
U.S. 20th President James Garfield published an elegant proof using a trapezoid, before his election!
Converse theorem
Also valid: if in a triangle a² + b² = c², then the triangle is right-angled (90° opposite c). Allows checking perpendicularity:
- Builders use 3-4-5 to verify right angles
- Egyptian harpedonaptai ("rope stretchers") used 12-knot rope forming 3-4-5
Applications
Geometry
- Rectangle, cube, box diagonals
- 2D and 3D point distances
- Equilateral triangle heights (h = L·√3/2)
Construction
- Wall squaring (3-4-5 rule)
- Beam 45° cuts
- Stair, ramp lengths
- Roof pitch
Navigation
- Straight-line distances on 2D maps
- Triangulation (GPS uses similar 3D principles)
Computer graphics
- Pixel distances
- Collision detection
- Vector normalization: |v| = √(x² + y² + z²)
Physics
- Vector magnitudes
- Resultants of perpendicular forces
- Oblique velocity: √(vx² + vy²)
- Spacetime distance (relativistic: ds² = dx² + dy² + dz² − c²dt²)
Trigonometry
- Fundamental identity: sin²(α) + cos²(α) = 1
- Pythagoras applied to unit hypotenuse right triangle
Law of cosines: generalization
For any triangle:
c² = a² + b² − 2·a·b·cos(γ)
where γ is angle opposite c. When γ = 90°: cos(90°) = 0 → c² = a² + b². Pythagoras is a special case of law of cosines.
3D and n-dimensional extension
Box diagonal with sides a, b, c:
d = √(a² + b² + c²)
In n dimensions: d = √(x₁² + x₂² + ... + xₙ²).
History
Babylonians (1800 BC, Plimpton 322 tablet): list of 15 Pythagorean triples, some very large. Knew the relation but didn't prove it.
Egyptians (2000 BC): used 3-4-5 triple to build right angles in pyramids.
Indians (Baudhayana, 800 BC): theorem stated in Sulba Sutras, with triples.
Pythagoras (570-495 BC, Samos/Southern Italy): traditionally credited with first general proof. Legend: sacrificed 100 oxen in celebration.
Euclid (300 BC): rigorous proof in Elements I.47.
Pierre de Fermat (1637): conjectured aⁿ + bⁿ = cⁿ has no integer solutions for n > 2. Proved only in 1995 by Andrew Wiles (Fermat's Last Theorem). Case n=2 is Pythagoras.
Modern mathematics
Metric spaces
Euclidean distance in ℝⁿ uses Pythagoras. Foundation of metric spaces.
L² norm and inner product
Linear algebra: norm ‖v‖₂ = √(Σxᵢ²) generalizes Pythagoras. Vectors orthogonal if inner product = 0.
Quantum mechanics
Probability: |ψ|² = Σ|cᵢ|², infinite Pythagoras (Hilbert space).
Relativity
Minkowski metric with negative time sign: ds² = dx² + dy² + dz² − c²dt². "Pythagoras with minus".
FAQ
Pythagorean theorem formula?
a² + b² = c², c is hypotenuse (longest side, opposite right angle), a, b are legs. Only for right triangles.
How to calculate hypotenuse?
c = √(a² + b²). Ex: legs 3 and 4 → c = √25 = 5.
How to calculate a leg?
If hypotenuse c and other leg b known: a = √(c² − b²). Ex: c=5, b=4 → a = 3.
What is a Pythagorean triple?
Positive integer triple (a,b,c) with a² + b² = c². Examples: (3,4,5), (5,12,13), (8,15,17). Infinitely many exist.
Does it always hold?
Only for right triangles. For any triangle, use law of cosines: c² = a² + b² − 2ab·cos(γ).
Who discovered it?
Known to Babylonians, Egyptians, Indians, Chinese before Pythagoras. Pythagoras (6th c. BC) credited with first formal proof. Euclid (300 BC) gave classical proof.
Does it exist in 3D?
Yes. Box diagonal: d = √(a² + b² + c²). In n dimensions: √(Σxᵢ²).
Builder's 3-4-5 method
To verify a 90° angle without precision square:
- Measure 3 m along one side
- Measure 4 m along perpendicular
- Distance between end points must be exactly 5 m
- If 5 m → right angle. Less → acute. More → obtuse.
Used by Egyptians 4000 years ago with 12-knot rope.
Pythagoras and π
Circle radius r has area πr². Square inscribed in circle has side r√2 (diagonal 2r). Ratio of circle area to inscribed square area is π/2 ≈ 1.571.
Common errors
- Applying to non-right triangles
- Confusing hypotenuse with leg
- Forgetting square root: c² = a² + b² does NOT mean c = a + b
- Using degrees instead of lengths
- Assuming triples are unique: infinitely many exist
- Applying to non-Euclidean space (sphere, hyperbolic)
Mathematical records
- Smallest triple: (3, 4, 5)
- Smallest with sides > 100: (20, 99, 101)
- Triples with small hypotenuse: (20, 21, 29), (12, 35, 37)
- Primitive triples with hypotenuse ≤ N grow as N/(2π) (Lehmer 1900)
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!