The Pythagorean theorem, with worked examples
What the Pythagorean theorem says, how to find a missing side, the common triples worth remembering, the converse test for a right angle, and practical uses from ladders to TV sizes.
Last reviewed · 1,234 words
In short
- In a right-angled triangle, a² + b² = c², where c is the longest side, opposite the right angle.
- To find the hypotenuse, add the squares and take the root. To find a leg, subtract the squares and take the root.
- A 3-4-5 triangle has a right angle, so builders use it to set out a square corner.
- The theorem only holds for right-angled triangles. If a² + b² does not equal c², the triangle has no right angle.
- Whole-number sets such as 5-12-13 and 8-15-17 are called Pythagorean triples, and they save time in exams.
The Pythagorean theorem is probably the best-known result in geometry. It is named after a Greek thinker of the sixth century BCE, although the relationship was known much earlier. The Baudhayana Sulba Sutra, an ancient Indian text on building altars, states it clearly, and Babylonian tablets list triples of numbers that fit it. It links the three sides of a right-angled triangle, so that any two give the third. That makes it useful in far more than exam papers, as carpenters, surveyors and anyone working out a screen size all rely on it.
The theorem
In a right-angled triangle, the square of the longest side equals the sum of the squares of the other two:
a² + b² = c²
The longest side, c, is called the hypotenuse. It is always opposite the right angle. The other two sides, a and b, are called the legs.
The word "square" here is literal. Draw a square on each side of the triangle, and the areas of the two smaller squares add up exactly to the area of the largest. With sides of 3, 4 and 5, the squares are 9, 16 and 25, and 9 + 16 = 25.
Finding a missing side
The hypotenuse. Add the squares of the legs and take the square root:
c = √(a² + b²)
With legs of 8 and 15: 64 + 225 = 289, and √289 = 17.
A leg. Subtract the square of the other leg from the square of the hypotenuse:
a = √(c² − b²)
With a hypotenuse of 13 and a leg of 3: 169 − 9 = 160, and √160 = 12.649.
A leg must be shorter than the hypotenuse. If you enter a hypotenuse no longer than the leg, there is no such triangle, and the calculator says so. Roots that are not whole numbers are common, so the square root calculator is handy for simplifying them, and √160 = 4√10.
Triples worth remembering
A Pythagorean triple is a set of three whole numbers that fit the theorem. Spotting one in an exam saves the arithmetic.
| a | b | c |
|---|---|---|
| 3 | 4 | 5 |
| 5 | 12 | 13 |
| 7 | 24 | 25 |
| 8 | 15 | 17 |
| 9 | 40 | 41 |
| 20 | 21 | 29 |
Multiples work too. Since 3-4-5 is a triple, so are 6-8-10, 9-12-15 and 30-40-50. So a triangle with legs of 30 and 40 has a hypotenuse of 50, with no sums needed.
There is a neat way to make new ones. Choose two whole numbers m and n, with m larger than n. Then:
a = m² − n², b = 2mn, c = m² + n²
With m = 2 and n = 1, you get 3, 4 and 5. With m = 3 and n = 2, you get 5, 12 and 13. With m = 4 and n = 1, you get 15, 8 and 17.
Special triangles
Two right-angled triangles come up so often that their ratios are worth learning.
The 45-45-90 triangle. The two legs are equal, so the sides are in the ratio 1 : 1 : √2. This is half of a square, so the diagonal of a square is its side × 1.414.
The 30-60-90 triangle. The sides are in the ratio 1 : √3 : 2. This is half of an equilateral triangle, so the height of an equilateral triangle is its side × 0.866.
The calculator also shows the two acute angles. In a 3-4-5 triangle, they are 36.87° and 53.13°, which add up to 90°, as the two acute angles of any right-angled triangle must.
The converse: testing for a right angle
The theorem also works backwards. If the sides of a triangle fit a² + b² = c², the angle opposite c is a right angle.
This gives a simple test. Is a triangle with sides of 7, 8 and 11 right-angled? 49 + 64 = 113, while 121 is larger, so it is not. Because c² is larger than a² + b², the largest angle is more than 90°. If c² were smaller, every angle would be less than 90°.
Masons use this every day. To set out a square corner, measure 3 units along one wall and 4 along the other, then check that the diagonal between the two marks is exactly 5. For a larger foundation, use 6-8-10 or 9-12-15, since longer lines show errors more clearly.
Practical examples
A ladder. A 10 ft ladder has its foot 6 ft from a wall. How high does it reach? √(100 − 36) = √64 = 8 ft.
Room diagonal. A room is 15 ft by 12 ft. The distance corner to corner is √(225 + 144) = √369 = 19.21 ft. That is useful when deciding whether a long item will turn inside a room, or for checking whether the room is square, since both diagonals should be equal.
Screen size. Screens are sold by the diagonal. A 55 inch screen in the 16:9 shape has a ratio diagonal of √(16² + 9²) = 18.36 units, so each unit is 55 ÷ 18.36 = 2.996 inches. Its width is about 47.9 inches and its height about 27.0 inches.
Distance on a map. The distance between two points on a grid uses the same sum. From (1, 2) to (4, 6), the steps are 3 and 4, so the straight-line distance is 5.
Roof slope. A roof that rises 6 ft across a 12 ft horizontal run has a rafter of √(36 + 144) = 13.42 ft, before any overhang.
To find the space a triangle covers, the area calculator has a triangle option. With two legs, the area is half their product, so a 3-4-5 triangle has an area of 6.
Common mistakes
Adding the sides. The sum uses squares, so a triangle with legs of 3 and 4 does not have a hypotenuse of 7.
Using it on the wrong triangle. The theorem needs a right angle. For any other triangle, use the cosine rule, which is the general form of the same idea.
Mixing up which side is c. Always put the longest side alone on one side of the equation.
Forgetting the root. A common exam slip is to stop at a² + b² and give 25 instead of 5.
Mixing units. Convert both measurements to the same unit first. A leg of 1 m and a leg of 50 cm must be entered as 100 and 50, or 1 and 0.5.
Why the theorem is true
There are hundreds of proofs, but one is simple enough to see in your head. Take a large square with sides of a + b. Place four copies of the right-angled triangle inside it, one at each corner, so that their hypotenuses form a tilted square in the middle with sides of c.
The large square has an area of (a + b)², which is a² + 2ab + b². It is also made up of the four triangles, each with an area of ab ÷ 2, plus the inner square. That gives 2ab + c². Setting the two equal and removing 2ab from each side leaves a² + b² = c².
What this calculator assumes
- The triangle has a right angle between a and b.
- All sides are in the same unit, and the answer is in that unit.
- A hypotenuse must be longer than the known leg.
- Results are rounded for display, so a root such as √2 is shown to a few decimal places.
- Angles are given in degrees and area in square units.