The Pythagorean theorem explained
Three letters, one of the most useful rules in all of math. Here is what a² + b² = c² means, how to use it both ways, and where it quietly shows up in real life.
Find the hypotenuse of a right triangle from the two shorter sides.
The Pythagorean theorem is one of those rules you meet once in school and then keep bumping into for the rest of your life, often without realising it. It connects the three sides of a right-angled triangle, and once you understand it you can find a distance you cannot measure directly, check whether a corner is truly square, or work out the diagonal of a screen. All of that comes from one short equation.
In short: the Pythagorean theorem says that in a right-angled triangle, a squared plus b squared equals c squared (a² + b² = c²), where c is the longest side. Square the two shorter sides, add them, and the result equals the square of the longest side. It lets you find any one side when you know the other two.
What a² + b² = c² actually says
In any right-angled triangle, the square of the longest side equals the squares of the other two sides added together. The longest side, called the hypotenuse, always sits opposite the right angle. We label the two shorter sides a and b, and the hypotenuse c, which gives the famous line:
a² + b² = c²
The key word is right-angled. The theorem only works when one angle is exactly 90 degrees. If the triangle has no right angle, this equation does not apply, and you need a different tool (the law of cosines) instead.
How to find the hypotenuse
When you know the two shorter sides and want the long one, follow three steps:
- Square each short side.
- Add the two results together.
- Take the square root of that total.
As a formula: c = √(a² + b²).
Worked example: a triangle with legs of 6 and 8. c = √(6² + 8²) = √(36 + 64) = √100 = 10. So the hypotenuse is exactly 10.
Most real triangles do not give a tidy whole number, and that is fine. Legs of 4 and 7 give c = √(4² + 7²) = √(16 + 49) = √65 ≈ 8.06. You just round to the precision you need.
How to calculate a missing side (a leg)
It also works backwards. If you know the hypotenuse and one leg, subtract instead of add to find the other leg:
b = √(c² − a²)
Worked example: the hypotenuse is 13 and one leg is 5. b = √(13² − 5²) = √(169 − 25) = √144 = 12. The missing side is 12.
Why it works (and where it comes from)
The name comes from the Greek mathematician Pythagoras, around 500 BCE, though Babylonian clay tablets show the relationship was known over a thousand years earlier. The clearest way to see why it is true: draw a square on each of the triangle's three sides. The area of the square on the longest side turns out to be exactly equal to the two smaller squares combined.
You can check that with the 3-4-5 triangle: the square on side 3 has area 9, the square on side 4 has area 16, and the square on the hypotenuse (5) has area 25. Sure enough, 9 + 16 = 25. That is all a² + b² = c² is saying, in areas rather than lengths.
The converse: is a triangle right-angled?
The theorem also runs in reverse, which is genuinely useful. If the three sides of a triangle satisfy a² + b² = c², then the triangle must have a right angle, opposite the longest side. So to test a corner or a triangle, square the two shorter sides, add them, and see whether they equal the square of the longest. If 5, 12 and 13 are your sides, 25 + 144 = 169 = 13², so it is a right angle. If they do not match, it is not.
Common Pythagorean triples
Here is a quick Pythagorean triples list. A triple is a set of three whole numbers that fit the theorem perfectly, with no messy decimals. They are worth recognising because they turn up constantly in exams and on the job. The first four below are primitive triples (they do not come from scaling a smaller one); the last two are scaled versions of 3-4-5. Any multiple of a triple is also a triple.
| a | b | c (hypotenuse) | Check | Type |
|---|---|---|---|---|
| 3 | 4 | 5 | 9 + 16 = 25 | primitive |
| 5 | 12 | 13 | 25 + 144 = 169 | primitive |
| 8 | 15 | 17 | 64 + 225 = 289 | primitive |
| 7 | 24 | 25 | 49 + 576 = 625 | primitive |
| 6 | 8 | 10 | 36 + 64 = 100 | 3-4-5 × 2 |
| 9 | 12 | 15 | 81 + 144 = 225 | 3-4-5 × 3 |
Where it actually gets used
This is not just a classroom exercise. The theorem shows up any time a right angle and a distance are involved:
- Building square corners. Builders use the 3-4-5 rule to make sure a corner is a true 90 degrees: measure 3 units along one wall, 4 along the other, and if the diagonal between those marks is exactly 5, the corner is square. For a bigger room you scale it up: 6-8-10 or 9-12-15 work the same way and are easier to measure accurately over a long wall.
- Screen and TV sizes. A screen's size is its diagonal. A monitor 24 inches wide and 13.5 inches tall has a diagonal of √(24² + 13.5²) = √(576 + 182.25) ≈ 27.5 inches, which is why it is sold as a "27-inch" screen (marketing sizes are rounded, and this one assumes a 16:9 shape).
- Distance on a map or grid. The straight-line distance between two points is the hypotenuse of the right triangle formed by their horizontal and vertical gaps. Go 30 km east and 40 km north and the straight-line distance is √(30² + 40²) = √2500 = 50 km. That is exactly how apps measure "as the crow flies".
- Ramps, ladders and roofs. A ladder's length and how far its base sits from the wall tell you how high it reaches: height = √(length² − base²). A 4 m ladder with its base 1 m out reaches √(16 − 1) = √15 ≈ 3.87 m up the wall.
Common mistakes to avoid
- Adding when you should subtract. To find a shorter side you subtract (b = √(c² − a²)). Adding gives a number that is too big.
- Forgetting the square root. √(36 + 64) is 10, not 100. The last step is always the square root.
- Using it on the wrong triangle. It only holds for right-angled triangles. For triangles without a right angle, you need the law of cosines instead.
- Mixing units. Keep every side in the same unit (all cm, or all m) before you square anything.
A quick way to check your answer
The hypotenuse must always be the largest of the three numbers, and it must be smaller than the two legs added together. If your c comes out longer than a + b, something has gone wrong. To skip the arithmetic entirely, enter any two sides into the Pythagorean theorem calculator and it returns the third, along with the working. For another everyday maths refresher, see our guide on how to work out a percentage.
Frequently asked questions
What is the Pythagorean theorem in simple terms?
In a right-angled triangle, the square of the longest side (the hypotenuse) equals the squares of the other two sides added together: a² + b² = c². It lets you find any one side when you know the other two.
How do I find the hypotenuse?
Square both shorter sides, add them, and take the square root: c = √(a² + b²). For legs of 6 and 8, c = √(36 + 64) = √100 = 10.
How do I find a missing shorter side?
Subtract instead of add: b = √(c² − a²). If the hypotenuse is 13 and one leg is 5, the other leg is √(169 − 25) = √144 = 12.
What are Pythagorean triples?
Whole-number side sets that fit the theorem exactly, like 3-4-5, 5-12-13 and 8-15-17. Any multiple of a triple is also a triple, so 6-8-10 works too.
Does the Pythagorean theorem work on any triangle?
No. It only works on right-angled triangles, where one angle is exactly 90 degrees. For other triangles you use the law of cosines.
How do I know if a triangle is right-angled?
Use the theorem in reverse: if a² + b² = c² for the three side lengths (c being the longest), the triangle has a right angle. For 5, 12, 13: 25 + 144 = 169 = 13², so it is right-angled.
Does the answer have to be a whole number?
No. Whole-number sets like 3-4-5 are the exception, not the rule. Most triangles give an irrational hypotenuse, such as legs 4 and 7 giving √65 ≈ 8.06. Just round to the precision you need.