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.
In a right triangle with legs a and b and hypotenuse c, a squared plus b squared equals c squared.
Updated
Concept map
9 ideas, in the order to learn them. Click one and Zidna draws and narrates an animated lesson on it.
Right Triangles and the Pythagorean Theorem
What the theorem says, why it is true, and how to use it: finding missing sides, testing for right angles, triples and distance.
Parts of a Right Triangle
The legs form the right angle; the hypotenuse is across from it and longest.Generate lesson2Squares and Square Roots
Squaring a side gives the area of a square on it; a square root undoes it.Generate lesson3The Pythagorean Theorem
In any right triangle, a² + b² = c², where c is the hypotenuse.Builds on Parts of a Right Triangle, Squares and Square RootsGenerate lesson4Proof by Rearrangement
Four copies of the triangle in one square show why a² + b² = c².Builds on The Pythagorean TheoremGenerate lesson5Finding a Missing Side
Using a² + b² = c² to find any side of a right triangle from the other two.Builds on The Pythagorean TheoremGenerate lesson6Converse of the Pythagorean Theorem
If a triangle's sides fit a² + b² = c², the angle across from c is a right angle.Builds on The Pythagorean TheoremGenerate lesson7Pythagorean Triples
Whole numbers a, b, c with a² + b² = c², like 3, 4, 5 and 5, 12, 13.Builds on The Pythagorean TheoremGenerate lesson8The Distance Formula
A formula that finds the distance between two points as a right triangle's hypotenuse.Builds on Finding a Missing SideGenerate lesson9The Diagonal of a Box
The longest straight line inside a box, found by using the theorem twice.Builds on Finding a Missing SideGenerate lessonKey ideas
- 01
The Pythagorean theorem: in a right triangle with legs a and b and hypotenuse c, a² + b² = c².
- 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.
- 03
The hypotenuse is the side across from the right angle, and it is always the longest side of a right triangle.
- 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.
- 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°.
- 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².
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 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.
The hypotenuse c equals the square root of a squared plus b squared.
- 1Square each leg. For legs 9 and 12: 9² = 81 and 12² = 144.
- 2Add the squares: 81 + 144 = 225.
- 3Take the square root of the sum: c = √225 = 15.
- 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.
| You know | You want | Formula |
|---|---|---|
| both legs, a and b | the hypotenuse, c | c = √(a² + b²) |
| the hypotenuse c and leg b | leg a | a = √(c² − b²) |
| the hypotenuse c and leg a | leg b | b = √(c² − a²) |
- 1Square the hypotenuse and the known leg. For hypotenuse 15 and leg 9: 15² = 225 and 9² = 81.
- 2Subtract the leg's square from the hypotenuse's square: 225 − 81 = 144.
- 3Take the square root: a = √144 = 12.
- 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.
| Triple | Check | Multiples |
|---|---|---|
| 3, 4, 5 | 9 + 16 = 25 | 6, 8, 10 and 9, 12, 15 |
| 5, 12, 13 | 25 + 144 = 169 | 10, 24, 26 |
| 8, 15, 17 | 64 + 225 = 289 | 16, 30, 34 |
| 7, 24, 25 | 49 + 576 = 625 | 14, 48, 50 |
| 20, 21, 29 | 400 + 441 = 841 | 40, 42, 58 |
| 9, 40, 41 | 81 + 1600 = 1681 | 18, 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 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.
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:
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.
- 1Call the longest side c and the other two a and b.
- 2Work out a² + b² and c².
- 3Compare them. Equal: the triangle is right. a² + b² larger: acute. a² + b² smaller: obtuse.
| Sides | a² + b² | c² | Triangle |
|---|---|---|---|
| 5, 12, 13 | 25 + 144 = 169 | 169 | right |
| 6, 7, 9 | 36 + 49 = 85 | 81 | acute, since 85 > 81 |
| 4, 5, 7 | 16 + 25 = 41 | 49 | obtuse, 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.
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?
- 1Put the legs into a² + b² = c²: 8² + 15² = c².
- 2Square: 64 + 225 = c².
- 3Add: c² = 289.
- 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?
- 1The hypotenuse is known, so subtract: b² = 25² − 7².
- 2Square: b² = 625 − 49.
- 3Subtract: b² = 576.
- 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.
- 1Square and add: 4² + 8² = 16 + 64 = 80.
- 2So c = √80.
- 3Simplify: 80 = 16 × 5, so √80 = √16 × √5 = 4√5.
- 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?
- 1The ladder is across from the right angle between the wall and the ground, so it is the hypotenuse: c = 13.
- 2The distance along the ground is one leg, 5, and the height h is the other.
- 3Subtract: h² = 13² − 5² = 169 − 25 = 144.
- 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?
- 1The longest side is 10, so c = 10, with a = 6 and b = 8.
- 2Add the squares of the shorter sides: 6² + 8² = 36 + 64 = 100.
- 3Square the longest side: 10² = 100.
- 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).
- 1Find the differences: −4 − 2 = −6 across and 3 − (−1) = 4 up.
- 2Square them: (−6)² = 36 and 4² = 16.
- 3Add and take the square root: d = √(36 + 16) = √52.
- 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?
- 1Across the base: the diagonal of the 3-by-4 base is √(3² + 4²) = √25 = 5.
- 2Up through the box: that base diagonal and the height, 12, are the legs of a second right triangle.
- 3Its hypotenuse is √(5² + 12²) = √(25 + 144) = √169 = 13.
- 4The same thing in one step: √(3² + 4² + 12²) = √(9 + 16 + 144) = √169 = 13.
Answer: The diagonal is 13 units long.
Check yourself
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.A right triangle has legs 12 and 16. How long is the hypotenuse?Show answer
20, because 144 + 256 = 400 and √400 = 20.
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.A right triangle has legs 1 and 1. How long is the hypotenuse?Show answer
√2 ≈ 1.414, because 1 + 1 = 2.
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.Is a triangle with sides 11, 60 and 61 a right triangle?Show answer
Yes: 121 + 3600 = 3721, which is 61².
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.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.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
Keep going
All math topicsTrigonometry
The unit circle, explained visually
The unit circle is the circle of radius 1 centered at the origin. For any angle θ, measured counterclockwise from the positive x-axis, the point where the angle meets the circle is (cos θ, sin θ): cosine is the x-coordinate and sine is the y-coordinate. At 30°, the point is (√3/2, 1/2).
Algebra
How to find the slope of a line
To find the slope of a line, take two points on it and divide the change in y (the rise) by the change in x (the run): slope = (y₂ − y₁) ÷ (x₂ − x₁). For (1, 1) and (5, 4), the slope is (4 − 1) ÷ (5 − 1) = 3/4. If the equation is written as y = mx + b, the slope is m.
Linear Algebra
The dot product, explained visually
The dot product of vectors a and b is a number: multiply matching components and add, so (1, 4) · (4, 3) = 1 × 4 + 4 × 3 = 16. It also equals |a||b| cos θ, the length of a's shadow on b times the length of b. It is positive when the angle θ between them is acute, zero when it is 90° and negative when it is obtuse.