Math

Pythagorean Theorem Explained: Formula, Examples and Triples

The Pythagorean theorem states that a² + b² = c² in a right triangle, where c is the longest side. Legs of 5 and 9 give c = √(25 + 81) = √106 = 10.296. To find a leg, use a = √(c² − b²).

By CalculatorHub Editorial TeamPublished December 2, 2026Updated December 2, 20265 min read
Run the numbers yourself. Try our free Pythagorean Theorem Calculator and see the result with your own figures.

What the formula means

If you build a square on each side of a right triangle, the area of the square on the hypotenuse equals the sum of the areas of the squares on the other two sides. That is a² + b² = c².

Finding the hypotenuse

Square the legs, add, and take the square root. For legs 3 and 4: 9 + 16 = 25 and √25 = 5. For 5 and 9: c = 10.296.

Finding a missing leg

Subtract: a = √(c² − b²). With c = 13 and b = 12: √(169 − 144) = √25 = 5.

Pythagorean triples

Sets of whole numbers that work include 3-4-5, 5-12-13, 8-15-17 and 7-24-25, and any multiple of them such as 6-8-10. Builders use the 3-4-5 rule to check a corner is square: measure 3 units along one wall, 4 along the other, and the diagonal should be exactly 5.

Real-life uses

  • The diagonal of a rectangle or a TV screen: d = √(w² + h²).
  • The length of a ladder needed to reach a height.
  • The straight-line distance between two points on a map.

Try the Pythagorean theorem calculator, or the triangle calculator for triangles without a right angle.

A step-by-step worked problem

A ladder 5 m long leans against a wall with its foot 1.5 m from the base. How high does it reach? The ladder is the hypotenuse c = 5 and the distance on the ground is b = 1.5, so the height is a = √(5² − 1.5²) = √(25 − 2.25) = √22.75 = 4.77 m.

Diagonals and distances

  • The diagonal of a 4 m by 3 m room is √(16 + 9) = 5 m.
  • A 55-inch TV has a 16:9 screen, so its width is about 48 inches and its height about 27 inches.
  • The distance between points (1, 2) and (4, 6) is √((4−1)² + (6−2)²) = √(9 + 16) = 5.

Is it a right triangle?

SidesCheckRight triangle?
6, 8, 1036 + 64 = 100Yes
5, 7, 925 + 49 = 74, not 81No
9, 40, 4181 + 1,600 = 1,681Yes

If a² + b² is greater than c², the triangle is acute. If it is less, the triangle is obtuse. Use the Pythagorean theorem calculator to find a missing side.

Key terms

  • Hypotenuse: The side opposite the right angle.
  • Leg: One of the two shorter sides of a right triangle.
  • Pythagorean triple: Three whole numbers where a² + b² = c².
  • Right angle: An angle of exactly 90°.
  • Converse: If a² + b² = c², the triangle is a right triangle.

Practice questions

Try each one before you read the answer.

  1. Legs 9 and 12. Hypotenuse?
    Answer: √(81 + 144) = 15.
  2. Hypotenuse 17, one leg 8. Other leg?
    Answer: √(289 − 64) = 15.
  3. Diagonal of a 6 by 8 rectangle?
    Answer: 10.

Frequently asked questions

Does a² + b² = c² work for every triangle?

No, only right triangles. Other triangles need the law of cosines.

Which side is the hypotenuse?

The longest side, opposite the 90° angle.

How do I check if a triangle is a right triangle?

Square the sides. If the two smaller squares add up to the largest square, it is a right triangle.

Who discovered the Pythagorean theorem?

It is named after Pythagoras, but Babylonian and Indian mathematicians knew of the relationship earlier.

Does it work in 3D?

Yes. The diagonal of a box with sides a, b and c is √(a² + b² + c²).

Try the calculators

Keep reading