The Pythagorean Theorem: Formula, Proof, and Examples
The Pythagorean theorem relates the three sides of a right triangle. Learn the formula, see a short proof using area, find missing sides, test whether a triangle is right, and use it to find distances.
What you'll learn
- What the Pythagorean theorem says and which triangles it applies to
- Why it's true, through a short proof that uses only area
- How to find a missing hypotenuse or a missing leg
- How to use the converse to test whether a triangle is a right triangle
- How the theorem gives the distance between two points
Introduction
The Pythagorean theorem says that in any right triangle, the squares of the two shorter sides add up to the square of the longest side: . If you know any two sides of a right triangle, it lets you find the third.
Why this matters
The theorem turns up anywhere you need a distance you can't measure directly. Builders use it to check that a corner is square: if one wall is marked at 3 feet and the other at 4 feet, the diagonal between the marks should be exactly 5 feet. It's how you find how high a ladder reaches, the diagonal size of a screen, or the straight-line distance between two points on a map. In coordinate geometry it becomes the distance formula, and in trigonometry it becomes the identity .
The concept
Right triangles and their sides
Definition — Right triangle, legs, and hypotenuse
A right triangle is a triangle with one angle, called the right angle. The two sides that form the right angle are the legs. The side across from the right angle is the hypotenuse. It's always the longest side.
Theorem — The Pythagorean theorem
In a right triangle with legs of length and and hypotenuse of length :
The theorem applies only to right triangles. For any other triangle, and are not equal.
Why it's true
There are hundreds of known proofs. This one uses nothing but the area of squares and triangles.
Proof
Start with a right triangle with legs and and hypotenuse . Make four identical copies of it.
Draw a large square with side length . Place one triangle in each corner of the large square, rotating each one so its legs run along the edges of the square. Every edge of the large square is then made of one leg of length and one leg of length .
The four hypotenuses form a tilted square in the middle with side length . Its corners are right angles, because at each point where two triangles meet on an edge, the two acute angles of the triangle and the corner of the tilted square together form a straight line, and the two acute angles of a right triangle add up to .
Now compute the area of the large square in two ways. Directly, it's . Piece by piece, it's four triangles, each with area , plus the tilted square with area . Setting these equal:
Expand the left side and simplify the right side:
Subtract from both sides to get .
Note — Older than Pythagoras
The theorem is named after the Greek mathematician Pythagoras, who lived around 570 to 495 BCE. However, Babylonian mathematicians were already working with these relationships more than a thousand years earlier. A clay tablet known as Plimpton 322, from around 1800 BCE, lists values connected to sets of whole-number right-triangle sides.
The converse: testing for a right angle
The theorem also works in reverse.
Theorem — Converse of the Pythagorean theorem
If the side lengths of a triangle satisfy , where is the longest side, then the triangle is a right triangle.
This is exactly what the builder's 3-4-5 check relies on: , so a triangle with those sides must contain a right angle.
Pythagorean triples
Sets of three whole numbers that satisfy the theorem are called Pythagorean triples. The most common ones are worth recognizing on sight:
| Triple | Check |
|---|---|
| 3, 4, 5 | |
| 5, 12, 13 | |
| 8, 15, 17 | |
| 7, 24, 25 |
Any multiple of a triple is also a triple. For example, 6, 8, 10 is 3, 4, 5 doubled.
Worked examples
Example — Worked example 1: finding the hypotenuse
Problem: A right triangle has legs of 6 and 8. Find the hypotenuse.
Step 1: Substitute the legs into equation (1): .
Step 2: , so .
Step 3: Take the positive square root, since lengths are positive: .
Answer:
Example — Worked example 2: finding a leg
Problem: A right triangle has a hypotenuse of 13 and one leg of 5. Find the other leg.
Step 1: The unknown is a leg, so it's or , not : .
Step 2: . Subtract 25 from both sides to get .
Step 3: .
Answer:
Example — Worked example 3: an answer that isn't a whole number
Problem: A 15-foot ladder leans against a wall with its base 4 feet from the wall. How high up the wall does it reach?
Step 1: The ladder is the hypotenuse, because it's opposite the right angle between the wall and the ground. The distance along the ground is one leg, and the height is the other: .
Step 2: , so .
Step 3: .
Answer: About 14.46 feet. Most real problems don't come out to a perfect square. Leave the answer as for an exact value, or round it for a measurement.
Example — Worked example 4: is it a right triangle?
Problem: Is a triangle with sides 6, 9, and 11 a right triangle?
Step 1: The longest side is 11, so it would have to be the hypotenuse.
Step 2: Compare with : , but .
Answer: , so by the converse, it is not a right triangle.
Distance between two points
To find the distance between two points on a coordinate grid, draw the right triangle whose legs are the horizontal and vertical gaps between them. The distance is the hypotenuse.
Example — Worked example 5: distance on a grid
Problem: Find the distance between and .
Step 1: The horizontal leg is and the vertical leg is .
Step 2: .
Answer: The distance is 10. Written in general form, this is the distance formula:
Common mistakes
Warning — Using it on a triangle that isn't a right triangle
is only true for right triangles. Before using it, confirm there's a right angle, either from a marked square corner on the diagram or from the problem statement.
Warning — Adding when you should subtract
When the missing side is a leg, subtract: . In worked example 2, adding would give . That's longer than the hypotenuse, which is impossible, since the hypotenuse is always the longest side.
Warning — Taking the square root of each term separately
is not . For example, , not . Add the squares first, then take one square root of the total.
Practice questions
-
A right triangle has legs of 9 and 12. Find the hypotenuse.
Show answer
- , and . This is the 3-4-5 triple multiplied by 3.
-
A right triangle has a hypotenuse of 26 and one leg of 10. Find the other leg.
Show answer
- , and . This is the 5-12-13 triple doubled.
-
Is a triangle with sides 10, 15, and 18 a right triangle?
Show answer
No. , but . They're very close, but not equal, so the triangle has no right angle.
-
A screen is 16 inches wide and 9 inches tall. To the nearest hundredth of an inch, how long is its diagonal?
Show answer
About 18.36 inches. .
-
Find the distance between and .
Show answer
- The horizontal leg is and the vertical leg is . Squaring removes the negative sign: .
Summary
- In a right triangle, , where is the hypotenuse, the side opposite the right angle.
- To find the hypotenuse, add the squares of the legs and take the square root. To find a leg, subtract.
- The converse lets you test for a right angle: if , the triangle is right.
- The distance between two points is the hypotenuse of the right triangle formed by their horizontal and vertical gaps.
For more practice, work through the Pythagorean theorem lesson in the Geometry curriculum, or see another proof in the Grade 8 proving the Pythagorean theorem lesson.