Intermediate level

The Pythagorean theorem

In a right triangle a² + b² = c². See why it works, how to find the hypotenuse and a leg, what Pythagorean triples are, and how the converse lets you check whether a corner really is square.

Before you start

This topic builds on earlier ideas. Before you start, it's worth working through the lessons below — they'll make everything click:

All formulas

  • The Pythagorean theorem

    a2+b2=c2a^2 + b^2 = c^2

    a and b are the legs, c is the hypotenuse

  • The hypotenuse

    c=a2+b2c = \sqrt{a^2 + b^2}

    the longest side, opposite the right angle

  • A leg

    b=c2a2b = \sqrt{c^2 - a^2}

    the theorem the other way round — subtraction, not addition

  • Diagonal of a square

    d=a2d = a\sqrt{2}

    the theorem applied to a triangle with legs a and a

  • The 3-4-5 triple

    32+42=523^2 + 4^2 = 5^2

    the next ones: 5-12-13, 8-15-17, 7-24-25

The Pythagorean theorem ties together the three sides of a right triangle — and only that kind. It is what lets you compute a length nobody can measure directly: the diagonal of a screen, the height a ladder reaches up a wall, a distance as the crow flies.

Naming the sides

abc
The legs a and b form the right angle. The hypotenuse c lies opposite it and is always the longest side.
  • The legs aa and bb — the two sides forming the right angle.
  • The hypotenuse cc — the side opposite the right angle, always the longest.

Before substituting anything, work out which side is the hypotenuse. You can spot it without arithmetic: it is the one that does not touch the right-angle mark.

The theorem

a2+b2=c2a^2 + b^2 = c^2

In words: the squares on the two legs add up to the square on the hypotenuse.

Why? The square built on side aa has area a2a^2, the square on side bb has area b2b^2. The theorem says those two squares together have exactly the area of the square built on the hypotenuse. It is a statement about areas, not about lengths alone — which is why second powers appear everywhere in it.

Finding the hypotenuse

c=a2+b2c = \sqrt{a^2 + b^2}
The legs of a triangle are 3 cm and 4 cm. What is the hypotenuse?

Finding a leg

The theorem works in reverse too. Given the hypotenuse and one leg, the other comes from subtraction:

b=c2a2b = \sqrt{c^2 - a^2}
The hypotenuse is 13 cm and one leg is 5 cm. What is the other leg?

Pythagorean triples

Some triples of whole numbers satisfy the theorem exactly. They are worth memorising, because problems reach for them most often:

aabbcc
345
51213
81517
72425
94041

Each one scales: since 3-4-53\text{-}4\text{-}5 works, so do 6-8-106\text{-}8\text{-}10 and 9-12-159\text{-}12\text{-}15.

Outside those cases the answer usually is not a whole number. For legs of 22 and 33 we get c=4+9=133.61c = \sqrt{4 + 9} = \sqrt{13} \approx 3.61 — and that is a perfectly normal answer. The form 13\sqrt{13} is exact, 3.613.61 is its approximation.

The converse

It also holds the other way round: if the sides of a triangle satisfy a2+b2=c2a^2 + b^2 = c^2, then that triangle is right-angled.

So a right angle can be checked without a protractor — just measure the three sides. That is the basis of the builder's 3-4-5 method: mark 33 units along one wall, 44 along the other, and if the distance between the marks is exactly 55, the corner is square.

An application: the diagonal of a rectangle

The diagonal splits a rectangle into two right triangles whose legs are its sides.

dab
The diagonal of a rectangle is the hypotenuse of a triangle with legs a and b.
Find the diagonal of a rectangle with sides of 6 cm and 8 cm.

The special case is a square, where both legs are equal:

d=a2+a2=2a2=a2d = \sqrt{a^2 + a^2} = \sqrt{2a^2} = a\sqrt{2}

For a side of 5cm5\,\text{cm} the diagonal is 527.07cm5\sqrt{2} \approx 7.07\,\text{cm}.

The answer is a length, so it is given in centimetres or metres. If your data is in inches or feet — and screen diagonals are quoted in inches — convert it first with our length converter.

Exercises

Type the answer together with its unit, e.g. 5 cm. Every question is built on a Pythagorean triple, so the answers are whole numbers.

Practice

Work through a set of exercises — they get harder as you go. At the end you'll see your score and the mistakes worth reviewing.

Exercise 1 of 8Score: 0
Hypotenuse c: a = 6 cm, b = 8 cm

Common mistakes

  • Using the theorem in a triangle with no right anglea2+b2=c2a^2 + b^2 = c^2 holds only in a right triangle.
  • Mistaking the hypotenuse for a legcc is always the side opposite the right angle, and always the longest.
  • Adding instead of subtracting when finding a leg — that one is b=c2a2b = \sqrt{c^2 - a^2}, not c2+a2\sqrt{c^2 + a^2}.
  • Forgetting the square rootc2=25c^2 = 25 is not the answer yet; the answer is c=5c = 5.
  • a2+b2=a+b\sqrt{a^2 + b^2} = a + b — the root of a sum is not the sum of the roots; 9+16=5\sqrt{9+16} = 5, not 3+4=73 + 4 = 7.
  • Expecting a whole number every time — outside the Pythagorean triples the answer is irrational, and that is correct.

Formula card

Topic: The Pythagorean theorem

  • The Pythagorean theorem

    a2+b2=c2a^2 + b^2 = c^2

    a and b are the legs, c is the hypotenuse

  • The hypotenuse

    c=a2+b2c = \sqrt{a^2 + b^2}

    the longest side, opposite the right angle

  • A leg

    b=c2a2b = \sqrt{c^2 - a^2}

    the theorem the other way round — subtraction, not addition

  • Diagonal of a square

    d=a2d = a\sqrt{2}

    the theorem applied to a triangle with legs a and a

  • The 3-4-5 triple

    32+42=523^2 + 4^2 = 5^2

    the next ones: 5-12-13, 8-15-17, 7-24-25

abc
A right triangle: a and b are the legs (they make the right angle), c is the hypotenuse — the longest side, opposite that angle.

Frequently asked questions

Related articles