The Pythagorean theorem says that in a right triangle, the square of the hypotenuse (the longest side, opposite the right angle) equals the sum of the squares of the other two sides. As an equation, a2 + b2 = c2. It lets you find any side of a right triangle when you know the other two.
That one sentence packs in three ideas: a right triangle, the squares of its sides, and a sum. The rest of this page unpacks each one, shows what the theorem looks like when you draw it, and explains why it fails for every other kind of triangle.
Pythagorean theorem definition
In plain English
A right triangle is a triangle with one square corner, an angle of exactly 90°. The two sides that meet at that corner are called the legs. The third side, the one across from the square corner, is the hypotenuse. It is always the longest of the three.
To square a number means to multiply it by itself: 32 = 3 × 3 = 9. The theorem tells you what happens when you square all three sides of a right triangle:
In wordsLeg squared plus leg squared equals hypotenuse squared.
Take the classic right triangle with sides 3, 4 and 5. Square the legs: 32 = 9 and 42 = 16. Add them: 9 + 16 = 25. Square the hypotenuse: 52 = 25. The two results match, and they always will for a right triangle, whatever its size or shape.
The useful consequence is that the three sides are locked together. Once you know any two of them, the third has only one possible value, and the theorem tells you what it is. That is why it is the first tool you reach for whenever a right triangle has a missing side.
Euclid's version: a statement about areas
The oldest proof that survives in Greek is in Euclid's Elements, written in about 300 BCE. Book I, Proposition 47 states the theorem like this:
In right-angled triangles the square on the side subtending the right angle is equal to the squares on the sides containing the right angle.
— Euclid, Elements I.47 (translated by T. L. Heath)
"Subtending" means "stretching across from": the side subtending the right angle is the hypotenuse. "The square on a side" means an actual square drawn with that side as one of its edges. So Euclid's statement is about areas: the area of the big square on the hypotenuse equals the two smaller areas added together.
The modern version: a statement about lengths
Today we write the same fact with letters standing for lengths:
Pythagorean theorem. If a triangle has sides of length a, b and c, and the angle between sides a and b is a right angle, then
a2 + b2 = c2Squaring a length gives an area, so the two versions say the same thing. If a leg is 3 cm long, the square drawn on it has an area of 32 = 9 square centimeters. The letters are a convention: c always names the hypotenuse, and a and b name the legs in either order. The Pythagorean theorem formula page shows how to rearrange the equation to find a, b or c.
It is called a theorem because it is a statement that has been proved, step by step, from more basic facts of geometry. It does not rely on measuring lots of triangles and noticing a pattern; it is guaranteed for every right triangle on a flat surface. Hundreds of different proofs of the Pythagorean theorem are known.
What it means: squares on the sides
The clearest way to see the theorem is to draw a square on each side of a 3-4-5 triangle and split each square into unit tiles. The square on the leg of length 3 holds 3 × 3 = 9 tiles, the square on the leg of length 4 holds 4 × 4 = 16, and the square on the hypotenuse holds 5 × 5 = 25.
Watch where the tiles go. The 16 orange tiles form a 4 × 4 block. The 9 blue tiles cannot stay in their 3 × 3 shape, but broken up they fill the L-shaped strip around the block, making a complete 5 × 5 square with no gaps and no overlaps. That square is exactly the size of the square on the hypotenuse.
Tiles only work when the sides are whole numbers. The theorem itself does not need them. Draw a right triangle with both legs equal to 1: the two small squares have area 1 each, so the square on the hypotenuse has area 2, and the hypotenuse is √2 ≈ 1.414. No arrangement of whole tiles can show that, yet the areas still match exactly. (That length, √2, turns out to be a number that can never be written as a fraction.)
A picture is not a proofCounting tiles checks the theorem for one triangle. A proof has to work for every right triangle at once. The rearrangement proof is the most visual: four copies of the triangle are arranged inside a square in two different ways, and the space left over is c2 in one arrangement and a2 + b2 in the other.
Why it only works for right triangles
The right angle is not a detail; the theorem depends on it. To see why, keep two sides fixed at 3 and 4 and change only the angle between them. The third side changes length, and so does its square.
At 60° the third side is about 3.61, and its square is 13, well short of 25. At 120° it is about 6.08, and its square is 37. Only the right angle gives exactly 25. In general, a triangle whose largest angle is acute has c2 < a2 + b2, and one whose largest angle is obtuse has c2 > a2 + b2, a fact you can use to classify a triangle as acute, right or obtuse from its sides alone.
For triangles without a right angle, the law of cosines, c2 = a2 + b2 − 2abcosC, takes over. Its last term is a correction for the angle. When C = 90°, cosC = 0, the correction vanishes, and you are back to the Pythagorean theorem. So the theorem is the special right-angle case of a more general rule.
The converse: testing for a right angle
The theorem also works in reverse. Its converse says that if the sides of a triangle satisfy a2 + b2 = c2, with c the longest side, then the triangle must have a right angle opposite c. For example, 5, 12 and 13 pass the test because 25 + 144 = 169 = 132, so a triangle with those sides is a right triangle, even if nobody measured its angles. Builders use exactly this idea when they mark 3, 4 and 5 units along two walls to check that a corner is square.
Who is it named after?
The theorem is named after Pythagoras, a Greek thinker born on the island of Samos around 570 BCE, who later led a community of followers in southern Italy. None of his own writings survive, and historians do not know whether he or his followers actually proved the theorem; the stories that credit him were written centuries after his death. Read more about who Pythagoras was.
What is certain is that the relationship was known long before him. A Babylonian clay tablet from about 1800 BCE, Plimpton 322, lists pairs of numbers belonging to whole-number right triangles. Indian geometry manuals called the Śulba Sūtras state the rule for the diagonal of a rectangle, and in China it has long been called the Gougu theorem, after the traditional names for the two legs. The full story is in the history of the Pythagorean theorem.
What is the Pythagorean theorem used for?
Any time two directions meet at a right angle, the theorem turns two known distances into a third one you could not measure directly. A few everyday cases:
- Building and DIY: checking that corners are square, sizing roof rafters and stair stringers.
- Screens: a TV's advertised size is its diagonal, worked out from the width and height.
- Maps and navigation: the straight-line distance between two places from how far apart they are east–west and north–south.
- Coordinates and computing: the distance formula between two points, which games and apps use constantly, is the theorem written with coordinates.
- Science: combining two forces or speeds that act at right angles into a single result.
Each of these has its own page in the real-life uses of the Pythagorean theorem section.
Two quick examples
Here is the theorem doing both of its jobs: finding a hypotenuse, and finding a leg.
Example 1: the shortcut across a park
A rectangular park is 80 m long and 60 m wide. How long is the diagonal path from one corner to the opposite corner?
The two edges meet at a right angle, so they are the legs and the path is the hypotenuse.
c2= 802 + 602 = 6400 + 3600 = 10 000c= √10 000 = 100The path is 100 m long. Walking around the edge would take 80 + 60 = 140 m, so the shortcut saves 40 m.
Example 2: how high a ladder reaches
A 13-foot ladder leans against a wall with its foot 5 feet from the wall. How high up the wall does it reach?
The wall and the ground form the right angle. The ladder is across from it, so the ladder is the hypotenuse, and the height is a leg. To find a leg, subtract.
a2= 132 − 52 = 169 − 25 = 144a= √144 = 12The ladder reaches 12 feet up the wall.
For the full method, including how to decide whether to add or subtract, follow how to do the Pythagorean theorem step by step. For more practice, the Pythagorean theorem calculator shows the working for any two sides you type in.
Common misconceptions
- "It works for any triangle." It works only when one angle is exactly 90°. As the 60° and 120° triangles above show, any other angle breaks the equation.
- "The hypotenuse is the side at the bottom." The hypotenuse is the side opposite the right angle, wherever the triangle is turned. It is not always labeled c in a textbook problem, so find the right angle first.
- "The sides themselves add up: a + b = c." Lengths do not add; squares do. In the 3-4-5 triangle, 3 + 4 = 7, not 5. The hypotenuse is always shorter than the two legs put together, because a straight line is the shortest route.
- "Once you have a2 + b2, you are done." That sum is c2, the area of the square, not the length of the side. You still have to take the square root.
- "It is only about whole numbers." Whole-number examples such as 3-4-5 are special and are called Pythagorean triples. Most right triangles have at least one side that is not a whole number, like the √2 hypotenuse above.
These and other slips, each with a wrong-versus-right example, are collected on the common mistakes page.
Frequently asked questions
What is the Pythagorean theorem in simple terms?
In a right triangle, if you square the two shorter sides and add the results, you get the square of the longest side. For a triangle with sides 6, 8 and 10: 36 + 64 = 100 = 102. It is the rule that connects the three sides of every right triangle.
Why is it called a theorem and not just a formula?
A theorem is a statement that has been proved from more basic facts, so it is guaranteed to be true, not just observed. a2 + b2 = c2 is the formula that expresses it. People have found hundreds of different proofs; Elisha Scott Loomis's 1940 book The Pythagorean Proposition collects 367 of them.
Does the Pythagorean theorem work for all triangles?
No. It only holds when one angle is exactly 90°. For other triangles the third side is shorter or longer than the theorem predicts, and you need the law of cosines instead. You can, however, use the theorem on any triangle that you split into right triangles, for example by drawing a height.
What grade do you learn the Pythagorean theorem?
In the United States the Common Core standards place it in grade 8: students explain a proof, use it to find missing sides in two and three dimensions, and use it to find distances on a coordinate grid. It comes back in high school geometry and trigonometry. The 8th-grade standards page lists the details.
Is the hypotenuse always called c?
By convention, yes: c is the hypotenuse and a and b are the legs, with the right angle at the corner named C. Problems often use other letters, though, so always identify the side opposite the right angle and treat it as c, whatever it is called.
Does the theorem work in three dimensions or on a curved surface?
In three dimensions it extends naturally: the diagonal of a box is √ℓ2 + w2 + h2, found by using the theorem twice (see the theorem in 3D). On a curved surface such as a globe it does not hold exactly; a spherical version replaces it, and it only becomes a2 + b2 = c2 for small triangles.
Sources and further reading
- Euclid, Elements, Book I, Proposition 47, in D. E. Joyce's online edition: Proposition I.47.
- T. L. Heath, The Thirteen Books of Euclid's Elements, Cambridge University Press (2nd ed., 1926).
- MacTutor History of Mathematics: Pythagoras of Samos.
- Elisha Scott Loomis, The Pythagorean Proposition, 2nd ed. (1940).
Keep exploring
- LearnThe Pythagorean Theorem FormulaThe Pythagorean theorem formula a² + b² = c²: what each letter means, the algebra to solve for any side, units, coordinate and 3D forms, and worked examples.
- LearnHow to Do the Pythagorean Theorem, Step by StepHow to do the Pythagorean theorem in 8 steps: label the sides, add or subtract the squares, take the square root and check. Flowchart and worked examples.
- LearnRight Triangle: Parts, Legs and HypotenuseWhat a right triangle is, the names of its parts, how to spot the hypotenuse in any position, why it is always the longest side, and area and perimeter.
- ProofsProofs of the Pythagorean TheoremProofs of the Pythagorean theorem: an animated proof, how a proof differs from checking examples, all 12 proofs on this site by type, and where to start.
- LearnConverse of the Pythagorean TheoremThe converse of the Pythagorean theorem explained: the statement, a clear proof, how to test any three side lengths, and many yes-or-no worked examples.
- Real-life usesWhat Is the Pythagorean Theorem Used For?What is the Pythagorean theorem used for? 17 real-life uses in building, screens, navigation, GPS, games, physics and sports, each with a worked calculation.