Pythagorean theorem: formula, examples, and proof
If we know two sides of a right triangle, the Pythagorean theorem lets us find the third. The setup depends on which side is the hypotenuse, so we’ll identify that side before putting numbers into the formula. Then we’ll use the same relationship to check triangle types and see why the theorem works.
What is the Pythagorean theorem?
In a right triangle, the two sides that form the right angle are the legs. The side opposite the right angle is the hypotenuse, and it is the longest side. Calling the legs a and b and the hypotenuse c, the theorem says
The legs can be labeled in either order. The hypotenuse is the side that goes by itself on the right side of this formula, whatever letter the original diagram uses for it.
Example: Find a missing hypotenuse
Suppose a right triangle has legs of lengths 4 and 12. Since the missing side is the hypotenuse, its square equals the sum of the two leg squares.
We take the positive square root because c is a side length. The exact length is , or about 12.65.
Example: Find a missing leg
Suppose the hypotenuse is 16 and one leg is 10. Let x be the length of the missing leg.
The missing leg therefore has length , or about 12.49.
Using the theorem in a real situation
Suppose a 13-foot ladder reaches 12 feet up a vertical wall, with the ground perpendicular to the wall. The ladder is the hypotenuse. If x is the distance from the foot of the ladder to the wall, then , so and x = 5 feet.
The converse: Is the triangle a right triangle?
For three positive side lengths that form a triangle, call the longest side c. If , the triangle is right. That reverses the direction of the original theorem, so we call it the converse.
With lengths 5, 12, and 13, we get , so the triangle is right. More generally, compare the sum of the two shorter-side squares with the longest-side square:
| Comparison | Triangle type |
|---|---|
| a² + b² > c² | Acute |
| Right | |
| a² + b² < c² | Obtuse |
The lengths must first form a triangle: for positive lengths with c longest, a + b > c. For side lengths 5, 9, and 10, we get 25 + 81 > 100, so the triangle is acute. For 7, 9, and 12, we get 49 + 81 < 144, so the triangle is obtuse.
An area proof of the Pythagorean theorem
Arrange four congruent right triangles inside a square of side a + b. Each triangle has area , and their hypotenuses enclose a central square of side c. The central corners are right angles because the two acute angles of a right triangle add to 90°.
The area of the outer square equals the four triangle areas plus the central square area.
Subtracting 2ab from both sides leaves . The proof works for any positive leg lengths a and b, even though our illustration uses 3 and 4.
Pythagorean triples
A Pythagorean triple consists of three positive integers that satisfy the theorem. Examples include (3, 4, 5) and (5, 12, 13). Multiplying all three lengths by the same positive integer gives another triple; doubling (3, 4, 5) gives (6, 8, 10).
We can generate triples from positive integers m > n using
For m = 2 and n = 1, this gives 3, 4, and 5. Expanding the two leg squares shows why the construction works:
Some generated triples have a common factor, so this formula does not automatically give a primitive triple. The identity still guarantees a right triangle.