Pythagorean Theorem
In every right triangle, the squares of the two legs add up to the square of the hypotenuse. Learn to find a missing side, recognize Pythagorean triples, follow a picture proof, test whether a triangle is right and measure distances on a graph.
The Pythagorean theorem says that in a right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c², where a and b are the legs and c is the hypotenuse, the side opposite the right angle. For legs of 3 and 4, c² = 3² + 4² = 9 + 16 = 25, so the hypotenuse is c = √25 = 5.
On this page you learn how to find the hypotenuse and a missing leg step by step, see the most useful Pythagorean triples, follow a short picture proof, use the converse to test whether a triangle is right, and apply the theorem to ladders, screens, baseball diamonds and the distance formula. Practice problems with answers are at the end.
The right triangle: legs and hypotenuse
A right triangle has one right angle, 90°, usually marked with a small square. The two sides that form the right angle are the legs, a and b. The side across from the right angle is the hypotenuse, c. It is always the longest side. Which leg you call a and which b does not matter, but c must be the hypotenuse.
The figure shows what the formula means with areas: the square on the hypotenuse is exactly as large as the two squares on the legs together.
The Pythagorean theorem formula
Solved for each side, it gives the two formulas you use in practice:
- Hypotenuse: c = √(a² + b²) (add the squares).
- Leg: a = √(c² − b²) (subtract the squares).
Memory aid: the hypotenuse is the longest side, so to find it you add; a leg is shorter, so to find it you subtract.
How to find the hypotenuse
- Square both legs.
- Add the two squares.
- Take the square root of the sum.
How to find a missing leg
- Square the hypotenuse and the known leg.
- Subtract: hypotenuse² minus leg².
- Take the square root.
Pythagorean triples
A Pythagorean triple is a set of three whole numbers a, b, c with a² + b² = c². Test questions use them often because the answers come out exact, so it pays to recognize them.
| Legs a, b | Hypotenuse c | Check |
|---|---|---|
| 3, 4 | 5 | 9 + 16 = 25 |
| 5, 12 | 13 | 25 + 144 = 169 |
| 8, 15 | 17 | 64 + 225 = 289 |
| 7, 24 | 25 | 49 + 576 = 625 |
| 20, 21 | 29 | 400 + 441 = 841 |
| 9, 40 | 41 | 81 + 1,600 = 1,681 |
Any multiple of a triple is again a triple: from 3-4-5 you get 6-8-10 and 9-12-15. To produce new triples, pick whole numbers m > n > 0 and compute m² − n², 2mn and m² + n² (Euclid’s formula). With m = 2, n = 1 you get 3, 4, 5; with m = 3, n = 2 you get 5, 12, 13; with m = 4, n = 1 you get 15, 8, 17.
A proof of the Pythagorean theorem
There are hundreds of proofs. This one needs only areas. Place four copies of the right triangle inside a square with side a + b:
Compute the area of the big square in two ways. From its side: (a + b)² = a² + 2ab + b². From its pieces: the tilted square c² plus four triangles of area ab/2 each, which is c² + 2ab. Both describe the same square, so a² + 2ab + b² = c² + 2ab. Subtract 2ab from both sides: a² + b² = c².
The converse: is it a right triangle?
The theorem also works backwards. If the three sides of a triangle satisfy a² + b² = c² (with c the longest side), the triangle has a right angle. Comparing the two sides of the equation even tells you the type of triangle:
- a² + b² = c²: right triangle.
- a² + b² > c²: acute triangle (all angles less than 90°).
- a² + b² < c²: obtuse triangle (one angle more than 90°).
Builders use the converse to check square corners with the “3-4-5 rule”: mark 3 ft along one wall and 4 ft along the other. If the marks are exactly 5 ft apart, the corner is 90°. Larger multiples such as 6-8-10 make the check more precise.
Real-life applications
The distance formula
The distance between two points on a coordinate grid is the hypotenuse of a right triangle whose legs are the horizontal and vertical differences:
Diagonals in 3D and special right triangles
Using the theorem twice gives the space diagonal of a box: d = √(l² + w² + h²). A box 3 × 4 × 12 has d = √(9 + 16 + 144) = √169 = 13. Two special right triangles come up again and again: in a 45-45-90 triangle with legs 1, the hypotenuse is √2 ≈ 1.414; in a 30-60-90 triangle with short leg 1 and hypotenuse 2, the long leg is √(4 − 1) = √3 ≈ 1.732.
Common mistakes
- Adding the sides without squaring: legs 3 and 4 give a hypotenuse of 5, not 7.
- Forgetting the square root at the end: c² = 25 means c = 5, not 25.
- Adding when you should subtract: for a leg, use c² − b², not c² + b².
- Labeling the wrong side as c: c must be the side opposite the right angle.
- Using it on a triangle without a right angle. For other triangles, use the law of cosines.
- Thinking √(a² + b²) = a + b: √(9 + 16) = 5, while 3 + 4 = 7.
Practice problems
Frequently asked questions
What does the Pythagorean theorem say?
In a right triangle, the square of the hypotenuse equals the sum of the squares of the legs: a² + b² = c².
How do you find the hypotenuse?
Square both legs, add them and take the square root: c = √(a² + b²). With legs 6 and 8, c = √100 = 10.
How do you find a missing side that is not the hypotenuse?
Subtract the square of the known leg from the square of the hypotenuse and take the square root: a = √(c² − b²). With c = 13 and b = 5, a = √144 = 12.
Does the Pythagorean theorem work for all triangles?
No, only for right triangles. For other triangles the law of cosines from trigonometry, c² = a² + b² − 2ab cos C, takes its place; for C = 90° it turns back into the Pythagorean theorem.
What is a Pythagorean triple?
Three whole numbers that fit a² + b² = c², such as 3, 4, 5 or 5, 12, 13. See the table of triples.
Keep learning
- Previous topic: volume of shapes.
- Next topic: linear equations.
- Square roots and irrational lengths like √2: square roots.
- Calculator: Pythagorean theorem calculator.
- To print: Pythagorean theorem worksheets with answer keys.
- In German: Satz des Pythagoras.
Spotted a mistake or have a request? Send us a short message and we will take care of it.