The Pythagorean theorem is one of the most useful facts in all of mathematics. It describes a simple relationship between the three sides of a right triangle: the square of the longest side equals the sum of the squares of the other two sides. Written as a formula, it is a² + b² = c². That short equation shows up everywhere, from building a straight fence to measuring a television screen, and it has been used by builders, sailors, and surveyors for more than 2,000 years.

The theorem is named after Pythagoras, a Greek mathematician who lived around 500 BCE, although evidence suggests that builders in Egypt and Babylon knew the same relationship centuries earlier. Egyptian rope stretchers used knotted ropes to lay out perfect right angles for pyramids and fields. Modern carpenters still use the same trick. The theorem matters because right angles are everywhere, and whenever a right angle appears, the Pythagorean theorem gives a way to find a missing length from the two lengths already known.

What Is the Pythagorean Theorem? (illustration 1)

The Parts of a Right Triangle

A right triangle is a triangle with one angle of exactly 90 degrees. The side opposite the right angle is called the hypotenuse, and it is always the longest side of the triangle. The other two sides are called the legs. They meet at the right angle.

In the formula a² + b² = c², the letters a and b stand for the two legs, and c stands for the hypotenuse. The order of a and b does not matter, because addition works the same either way. What does matter is that c is always the hypotenuse. Mixing up a leg with the hypotenuse is the most common mistake people make with this theorem, and it always produces a wrong answer.

Squaring a number means multiplying it by itself. So a² is a times a, and c² is c times c. The theorem says that the area of a square built on the hypotenuse equals the combined areas of the squares built on the two legs. That picture is worth keeping in mind: if the legs are 3 and 4 units long, the squares on them have areas 9 and 16, which add to 25, and 25 is exactly the area of the square on a hypotenuse of 5 units.

The Classic 3-4-5 Triangle

The simplest example uses the numbers 3, 4, and 5. A triangle with legs of 3 and 4 and a hypotenuse of 5 satisfies the theorem exactly:

3² + 4² = 9 + 16 = 25 = 5²

This 3-4-5 triangle is so handy that builders use it as a quick check for square corners. To test whether a corner is a true right angle, measure 3 feet along one edge and 4 feet along the other edge, then measure the diagonal between the two marks. If the diagonal measures exactly 5 feet, the corner is square. If it measures more or less than 5 feet, the corner is off, and the frame needs adjusting before the work continues.

The same pattern scales up and down. Multiply every side by 2 and the result is a 6-8-10 triangle: 6² + 8² = 36 + 64 = 100 = 10². Multiply by 3 and the result is 9-12-15: 9² + 12² = 81 + 144 = 225 = 15². Any multiple of 3-4-5 works the same way, which is why builders often use 6-8-10 feet for a large room and 3-4-5 feet for a small one.

Other Pythagorean Triples

A Pythagorean triple is a set of three whole numbers that fits the theorem exactly. The 3-4-5 triple is the most famous, but there are many others:

Leg a Leg 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

Each row checks out. Take 5-12-13: 5² is 25, 12² is 144, and 25 + 144 = 169, which is 13². Take 20-21-29: 20² is 400, 21² is 441, and 400 + 441 = 841, which is 29². These triples are useful for spotting answers quickly. When a problem gives legs of 5 and 12, the hypotenuse is 13, with no square root needed.

Finding the Hypotenuse

When both legs are known, finding the hypotenuse takes three steps: square each leg, add the squares, and take the square root of the total.

Worked example: a right triangle has legs of 9 and 12. What is the hypotenuse?

Step 1: square the legs. 9² = 81 and 12² = 144. Step 2: add the squares. 81 + 144 = 225. Step 3: take the square root. The square root of 225 is 15.

The hypotenuse is 15. The answer makes sense because 9-12-15 is a scaled 3-4-5 triple, with every side three times as large.

Another example: legs of 6 and 8. Square them: 36 and 64. Add: 100. Square root of 100 is 10. The hypotenuse is 10, which matches the 6-8-10 triple.

Not every answer comes out as a whole number. With legs of 5 and 7, the squares are 25 and 49, which add to 74. The square root of 74 is about 8.60. A calculator gives the decimal, and rounding to two places is enough for most practical work. A scientific calculator handles the square root step in seconds, and a statistics calculator is handy when a project involves several triangles and the results need to be checked together.

Finding a Missing Leg

The theorem also works in reverse. When the hypotenuse and one leg are known, the missing leg comes from subtraction instead of addition: a² = c² − b².

Worked example: a right triangle has a hypotenuse of 13 and one leg of 5. What is the other leg?

Step 1: square the hypotenuse and the known leg. 13² = 169 and 5² = 25. Step 2: subtract. 169 − 25 = 144. Step 3: take the square root. The square root of 144 is 12.

The missing leg is 12. Again, this is the familiar 5-12-13 triple.

Another example: a hypotenuse of 10 and a leg of 6. Square them: 100 and 36. Subtract: 100 − 36 = 64. The square root of 64 is 8. The missing leg is 8, which fits the 6-8-10 triple.

This reverse form is the version used most often in real work, because the hypotenuse is often the known measurement, such as the length of a ladder or a ramp, while one leg is the distance that needs to be found.

A Ladder Against a Wall

A ladder leaning against a house forms a right triangle with the wall and the ground. The ladder is the hypotenuse, the distance from the wall to the foot of the ladder is one leg, and the height the ladder reaches on the wall is the other leg.

Worked example: a 12-foot ladder stands with its foot 5 feet from the base of a wall. How high does it reach?

The hypotenuse is 12 and one leg is 5. The height is the square root of 12² − 5². That is the square root of 144 − 25, which is the square root of 119, about 10.91 feet. The ladder reaches just under 11 feet up the wall.

Safety guidance for ladders often calls for the foot to sit about one quarter of the ladder length from the wall. For a 12-foot ladder, that means 3 feet out. The height then is the square root of 144 − 9, the square root of 135, about 11.62 feet. The ladder stands steeper and reaches higher, which is the safer and more stable position.

Diagonals of Rectangles and Squares

Every rectangle can be split into two right triangles by drawing a diagonal. The diagonal is the hypotenuse, and the length and width of the rectangle are the legs.

Worked example: a rectangle measures 8 feet by 6 feet. Its diagonal is the square root of 8² + 6², which is the square root of 64 + 36, the square root of 100, exactly 10 feet. Carpenters use this fact to check that a rectangular frame is square: if both diagonals measure the same, the corners are true right angles.

For a square, the diagonal has a neat shortcut. A square with side length s has a diagonal of s times the square root of 2, which is about 1.414 times s. A square with 5-foot sides has a diagonal of 5 × 1.414, about 7.07 feet. A square patio 10 feet on each side has a diagonal of about 14.14 feet.

Television and monitor sizes are measured diagonally, which is another place the theorem appears in everyday shopping. A television advertised as 32 inches with a 16:9 screen has a width of 32 × 16 divided by the square root of 337, about 27.89 inches, and a height of 32 × 9 divided by the same number, about 15.69 inches. The diagonal is 32 inches, and the width and height follow from the ratio and the theorem.

Distance Between Two Points

The Pythagorean theorem is also the basis of the distance formula in coordinate geometry. The distance between two points on a grid is the hypotenuse of a right triangle whose legs are the horizontal and vertical gaps between the points.

Worked example: find the distance between the points (1, 2) and (4, 6). The horizontal gap is 4 − 1 = 3. The vertical gap is 6 − 2 = 4. The distance is the square root of 3² + 4², the square root of 25, exactly 5 units.

The same idea works in navigation, mapping, and video games, where the straight-line distance between two locations is often needed even though movement happens along a grid of streets. A delivery route that goes 3 blocks east and 4 blocks north covers a straight-line distance of 5 blocks, even though the driving distance along the streets is 7 blocks.

Ramps, Roofs, and Slopes

A wheelchair ramp that rises 3 feet over a horizontal run of 4 feet has a sloping length of 5 feet, from 3² + 4² = 25. Scale that up: a ramp rising 9 feet over a run of 12 feet has a slope of 15 feet, since 9² + 12² = 81 + 144 = 225, and the square root of 225 is 15.

Roofers use the same math. A roof with a horizontal run of 12 feet and a vertical rise of 5 feet has a rafter length of 13 feet, because 12² + 5² = 144 + 25 = 169, and the square root of 169 is 13. Knowing the rafter length before cutting saves lumber and avoids short cuts.

Hikers meet the theorem on trails, too. A trail that climbs 300 feet of elevation while covering 400 feet of horizontal distance has a true slope length of 500 feet, from 300² + 400² = 90,000 + 160,000 = 250,000, and the square root of 250,000 is 500. The difference between the map distance and the slope distance is small on gentle trails and large on steep ones.

The Converse: Testing for a Right Angle

The theorem also runs backward as a test. If the sides of a triangle satisfy a² + b² = c², then the triangle must contain a right angle. If the sum of the squares of the two shorter sides is greater than the square of the longest side, the triangle is acute, with all angles under 90 degrees. If the sum is smaller, the triangle is obtuse, with one angle over 90 degrees.

Worked example: a triangle has sides 6, 8, and 9. Check 6² + 8² = 36 + 64 = 100. Compare with 9² = 81. Since 100 is greater than 81, the triangle is acute. Another triangle has sides 4, 6, and 9. Check 4² + 6² = 16 + 36 = 52, against 9² = 81. Since 52 is less than 81, the triangle is obtuse.

This converse is what makes the 3-4-5 check work for builders. It turns the theorem from a calculation into a measuring tool: any three lengths that fit the equation guarantee a square corner.

Common Mistakes to Avoid

The most common mistake is squaring the hypotenuse incorrectly, either by adding the sides first and then squaring, or by forgetting to take the square root at the end. The correct order is always square first, then add or subtract, then take the square root last.

A second mistake is using the theorem on a triangle that has no right angle. The formula a² + b² = c² only holds when the angle between a and b is exactly 90 degrees. For other triangles, the law of cosines is the right tool.

A third mistake is confusing area with length. The squares in the formula are areas, but the answer is a length. If the legs are measured in feet, the hypotenuse comes out in feet, not square feet. Units stay the same through the whole calculation.

A fourth mistake is rounding too early. When the answer is not a whole number, keep several decimal places through the middle steps and round only at the end. Rounding 119 to 120 before taking the square root would give 10.95 instead of the correct 10.91, a small error that grows when the result feeds into another calculation.

Why the Theorem Still Matters

The Pythagorean theorem is more than a school exercise. It is the foundation of the distance formula, the basis of trigonometry, and a daily tool in construction, surveying, navigation, and design. GPS positioning relies on the same idea extended into three dimensions. Computer graphics use it to measure distances between pixels. Engineers use it to size cables, braces, and supports.

The theorem survives because it is simple, exact, and general. Any right triangle, of any size, in any setting, obeys the same relationship. Learning it once means carrying a tool that answers a practical question thousands of times over: given two sides, what is the third?

Frequently Asked Questions

What is the Pythagorean theorem in simple words? In a right triangle, the square of the longest side equals the sum of the squares of the other two sides. If the legs are a and b and the hypotenuse is c, then a² + b² = c².

What is a 3-4-5 triangle? It is a right triangle with sides 3, 4, and 5. It works because 3² + 4² = 9 + 16 = 25 = 5². Builders use it to check square corners.

Can the Pythagorean theorem be used on any triangle? No. It only applies to right triangles, which have one 90-degree angle. For other triangles, use the law of cosines.

How do you find the hypotenuse? Square both legs, add the results, and take the square root. For legs of 6 and 8, the hypotenuse is the square root of 36 + 64, which is the square root of 100, or 10.

How do you find a missing leg? Square the hypotenuse, subtract the square of the known leg, and take the square root. For a hypotenuse of 13 and a leg of 5, the missing leg is the square root of 169 − 25, the square root of 144, or 12.

What is the converse of the Pythagorean theorem? If a triangle's sides satisfy a² + b² = c², the triangle is a right triangle. This lets builders test whether a corner is square using only a tape measure.