The Pythagorean theorem, explained visually

The Pythagorean theorem says that in a right triangle, the square of the hypotenuse (the side across from the right angle) equals the sum of the squares of the other two sides: a² + b² = c². For legs 3 and 4, the hypotenuse is 5, because 9 + 16 = 25.

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

In a right triangle with legs a and b and hypotenuse c, a squared plus b squared equals c squared.

Updated

A right triangle with legs 3 and 4 and hypotenuse 5. A 3-by-3 square of 9 unit cells is built on the short leg, a 4-by-4 square of 16 cells on the long leg, and a tilted 5-by-5 square of 25 cells on the hypotenuse.
A right triangle with legs 3 and 4. The squares on the legs hold 9 and 16 unit squares; the square on the hypotenuse holds 25, exactly 9 + 16.

Concept map

9 ideas, in the order to learn them. Click one and Zidna draws and narrates an animated lesson on it.

Key ideas

  1. 01

    The Pythagorean theorem: in a right triangle with legs a and b and hypotenuse c, a² + b² = c².

  2. 02

    The Pythagorean theorem is about areas. The squares built on the two legs together cover exactly as much as the square built on the hypotenuse: for a 3-4-5 triangle, 9 + 16 = 25.

  3. 03

    The hypotenuse is the side across from the right angle, and it is always the longest side of a right triangle.

  4. 04

    To find the hypotenuse of a right triangle, add the squares of the legs and take the square root. To find a leg, subtract the other leg's square from the hypotenuse's square and take the square root.

  5. 05

    The Pythagorean theorem holds only in right triangles, and it runs both ways: if a triangle's sides fit a² + b² = c², the angle across from c is exactly 90°.

  6. 06

    The distance formula is the Pythagorean theorem on a coordinate grid: the horizontal and vertical gaps between two points are the legs, and the distance is the hypotenuse.

What does the Pythagorean theorem say?

The Pythagorean theorem says that in every right triangle, the square on the hypotenuse has the same area as the squares on the two legs put together. With letters: a² + b² = c², where a and b are the legs and c is the hypotenuse.

  • Right angle: the 90° corner, marked with a small square.
  • Legs, a and b: the two sides that form the right angle. Either one can be called a.
  • Hypotenuse, c: the side across from the right angle. It is always the longest side.

The squares are real squares. Build one on each side of a right triangle with legs 3 and 4: the squares on the legs hold 9 and 16 unit squares, and the square on the hypotenuse holds 25, exactly 9 + 16. So the hypotenuse is √25 = 5.

Lengths do not add up: 3 + 4 is 7, not 5. Areas do: 9 + 16 = 25.

Why is the Pythagorean theorem true?

The Pythagorean theorem is true because one square can be filled in two ways. Take a square with sides a + b and place four copies of the right triangle inside it. Arranged one way, the triangles leave a tilted square of area c² uncovered. Arranged another way, they leave two squares, of areas a² and b². The big square and the four triangles are the same both times, so the uncovered areas are equal: a² + b² = c².

Two equal squares side by side, each with sides a plus b. In the left square, four right triangles sit in the corners around a tilted square labeled c squared. In the right square, the same four triangles form two rectangles, leaving a small square labeled a squared and a larger square labeled b squared.
Two squares with sides a + b, each holding the same four right triangles. What is left uncovered is c² on the left and a² + b² on the right.

The middle shape on the left really is a square. Its four sides are all c, and each of its corners is 90°, because the triangles' two acute angles beside it add up to 90° and the three angles along the straight edge make 180°.

The same argument in algebra: the big square's area is (a + b)², and it is made of the c² square plus four triangles of area ½ab each.

(a+b)2=c2+4⋅12aba2+2ab+b2=c2+2aba2+b2=c2\begin{aligned} (a + b)^2 &= c^2 + 4 \cdot \tfrac{1}{2}ab \\ a^2 + 2ab + b^2 &= c^2 + 2ab \\ a^2 + b^2 &= c^2 \end{aligned}

a plus b, squared, equals c squared plus four triangles of one half a b. Expanding gives a squared plus 2ab plus b squared equals c squared plus 2ab, and taking 2ab from both sides leaves a squared plus b squared equals c squared.

The Pythagorean theorem may have more known proofs than any other theorem: the 1940 edition of Elisha Loomis's book The Pythagorean Proposition collects 370. The oldest surviving axiomatic proof, built step by step from stated assumptions, is Proposition 47 in Book I of Euclid's Elements, written around 300 BCE.

How do you find the hypotenuse?

To find the hypotenuse of a right triangle, square the two legs, add the squares, and take the square root of the sum.

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

The hypotenuse c equals the square root of a squared plus b squared.

  1. 1Square each leg. For legs 9 and 12: 9² = 81 and 12² = 144.
  2. 2Add the squares: 81 + 144 = 225.
  3. 3Take the square root of the sum: c = √225 = 15.
  4. 4Check that the hypotenuse is the longest side: 15 is longer than 9 and 12.

How do you find a missing side of a right triangle?

To find a missing side of a right triangle, first decide whether it is the hypotenuse or a leg. For the hypotenuse, add the squares of the legs. For a leg, square the hypotenuse, subtract the square of the known leg, and take the square root.

Which formula to use for each missing side
You knowYou wantFormula
both legs, a and bthe hypotenuse, cc = √(a² + b²)
the hypotenuse c and leg bleg aa = √(c² − b²)
the hypotenuse c and leg aleg bb = √(c² − a²)
  1. 1Square the hypotenuse and the known leg. For hypotenuse 15 and leg 9: 15² = 225 and 9² = 81.
  2. 2Subtract the leg's square from the hypotenuse's square: 225 − 81 = 144.
  3. 3Take the square root: a = √144 = 12.
  4. 4Check that the leg is shorter than the hypotenuse: 12 is less than 15.

When the hypotenuse is one of the sides you know, subtract. A negative number under the square root means the hypotenuse went in the wrong place.

What are Pythagorean triples?

A Pythagorean triple is three whole numbers a, b and c with a² + b² = c², so they can be the sides of a right triangle. The smallest and best known is 3, 4, 5.

Common Pythagorean triples
TripleCheckMultiples
3, 4, 59 + 16 = 256, 8, 10 and 9, 12, 15
5, 12, 1325 + 144 = 16910, 24, 26
8, 15, 1764 + 225 = 28916, 30, 34
7, 24, 2549 + 576 = 62514, 48, 50
20, 21, 29400 + 441 = 84140, 42, 58
9, 40, 4181 + 1600 = 168118, 80, 82

Multiplying all three numbers of a triple by the same whole number gives another triple, because every square grows by the same factor: 6, 8, 10 is 3, 4, 5 doubled. Triples with no common factor, like the six in the first column, are called primitive.

Euclid's formula makes a triple from any two positive whole numbers m and n with m greater than n:

a=m2−n2,b=2mn,c=m2+n2a = m^2 - n^2, \qquad b = 2mn, \qquad c = m^2 + n^2

a equals m squared minus n squared, b equals 2 m n, and c equals m squared plus n squared.

With m = 2 and n = 1 it gives 3, 4, 5. With m = 3 and n = 2 it gives 5, 12, 13.

Does the Pythagorean theorem work for all triangles?

No. The Pythagorean theorem works only for right triangles: a² + b² = c² is true exactly when the angle between sides a and b is 90°. Keep two sides at 3 and 4 and change the angle between them, and the third side changes with it.

Three triangles stacked one above another, each with sides 3 and 4 meeting at a marked angle. At 60° the third side is the square root of 13, about 3.61, and the triangle is acute. At 90° it is exactly 5, a right triangle. At 120° it is the square root of 37, about 6.08, and the triangle is obtuse.
Sides 3 and 4 with 60°, 90° and 120° between them. Only the 90° triangle has c² = 9 + 16 = 25.

For a triangle without a right angle, the law of cosines adds a correction that depends on the angle C between sides a and b:

c2=a2+b2−2abcos⁡Cc^2 = a^2 + b^2 - 2ab\cos C

c squared equals a squared plus b squared minus 2ab times the cosine of angle C.

At 90° the cosine is 0, the correction disappears, and the law of cosines becomes the Pythagorean theorem. At 60° it gives 9 + 16 − 12 = 13, and at 120° it gives 9 + 16 + 12 = 37, the values in the figure.

How do you know if a triangle is a right triangle?

To tell whether a triangle is a right triangle, square all three sides. If the squares of the two shorter sides add up to the square of the longest side, it is a right triangle, with the right angle across from the longest side. This is the converse of the Pythagorean theorem; Euclid proved it right after the theorem, as Proposition 48.

  1. 1Call the longest side c and the other two a and b.
  2. 2Work out a² + b² and c².
  3. 3Compare them. Equal: the triangle is right. a² + b² larger: acute. a² + b² smaller: obtuse.
Three triangles tested by their sides
Sidesa² + b²c²Triangle
5, 12, 1325 + 144 = 169169right
6, 7, 936 + 49 = 8581acute, since 85 > 81
4, 5, 716 + 25 = 4149obtuse, since 41 < 49

Builders square a corner this way: they mark 3 feet along one wall and 4 feet along the other, and if the marks are exactly 5 feet apart, the corner is a right angle.

How is the distance formula related to the Pythagorean theorem?

The distance formula is the Pythagorean theorem on a coordinate grid. The horizontal gap between two points is one leg, the vertical gap is the other, and the straight-line distance between the points is the hypotenuse.

A coordinate grid with the points (1, 2) and (9, 8) joined by a line segment. A horizontal leg of length 8 and a vertical leg of length 6 meet at a right angle at (9, 2), and the segment between the points, the hypotenuse, has length 10.
From (1, 2) to (9, 8) the legs are 8 and 6, so the distance is √(64 + 36) = √100 = 10.
d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

The distance d between the points (x1, y1) and (x2, y2) is the square root of the difference in x squared plus the difference in y squared.

The order of the points does not matter, because squaring turns a negative difference positive. The same rise and run give the slope of the line through the points, and the unit circle, x² + y² = 1, is every point at distance 1 from the origin.

In three dimensions, the square of the third difference goes under the root too. That is also how the length of a vector is measured, and the dot product of a vector with itself is its length squared.

What is the Pythagorean theorem used for in real life?

The Pythagorean theorem finds a straight-line distance you cannot measure directly from two distances at right angles that you can.

  • Building: framers check that a corner is square with a 3-4-5 triangle, or a larger multiple such as 6-8-10.
  • Screens: TV and monitor sizes are diagonals. A screen 48 inches wide and 27 inches tall measures √(48² + 27²) ≈ 55 inches from corner to corner.
  • Ladders and ramps: a ladder against a wall is a hypotenuse, so its length and its distance from the wall decide how high it reaches.
  • Navigation: walk 3 km east and then 4 km north, and you are 5 km from where you started, in a straight line.
  • Computer graphics and games: the distance between two points on a screen comes from the distance formula, the theorem on a grid.

Worked examples

Find the hypotenuse

A right triangle has legs 8 and 15. How long is the hypotenuse?

  1. 1Put the legs into a² + b² = c²: 8² + 15² = c².
  2. 2Square: 64 + 225 = c².
  3. 3Add: c² = 289.
  4. 4Take the square root: c = √289 = 17.

Answer: The hypotenuse is 17.

Find a missing leg

A right triangle has a hypotenuse of 25 and one leg of 7. How long is the other leg?

  1. 1The hypotenuse is known, so subtract: b² = 25² − 7².
  2. 2Square: b² = 625 − 49.
  3. 3Subtract: b² = 576.
  4. 4Take the square root: b = √576 = 24, which is shorter than 25, as a leg must be.

Answer: The other leg is 24.

When the answer is not a whole number

A right triangle has legs 4 and 8. Find the hypotenuse exactly, then to two decimal places.

  1. 1Square and add: 4² + 8² = 16 + 64 = 80.
  2. 2So c = √80.
  3. 3Simplify: 80 = 16 × 5, so √80 = √16 × √5 = 4√5.
  4. 4Round only at the end: 4√5 ≈ 8.94.

Answer: c = 4√5 ≈ 8.94.

A ladder against a wall

A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up the wall does it reach?

A ladder 13 feet long leaning against a vertical wall. Its foot is 5 feet from the wall along the ground, and the height h where it touches the wall is marked, with a right angle where the wall meets the ground.
The wall and the ground meet at a right angle, so the ladder is the hypotenuse.
  1. 1The ladder is across from the right angle between the wall and the ground, so it is the hypotenuse: c = 13.
  2. 2The distance along the ground is one leg, 5, and the height h is the other.
  3. 3Subtract: h² = 13² − 5² = 169 − 25 = 144.
  4. 4Take the square root: h = √144 = 12.

Answer: The ladder reaches 12 feet up the wall.

Is the corner square?

A builder marks 6 feet along one wall and 8 feet along the other, then measures 10 feet between the marks. Is the corner a right angle?

  1. 1The longest side is 10, so c = 10, with a = 6 and b = 8.
  2. 2Add the squares of the shorter sides: 6² + 8² = 36 + 64 = 100.
  3. 3Square the longest side: 10² = 100.
  4. 4They are equal, so by the converse of the Pythagorean theorem the angle between the walls is 90°.

Answer: Yes. The corner is a right angle.

Distance between two points

Find the distance between the points (2, −1) and (−4, 3).

  1. 1Find the differences: −4 − 2 = −6 across and 3 − (−1) = 4 up.
  2. 2Square them: (−6)² = 36 and 4² = 16.
  3. 3Add and take the square root: d = √(36 + 16) = √52.
  4. 4Simplify: √52 = √4 × √13 = 2√13 ≈ 7.21.

Answer: d = 2√13 ≈ 7.21.

The diagonal of a box

A box measures 3 by 4 by 12. How long is the diagonal from one bottom corner to the opposite top corner?

  1. 1Across the base: the diagonal of the 3-by-4 base is √(3² + 4²) = √25 = 5.
  2. 2Up through the box: that base diagonal and the height, 12, are the legs of a second right triangle.
  3. 3Its hypotenuse is √(5² + 12²) = √(25 + 144) = √169 = 13.
  4. 4The same thing in one step: √(3² + 4² + 12²) = √(9 + 16 + 144) = √169 = 13.

Answer: The diagonal is 13 units long.

Check yourself

  1. 1.Which side of a right triangle is the hypotenuse?Show answer

    The side across from the right angle. It is always the longest side.

  2. 2.A right triangle has legs 12 and 16. How long is the hypotenuse?Show answer

    20, because 144 + 256 = 400 and √400 = 20.

  3. 3.A right triangle has a hypotenuse of 26 and one leg of 10. How long is the other leg?Show answer

    24, because 676 − 100 = 576 and √576 = 24.

  4. 4.A right triangle has legs 1 and 1. How long is the hypotenuse?Show answer

    √2 ≈ 1.414, because 1 + 1 = 2.

  5. 5.A right triangle has a hypotenuse of 2 and one leg of 1. How long is the other leg?Show answer

    √3 ≈ 1.732, because 4 − 1 = 3.

  6. 6.Is a triangle with sides 11, 60 and 61 a right triangle?Show answer

    Yes: 121 + 3600 = 3721, which is 61².

  7. 7.Is a triangle with sides 5, 6 and 8 a right triangle?Show answer

    No: 25 + 36 = 61, but 8² = 64. Since 61 is less than 64, the triangle is obtuse.

  8. 8.What is the distance between the points (1, 2) and (4, 6)?Show answer

    5. The gaps are 3 and 4, and √(9 + 16) = √25 = 5.

  9. 9.A square has sides of 5 cm. How long is its diagonal?Show answer

    5√2 ≈ 7.07 cm, because 25 + 25 = 50 and √50 = 5√2.

Common mistakes

  • Treating the hypotenuse as a leg: for a hypotenuse of 13 and a leg of 5, writing 5² + 13² = c².c is always the side across from the right angle. When you know it, subtract: 13² − 5² = 144, so the missing leg is 12.
  • Stopping at c²: for legs 6 and 8, giving 100 as the hypotenuse.100 is c², the area of the square on the hypotenuse. Take the square root to get the length: c = √100 = 10.
  • Splitting the square root, as if √(a² + b²) were a + b, so that legs 3 and 4 give 7.A square root does not split over a sum. Add first, then take the root: √(9 + 16) = √25 = 5.
  • Using a² + b² = c² on a triangle that has no right angle.Check for the right angle first: marked, stated, or confirmed by the converse. For any other triangle, use the law of cosines.
  • Entering −6² on a calculator for (−6)² and getting −36 in the distance formula.A square is never negative. Most calculators square the 6 before applying the minus sign, so type the parentheses: (−6)² = 36.
  • Rounding too early, such as rounding √80 to 9 before the next step.Keep exact values like √80 = 4√5 until the last step, then round once: 4√5 ≈ 8.94.

Questions students ask

Why is the Pythagorean theorem a theorem and not a law?

A theorem is a statement proved by logic from basic assumptions, so it is certain wherever those assumptions hold. A scientific law is a pattern found by observation. The Pythagorean theorem has been proved in hundreds of ways for flat geometry, so it is a theorem. On a curved surface such as a globe, triangles do not obey it.

Why are the sides squared in the Pythagorean theorem?

Because the theorem is about areas. Squaring a side gives the area of the square built on it, and in a right triangle the two smaller areas add up to the largest: 9 + 16 = 25. The lengths themselves do not add up, since 3 + 4 is 7, not 5, so you square, add, and then take the square root to get back to a length.

Who discovered the Pythagorean theorem?

It is named after the Greek philosopher Pythagoras, who lived from about 570 to 495 BCE, but it was known long before him. Babylonian scribes were using it more than a thousand years earlier, and a Babylonian clay tablet from about 1800 BCE, Plimpton 322, records Pythagorean triples. In India, the Baudhayana Shulba Sutra, dated between the 8th and 5th centuries BCE, states the theorem. The oldest surviving axiomatic proof is in Euclid's Elements, written around 300 BCE.

Can you find the hypotenuse if you only know one side?

Not with the Pythagorean theorem alone, which needs two sides. If you also know one of the acute angles, trigonometry finishes the job: the hypotenuse is the side opposite that angle divided by the sine of the angle. In an isosceles right triangle, with angles of 45°, 45° and 90°, the hypotenuse is a leg times √2.

Does the Pythagorean theorem work in 3D?

Yes, by using it twice. The longest diagonal of a box with length l, width w and height h is √(l² + w² + h²): the diagonal across the base is one leg, and the height is the other. A 2 by 3 by 6 box has a diagonal of √(4 + 9 + 36) = √49 = 7.

How is the Pythagorean theorem used in trigonometry?

A point on the unit circle at angle θ is (cos θ, sin θ), so it makes a right triangle with legs cos θ and sin θ and a hypotenuse of 1. The Pythagorean theorem then gives sin²θ + cos²θ = 1, the Pythagorean identity, which holds for every angle.

What is Pythagorean Theorem Day?

It is an unofficial name for a date whose month, day and two-digit year form a Pythagorean triple, such as 3/4/05, 8/15/17 and 7/24/25. The most recent was October 24, 2026 (10/24/26), since 10² + 24² = 26². It was the last one this century; the next is March 4, 2105.

How do you pronounce Pythagorean?

pih-THAG-uh-REE-un, with the strongest stress on REE. Pythagoras, the name it comes from, is pih-THAG-uh-rus. Both are also said with "pye" in place of "pih" at the start.

Sources