Skip to main content

Mathematics

The Pythagorean theorem

The famous rule linking the three sides of a right triangle, how to use it, where it really comes from, and why it is true.

Explore in 3D

Drag to turn the model all the way round; scroll or pinch to zoom. Keyboard: select the model, then use the arrow keys to turn, + and − to zoom, and R to reset.

Loading 3D model…
View

a² + b² = 9 + 16 = 25 = c² → c = 5

Parts

Choose a part, in the list or on the model, to learn what it is.

Exact geometry: lengths and areas are calculated live from the side lengths you choose.

Beginner level

Right triangles

A right triangle has one corner that is a right angle: a square corner of 90°, like the corner of a book. The side opposite the right angle is called the hypotenuse [1]. The other two sides are called the legs.

The rule

If the legs have lengths aa and bb, and the hypotenuse has length cc, then [1]:

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

In words: draw a square on each side of the triangle. The areas of the two small squares always add up to the area of the big square.

Try it: 3, 4, 5

A triangle with legs 3 and 4 has a hypotenuse of 5, because [1]:

32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2

Using the rule

A ladder leans against a wall. Its foot is 6 m from the wall, and it reaches 8 m up. The wall and the ground meet at a right angle, so the ladder is the hypotenuse:

c2=62+82=36+64=100⇒c=100=10 mc^2 = 6^2 + 8^2 = 36 + 64 = 100 \quad\Rightarrow\quad c = \sqrt{100} = 10\ \text{m}

The ladder is 10 m long.

Intermediate level

Finding a missing leg

Rearrange the rule to find a leg when you know the hypotenuse:

b=c2−a2b = \sqrt{c^2 - a^2}

Example. The hypotenuse is 13 and one leg is 5:

b=132−52=169−25=144=12b = \sqrt{13^2 - 5^2} = \sqrt{169 - 25} = \sqrt{144} = 12

Because c2=a2+b2c^2 = a^2 + b^2 and both a2a^2 and b2b^2 are positive, c2c^2 is bigger than either of them. So the hypotenuse is always the longest side.

Distance between two points

On a grid, the straight-line distance between (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is the hypotenuse of a right triangle. Its legs are the horizontal gap x2−x1x_2 - x_1 and the vertical gap y2−y1y_2 - y_1:

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Example. From (1,2)(1, 2) to (7,10)(7, 10), the gaps are 66 and 88, so d=36+64=10d = \sqrt{36 + 64} = 10.

Older than Pythagoras

The theorem carries the name of the Greek thinker Pythagoras (c. 570–500/490 BCE), but people knew it long before him [1]:

  • Babylonian clay tablets from about 1900–1600 BCE list whole-number triples that fit the rule, now called Pythagorean triples (3, 4, 5 is the simplest example of one). They also include a very accurate value of 2\sqrt{2}.
  • The Baudhayana Sulba-sutra of India, written between 800 and 400 BCE, also states it.
  • In Greece, it became Proposition 47 of Book I of Euclid's Elements [2]: "In right-angled triangles the square on the side opposite the right angle equals the sum of the squares on the sides containing the right angle."

Advanced level

A proof by rearranging triangles

Here is a proof that may be the original one [1]. Take four copies of a right triangle with legs aa, bb and hypotenuse cc. Arrange them inside a large square of side a+ba + b so that their hypotenuses form a tilted square in the middle.

Count the area of the large square in two ways.

As one square:

(a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2

As four triangles plus the tilted square:

4⋅12ab+c2=2ab+c24 \cdot \tfrac{1}{2}ab + c^2 = 2ab + c^2

The two expressions describe the same area, so:

a2+2ab+b2=2ab+c2⇒a2+b2=c2a^2 + 2ab + b^2 = 2ab + c^2 \quad\Rightarrow\quad a^2 + b^2 = c^2

One detail must be checked: the middle shape really is a square. Each of its corners sits between the two acute angles of two triangles on a straight edge. The angles of a triangle add up to 180° and one of them is 90°, so the two acute angles add up to 90°. That leaves exactly 180°−90°=90°180° - 90° = 90° for each corner of the middle shape [1].

Into three dimensions

Apply the theorem twice to find the diagonal of a box with edges aa, bb and hh.

First, the diagonal of the floor: a2+b2\sqrt{a^2 + b^2}. That diagonal and the height hh form a new right triangle, so:

d=(a2+b2)2+h2=a2+b2+h2d = \sqrt{\left(\sqrt{a^2 + b^2}\right)^2 + h^2} = \sqrt{a^2 + b^2 + h^2}

Example. A box measuring 3 by 4 by 12 has a diagonal of 9+16+144=169=13\sqrt{9 + 16 + 144} = \sqrt{169} = 13.

Only for right triangles

The rule needs the right angle. In an equilateral triangle with all sides 1, 12+12=21^2 + 1^2 = 2, but 12=11^2 = 1. The equation fails, because no angle is 90°.

Sources

  1. [1]
    Pythagorean theorem (external site)

    Encyclopaedia Britannica · link checked November 25, 2026

  2. [2]
    Euclid's Elements, Book I, Proposition 47 (external site)

    David E. Joyce, Clark University · link checked November 25, 2026