Skip to content
EN - Language: English
MathematicsHigh school

Pythagoras' theorem - why a² + b² = c², shown with squares, step by step

· 15 min read

In short

In a right-angled triangle the square on the longest side, the hypotenuse c, has the same area as the squares on the two shorter sides together - a² + b² = c². So two sides give the third, for example legs 3 and 4 give a hypotenuse of 5. It works only with a right angle, and the other way round as well - a triangle whose sides satisfy a² + b² = c² has a right angle.

Words to know

Right-angled triangle
A triangle with one angle of 90°. In the US it is called a right triangle.
Legs
The two sides that form the right angle, usually called a and b.
Hypotenuse
The side opposite the right angle, usually called c. It is always the longest side.
Pythagoras' theorem
In a right-angled triangle, a² + b² = c². In the US it is called the Pythagorean theorem.
Converse
The theorem read backwards - if a² + b² = c², the angle opposite c is a right angle.
Pythagorean triple
Three whole numbers with a² + b² = c², such as 3, 4, 5.

What do you think?

A rectangular field is 30 m wide and 40 m long. Instead of walking along two of its sides, you cut straight across from one corner to the opposite one. How long is the path across?

The idea: the two small squares fill the big one

A right-angled triangle has one angle of 90°. The two sides that form it are the legs, usually called aa and bb. The third side, opposite the right angle, is the hypotenuse cc, and it is always the longest.

Draw a square on each side. Pythagoras’ theorem says that the two smaller squares together have exactly the same area as the big one:

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

So when you know two sides of a right-angled triangle, you can work out the third. The theorem needs the right angle. It also works the other way round: if the sides of a triangle satisfy a2+b2=c2a^2 + b^2 = c^2, the triangle has a right angle.

Pythagoras’ theorem, step by step

The squares are made of small squares, so every area can be counted. Here a=3a = 3 and b=4b = 4. You can step through the animation with the buttons or the arrow keys.

a = 3b = 4c = ?

a = 3, b = 4, c = ?

Step 1 of 7
Steps of the animation. Arrow keys move between steps.

A right-angled triangle with legs a = 3 and b = 4. The hypotenuse c lies opposite the right angle. How long is it?

Nothing in this proof depends on the numbers 3 and 4. Four copies of any right-angled triangle fit into a square of side a+ba + b in both ways, so the gap c2c^2 always equals the two gaps a2a^2 and b2b^2.

Try it yourself: change the sides and the angle

Set the sides aa and bb and the angle between them. The picture draws a square on each side, and the readouts compare c2c^2 with a2+b2a^2 + b^2. Start at 90° and look for pairs that give a whole-number cc.

abca² = 9b² = 16c² = 25
a = 3
b = 4
90°
a² + b²
9 + 16 = 25
c²
c² = 25
c (Pythagorean triple)
c = 5
90°
right angle: c² = a² + b²

What to notice:

  • at 90° the readouts always show c2=a2+b2c^2 = a^2 + b^2, whatever aa and bb are,
  • a wider angle makes c2c^2 larger than a2+b2a^2 + b^2, and a narrower one makes it smaller,
  • cc is a whole number only for some pairs, such as 3 and 4, 6 and 8, or 5 and 12 - only then can the square on cc be filled exactly with whole small squares.

The definitions

A right-angled triangle has one angle of 90°. The two sides that form it are the legs aa and bb, and the side opposite it is the hypotenuse cc.

Pythagoras’ theorem. In every right-angled triangle, the sum of the squares of the legs equals the square of the hypotenuse:

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

To find the hypotenuse, add the squares of the legs. To find a leg, subtract the square of the other leg from the square of the hypotenuse:

c=a2+b2a=c2−b2\begin{aligned} c &= \sqrt{a^2 + b^2} \\ a &= \sqrt{c^2 - b^2} \end{aligned}

The converse. If the sides of a triangle satisfy a2+b2=c2a^2 + b^2 = c^2, the angle opposite cc is a right angle. So you can check for a right angle without measuring it. For example, 52+122=25+144=1695^2 + 12^2 = 25 + 144 = 169, and 169=132169 = 13^2, so a triangle with sides 5, 12 and 13 is right-angled. When cc is the longest side and c2>a2+b2c^2 > a^2 + b^2, the angle opposite cc is obtuse. When c2<a2+b2c^2 < a^2 + b^2, all three angles are acute.

Pythagorean triples are whole numbers with a2+b2=c2a^2 + b^2 = c^2, such as 3, 4, 5; 5, 12, 13; 8, 15, 17 and 7, 24, 25. Multiply a triple by any whole number and you get another one: 3, 4, 5 doubled is 6, 8, 10.

Two results come up again and again:

  • The diagonal of a square with side aa is a2a\sqrt{2}, because d2=a2+a2=2a2d^2 = a^2 + a^2 = 2a^2.
  • The distance between two points (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is the hypotenuse of a triangle with a horizontal leg x2−x1x_2 - x_1 and a vertical leg y2−y1y_2 - y_1:
d2=(x2−x1)2+(y2−y1)2\begin{aligned} d^2 &= (x_2 - x_1)^2 \\ &\quad + (y_2 - y_1)^2 \end{aligned}

A little history. The theorem is named after the Greek thinker Pythagoras, who was born around 570 BC. Nothing he wrote has survived, and the rule itself is much older. A Babylonian clay tablet from about 1800 BC, known as Plimpton 322, holds columns of numbers that are usually read as Pythagorean triples. Euclid’s Elements, written around 300 BC, proves the theorem in Book I, Proposition 47, and its converse in Proposition 48.

Example 1: the diagonal of a square

Find the length of the diagonal of a square with sides of 5 cm.

Step 1. Find the right-angled triangle

The diagonal cuts the square into two right-angled triangles. Their legs are two sides of the square, and the diagonal dd is the hypotenuse.

a=5b=5\begin{aligned} a &= 5 \\ b &= 5 \end{aligned}

Step 2. Write down the theorem

The diagonal is the hypotenuse, so it stands alone on one side of the equation.

d2=52+52d^2 = 5^2 + 5^2

Step 3. Add the squares

We square each of the two legs and add the results.

d2=25+25=50d^2 = 25 + 25 = 50

Step 4. Take the square root and simplify it

We write 50 as 25⋅225 \cdot 2, because 25=5\sqrt{25} = 5.

d=50=25⋅2=52\begin{aligned} d &= \sqrt{50} \\ &= \sqrt{25 \cdot 2} \\ &= \boxed{5\sqrt{2}} \end{aligned}

Answer

d=52≈7.07d = 5\sqrt{2} \approx 7.07 cm. In any square with side aa the diagonal is a2a\sqrt{2}, about 1.41 times the side.

Example 2: how high does the ladder reach?

A ladder 2.5 m long leans against a wall. Its foot stands 0.7 m from the wall. How high up the wall does it reach?

Step 1. Find the hypotenuse

The wall, the ground and the ladder make a right-angled triangle, with the right angle where the wall meets the ground. The ladder lies opposite it, so the ladder is the hypotenuse.

c=2.5a=0.7\begin{aligned} c &= 2.5 \\ a &= 0.7 \end{aligned}

Step 2. Rearrange the theorem for the other leg

The height hh up the wall is a leg, so we subtract the square of the known leg from the square of the hypotenuse.

h2=c2−a2h^2 = c^2 - a^2

Step 3. Square the numbers and subtract

We put in the two lengths.

h2=2.52−0.72=6.25−0.49=5.76\begin{aligned} h^2 &= 2.5^2 - 0.7^2 \\ &= 6.25 - 0.49 \\ &= 5.76 \end{aligned}

Step 4. Take the square root

The height is the square root of 5.76.

h=5.76=2.4h = \sqrt{5.76} = \boxed{2.4}

Answer

h=2.4h = 2.4 m. The ladder reaches 2.4 m up the wall, and indeed 0.72+2.42=0.49+5.76=6.25=2.520.7^2 + 2.4^2 = 0.49 + 5.76 = 6.25 = 2.5^2.

Your turn

Find the distance between the points A=(−2,1)A = (-2, 1) and B=(4,9)B = (4, 9).

Hintshow

Draw a right-angled triangle with ABAB as its hypotenuse: one leg horizontal, the other vertical. The lengths of the legs are the differences of the coordinates.

Solutiontry it on your own first

Step 1. Find the horizontal leg

The horizontal leg runs from x=−2x = -2 to x=4x = 4, so we subtract the x-coordinates.

4−(−2)=64 - (-2) = 6

Step 2. Find the vertical leg

The vertical leg runs from y=1y = 1 to y=9y = 9, so we subtract the y-coordinates.

9−1=89 - 1 = 8

Step 3. Apply the theorem

The segment ABAB is the hypotenuse, so we add the squares of the two legs.

AB2=62+82=36+64=100\begin{aligned} AB^2 &= 6^2 + 8^2 \\ &= 36 + 64 \\ &= 100 \end{aligned}

Step 4. Take the square root

The distance is the square root of 100.

AB=100=10AB = \sqrt{100} = \boxed{10}

Answer

AB=10AB = 10. The legs 6 and 8 are the triple 3, 4, 5 doubled, so the hypotenuse is 2⋅5=102 \cdot 5 = 10.

Common mistakes

  • c=a+bc = a + b. The square root of a sum is not the sum of the square roots: 9+16=25=5\sqrt{9 + 16} = \sqrt{25} = 5, not 3+4=73 + 4 = 7. In any triangle each side is shorter than the other two together.
  • The wrong side on its own. In a2+b2=c2a^2 + b^2 = c^2, cc must be the hypotenuse, the side opposite the right angle. When the hypotenuse is given, subtract: a2=c2−b2a^2 = c^2 - b^2, as in Example 2.
  • Forgetting the square root. c2=25c^2 = 25 means c=5c = 5. The 25 is the area of the square, not the length of the side.
  • No right angle. If the angle between the sides 3 and 4 is 120°, the third side is not 5: c2=37c^2 = 37, as in step 6 of the animation. The theorem only holds in right-angled triangles.
  • Mixed units. Change everything to one unit first. Legs of 50 cm and 1.2 m are 0.5 m and 1.2 m, and then 0.25+1.44=1.690.25 + 1.44 = 1.69, so the hypotenuse is 1.3 m.

At school: Key Stage 3, GCSE and in the US

In England pupils meet Pythagoras’ theorem in Key Stage 3, where they use it to solve problems with right-angled triangles. GCSE Mathematics asks you to know the formula a2+b2=c2a^2 + b^2 = c^2 and to use it to find lengths in right-angled triangles in two- and three-dimensional figures. In three dimensions you use the theorem twice: in a box 3 by 4 by 12, the diagonal of the floor is 5, and the diagonal across the whole box is 13, because 52+122=25+144=169=1325^2 + 12^2 = 25 + 144 = 169 = 13^2.

In the US the Common Core standards place the theorem in Grade 8. Students explain a proof of the theorem and its converse, use it to find unknown side lengths in two and three dimensions, and use it to find the distance between two points in a coordinate system.

The theorem keeps coming back later. On the unit circle it gives sin⁡2α+cos⁡2α=1\sin^2\alpha + \cos^2\alpha = 1 (Trigonometry and the unit circle), and inside solids it finds hidden lengths (Angles and cross-sections in solids).

Check yourself

Test yourself

A right-angled triangle has legs 6 and 8. How long is its hypotenuse?

The hypotenuse of a right-angled triangle is 13 and one leg is 5. How long is the other leg?

Which three lengths are the sides of a right-angled triangle?

What is the distance between the points (1,2)(1, 2) and (4,6)(4, 6)?

A triangle has sides 3, 4 and 6. What kind of angle lies opposite the side 6?

Flashcards for review

Flip a card and say whether you knew the answer. The ones you did not know come back at the end of the deck. Why it pays to come back to them in a few days is explained in the guide Spaced repetition.

Flashcards

  1. What does Pythagoras’ theorem say?

    In a right-angled triangle with legs aa and bb and hypotenuse cc: a2+b2=c2a^2 + b^2 = c^2. The squares on the legs together have the area of the square on the hypotenuse.
  2. Which side of a right-angled triangle is the hypotenuse?

    The side opposite the right angle. It is always the longest side.
  3. How do you find a leg when you know the hypotenuse cc and the other leg bb?

    Subtract: a=c2−b2a = \sqrt{c^2 - b^2}.
  4. What does the converse of Pythagoras’ theorem say?

    If the sides of a triangle satisfy a2+b2=c2a^2 + b^2 = c^2, the angle opposite cc is a right angle.
  5. The longest side cc of a triangle has c2>a2+b2c^2 > a^2 + b^2. What does that tell you?

    The angle opposite cc is obtuse - larger than 90°. With c2<a2+b2c^2 < a^2 + b^2 all three angles are acute.
  6. Name two Pythagorean triples.

    For example 3, 4, 5 and 5, 12, 13 (also 8, 15, 17 and 7, 24, 25). Multiples work too: 6, 8, 10.
  7. How long is the diagonal of a square with side aa?

    a2a\sqrt{2}, because d2=a2+a2=2a2d^2 = a^2 + a^2 = 2a^2.
  8. How do you find the distance between two points in a coordinate system?

    Take the differences of their coordinates as the legs of a right-angled triangle: d2=(x2−x1)2+(y2−y1)2d^2 = (x_2 - x_1)^2 + (y_2 - y_1)^2.
  9. Why is the hypotenuse of a triangle with legs 3 and 4 not 7?

    Because 9+16=25=5\sqrt{9 + 16} = \sqrt{25} = 5: the square root of a sum is not the sum of the square roots. The hypotenuse is shorter than the two legs together.
  10. How does the proof with four triangles work?

    Four copies of the triangle fit into a square of side a+ba + b in two ways. One leaves the gap c2c^2, the other the gaps a2a^2 and b2b^2, so c2=a2+b2c^2 = a^2 + b^2.

Sources

We checked the facts on this page against these sources. All of them may be reused freely: they carry an open licence or are not covered by copyright.

  1. Illustrative Mathematics - Grade 8, Unit 8, Lesson 7: A Proof of the Pythagorean Theorem (two squares of side a + b: one holds four triangles around the square c², the other a², b² and two rectangles; so a² + b² = c²) · CC BY 4.0
  2. Illustrative Mathematics - Grade 8, Unit 8, Lesson 8: Finding Unknown Side Lengths (the hypotenuse or a leg from the other two sides) · CC BY 4.0
  3. Illustrative Mathematics - Grade 8, Unit 8, Lesson 9: The Converse (if a² + b² = c² with c the longest side, the triangle is right-angled; if not, it is not) · CC BY 4.0
  4. Illustrative Mathematics - Grade 8, Unit 8, Lesson 10: Applications of the Pythagorean Theorem (a diagonal path across a rectangle instead of along its sides; the diagonal of a box) · CC BY 4.0
  5. Illustrative Mathematics - Grade 8, Unit 8, Lesson 11: Finding Distances in the Coordinate Plane (the distance between two points as the hypotenuse of a right-angled triangle) · CC BY 4.0
  6. Euclid - The First Six Books of the Elements of Euclid, ed. John Casey, Project Gutenberg (Book I, Propositions 47 and 48: the theorem and its converse; Book II, Propositions 12 and 13: the square opposite an obtuse angle is more than the sum of the other two squares, opposite an acute angle less) · public domain
  7. MacTutor History of Mathematics - Pythagoras's theorem in Babylonian mathematics (the tablet Plimpton 322, from between 1800 and 1650 BC, read as a list of Pythagorean triples) · CC BY-SA 4.0
  8. MacTutor History of Mathematics - Pythagoras of Samos (born about 570 BC; nothing he wrote survives; the theorem was known to the Babylonians long before him) · CC BY-SA 4.0
  9. Wikipedia - Pythagorean theorem (the statement, the proof by rearrangement, the converse, the distance formula, history) · CC BY-SA 4.0
  10. Wikipedia - Plimpton 322 (a Babylonian clay tablet from about 1800 BC, usually read as a table of Pythagorean triples) · CC BY-SA 4.0

More explainers