Pythagoras' theorem explained with real-life uses
Pythagoras' theorem is one of the few pieces of school maths that people really do use as adults. It connects the three sides of a right-angled triangle, so that if you know two sides you can find the third. That is useful when you want to know how long a ladder you need, the diagonal of a screen, the length of a rafter, or whether a patio is perfectly square. This guide states the rule, works through step-by-step examples for finding the longest side and a shorter side, shows common whole-number triples, and applies the theorem to everyday jobs, with a note on rounding and on the most frequent mistakes.
The theorem in one sentence
In a right-angled triangle, the square of the longest side equals the sum of the squares of the other two sides. If the two shorter sides are a and b and the longest side is c, then a² + b² = c². The longest side, opposite the right angle, is called the hypotenuse.
The word square here means a number multiplied by itself. 3 squared is 9, 4 squared is 16 and 5 squared is 25. Notice that 9 plus 16 is 25, so a triangle with sides 3, 4 and 5 is right-angled. That is the most famous example.
The theorem only works for right-angled triangles. If the angle is not exactly 90 degrees, the relationship does not hold, which is exactly why builders use it to check for a right angle.
Finding the longest side
To find the hypotenuse, square the two shorter sides, add them, and take the square root. Suppose the two shorter sides are 6 and 8. Squares: 36 and 64. Sum: 100. Square root: 10. The hypotenuse is 10.
Not every answer is a whole number. If the shorter sides are 5 and 7, the squares are 25 and 49, the sum is 74, and the square root of 74 is 8.602. Round it sensibly for the job. For a measurement in centimetres, 8.6 is enough, and for a precise cut, 86 millimetres.
Always check that the hypotenuse is the longest side. If your answer is shorter than either of the other two sides, you have made a mistake, perhaps adding when you should have been squaring.
Finding a shorter side
If you know the hypotenuse and one other side, rearrange the formula: a² = c² minus b². Square the hypotenuse, square the known side, subtract the smaller from the larger, and take the square root.
Suppose the hypotenuse is 13 and one side is 5. Squares: 169 and 25. Difference: 144. Square root: 12. The missing side is 12. If the hypotenuse is 9 and a side is 4, the squares are 81 and 16, the difference is 65, and the square root of 65 is 8.062.
The key difference is that you subtract in this case. A common mistake is to add the squares when looking for a shorter side, which gives an answer that is too large.
Whole-number triples worth knowing
Some sets of three whole numbers fit the theorem exactly. They are called Pythagorean triples. The most common are 3, 4, 5; 5, 12, 13; 8, 15, 17; and 7, 24, 25. Any multiple of a triple is also a triple, so 6, 8, 10 and 9, 12, 15 and 30, 40, 50 all work.
These are handy for building. To mark a right angle on the ground, measure 3 units along one line and 4 units along another from the same corner. If the distance between the two end points is exactly 5 units, the corner is square. For a larger job, use 6, 8 and 10 metres, or 9, 12 and 15, since longer lines reduce the effect of small errors.
This is sometimes called the 3-4-5 method, and it is used by people laying foundations, fences, decking and patios.
Everyday uses
Ladders: a ladder must lean at the right angle to stay stable. A common rule is one unit out for every four units up. To reach a wall height of 4 metres, the base should be 1 metre from the wall, and the ladder length is the square root of 4² + 1², which is the square root of 17, or 4.12 metres. In practice you would need a longer ladder to extend above the roof or gutter, so check the guidance of the Health and Safety Executive.
Screens: a television is described by its diagonal. If a screen is 120 centimetres wide and 68 centimetres tall, the diagonal is the square root of 14,400 plus 4,624, which is the square root of 19,024, or 137.9 centimetres. Divide by 2.54 to get 54.3 inches, which is sold as a 55 inch screen.
Distances on a map or a plan: if you walk 3 kilometres east and 4 kilometres north, you are 5 kilometres in a straight line from where you started. Walking the two sides takes 7 kilometres, but the direct route is 5.
Roofs, rafters and slopes
A roof is a right-angled triangle, with the horizontal run, the vertical rise and the sloping rafter. For a simple lean-to roof with a run of 3.6 metres and a rise of 1.2 metres, the rafter length is the square root of 3.6² plus 1.2², which is the square root of 12.96 plus 1.44, or the square root of 14.4. That is 3.79 metres.
The pitch angle follows from the rise and run. The ratio 1.2 divided by 3.6 is 0.333, and the angle whose tangent is 0.333 is 18.4 degrees. Roofers allow extra for overhang at the eaves, so add that to the rafter length.
Stairs follow the same logic. The going and the rise form the two shorter sides, and the length of the stringer is the hypotenuse. A rise of 2.6 metres over a run of 3.8 metres needs a stringer of 4.6 metres.
Checking a room or a patio for square
To check that a rectangle is truly square, measure both diagonals. In a perfect rectangle, they are equal. You can also use the theorem to work out what the diagonal should be: for a patio 4 metres by 3 metres, the diagonal should be exactly 5 metres. For a 5 metre by 3.5 metre deck, the diagonal should be the square root of 25 plus 12.25, which is 6.10 metres.
If your diagonals differ by more than a few millimetres, adjust the corners until they match. Measure from the same points each time, and use a stiff tape, since a sagging one adds length.
For tiling or flooring, a room that is slightly out of square means tiles should be laid from the centre rather than from a wall, so that the cuts at the edges are even.
Mistakes to avoid
The most common slip is to forget the square root at the end. After adding the squares, you have c squared, not c. Another is to mix units: do not use feet for one side and metres for another.
A third is to apply the theorem to a triangle that is not right-angled, for example in a sloping roof where the angle at the ridge is not 90 degrees. Check that the triangle you have really has a right angle, or that you have the two sides that make it.
Finally, keep extra decimal places through the working, and round at the end. Rounding the squares early can make the result a few millimetres out, which matters for a cut that has to fit.
Tools mentioned in this guide
Pythagorean Theorem Calculator
Find the missing side of a right-angled triangle, with area, perimeter and angles.
EverydayRoof Pitch Calculator
Find roof pitch angle, ratio and rafter length from the rise and run.
MathsArea and Volume Calculator
Work out the area, perimeter, volume and surface area of common shapes in the units you choose.
EverydayDecking Calculator
Work out how many decking boards, joists and screws you need for a deck of any size.
EverydayAspect Ratio Calculator
Find the aspect ratio of any size and work out a new width or height that keeps it.
ConvertersUnit Converter
Convert length, mass, volume, speed, data size and temperature.
Frequently asked questions
What is Pythagoras' theorem?
In a right-angled triangle, the square of the longest side equals the sum of the squares of the other two sides: a squared plus b squared equals c squared.
How do I find a missing shorter side?
Square the hypotenuse and the known side, subtract the smaller from the larger, and take the square root. With a hypotenuse of 13 and a side of 5, the missing side is 12.
What is the 3-4-5 rule?
A triangle with sides of 3, 4 and 5 units has a right angle. Builders use it to mark square corners by measuring 3 along one line, 4 along the other and checking the distance between the ends is 5.
Does the theorem work for any triangle?
No, only for triangles with a right angle. For other triangles you need the cosine rule.
How do I work out a TV diagonal from its width and height?
Square both, add them, and take the square root. A screen 120 cm wide and 68 cm tall has a diagonal of about 137.9 cm, which is 54.3 inches.