What the theorem says
A right triangle is a triangle with one angle exactly equal to 90 degrees. The two sides that meet at the right angle are called the legs, and the third side, opposite the right angle, is called the hypotenuse. The hypotenuse is always the longest of the three sides.
The Pythagorean theorem states: in a right triangle with legs of length a and b and a hypotenuse of length c, a^2 + b^2 = c^2. Take the two legs, square each one, add them up, and the result equals the square of the hypotenuse. Equivalently, c = sqrt(a^2 + b^2), so you can find the hypotenuse directly by squaring the legs, summing them, and taking the square root.
Crucially, the theorem only applies to right triangles. If the triangle is acute (all angles less than 90 degrees) or obtuse (one angle greater than 90), the relationship breaks down, and you would need the more general law of cosines.
Why it is true: a quick proof
There are over 350 known proofs of the Pythagorean theorem. One of the simplest is purely visual. Take four copies of a right triangle with legs a and b and hypotenuse c. Arrange them inside a large square whose side has length (a + b), with the right angles in the corners and the hypotenuses forming an inner tilted square.
The area of the big outer square is (a + b)^2. The area of the four triangles together is 4 * (1/2 * a * b) = 2ab. The remaining area inside the big square is the tilted inner square whose side is the hypotenuse c, so its area is c^2.
Setting outer area equal to triangles plus inner square: (a + b)^2 = 2ab + c^2. Expanding the left side: a^2 + 2ab + b^2 = 2ab + c^2. The 2ab terms cancel, leaving a^2 + b^2 = c^2. This is the theorem.
Other proofs use similar triangles, algebra, or even calculus. The fact that the theorem has so many independent proofs is part of why it is considered one of the most fundamental results in geometry.
Worked examples
Example 1. A right triangle has legs of 3 and 4. Find the hypotenuse.
c = sqrt(3^2 + 4^2) = sqrt(9 + 16) = sqrt(25) = 5. The hypotenuse is exactly 5. This is the famous 3-4-5 triangle, the smallest right triangle whose three sides are all whole numbers.
Example 2. A right triangle has a hypotenuse of 13 and one leg of 5. Find the other leg.
Rearrange the formula to solve for the missing leg: a = sqrt(c^2 - b^2) = sqrt(169 - 25) = sqrt(144) = 12. The other leg is 12, giving you a 5-12-13 right triangle, another Pythagorean triple.
Example 3. Find the diagonal of a rectangle with sides 6 and 8.
The diagonal is the hypotenuse of the right triangle formed by the two sides: d = sqrt(6^2 + 8^2) = sqrt(36 + 64) = sqrt(100) = 10. This is a useful trick: any rectangle's diagonal can be found this way, and the same idea extends to finding the space diagonal of a box.
Pythagorean triples
A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a^2 + b^2 = c^2. They are useful because they let you check right-triangle facts without messy square roots. Some common triples to memorize:
(3, 4, 5), (5, 12, 13), (8, 15, 17), (7, 24, 25), (20, 21, 29), (9, 40, 41).
Each of these can be scaled up: (6, 8, 10), (9, 12, 15), (15, 36, 39), and so on are all right triangles too, just larger versions of the basic triples. There are infinitely many primitive triples (ones whose three numbers share no common factor), and there is even a formula due to Euclid for generating them all: take any two positive integers m > n with m and n coprime and of opposite parity, and set a = m^2 - n^2, b = 2mn, c = m^2 + n^2.
Carpenters and surveyors still use the 3-4-5 triple as a practical way to check that a corner is square: measure 3 units along one side, 4 along the other, and verify the diagonal is exactly 5.
The converse of the theorem
The converse of the Pythagorean theorem says: if a triangle has sides a, b, c, and a^2 + b^2 = c^2, then the triangle is a right triangle. This is just as useful as the original. You can test whether a triangle is right-angled by checking the equation, without ever measuring an angle.
Example: a triangle has sides 6, 8, and 10. Is it a right triangle? Check: 6^2 + 8^2 = 36 + 64 = 100 = 10^2. The equation holds, so yes, it is right-angled (with the right angle opposite the side of length 10).
There is also a stronger version sometimes called the law of cosines, which can tell you not just whether the triangle is right-angled, but whether it is acute or obtuse: if a^2 + b^2 > c^2, the triangle is acute; if a^2 + b^2 < c^2, it is obtuse.
Common mistakes
Applying the theorem to non-right triangles. It only works when one of the angles is exactly 90 degrees. For other triangles use the law of cosines.
Mixing up which side is the hypotenuse. The hypotenuse is always the longest side and is always opposite the right angle. In the equation a^2 + b^2 = c^2, c is the hypotenuse, not just any side.
Skipping the square root. Once you compute a^2 + b^2 = some number, that number is the square of the hypotenuse, not the hypotenuse itself.
Confusing the theorem with the distance formula. They are the same idea, but the distance formula is set up for two points in coordinates; the theorem is set up for the sides of a triangle. You can move freely between them by treating the differences in coordinates as legs of a right triangle.
Real-life applications
Construction and carpentry: framing a square corner uses the 3-4-5 trick. Roofers compute rafter lengths from rise and run by applying the theorem.
Surveying and navigation: any time a straight-line distance between two points is needed and the underlying ground can be treated as flat, the theorem gives the answer through the distance formula.
Computer graphics: 2D and 3D engines compute distances between objects constantly to detect collisions, decide visibility, and animate movement.
Sports and physics: working out the diagonal of a soccer field, the path of a baseball after a hit, or the resultant of two perpendicular forces all reduce to the Pythagorean relationship.
Astronomy: distances to nearby stars are sometimes computed using parallax measurements that boil down to a right-triangle calculation.
Quick reference
Formula: a^2 + b^2 = c^2, with c the hypotenuse. To find the hypotenuse: c = sqrt(a^2 + b^2). To find a leg given the hypotenuse and the other leg: a = sqrt(c^2 - b^2). The theorem applies only to right triangles, and its converse lets you test for right-angledness.
- a^2 + b^2 = c^2 (c is the hypotenuse, opposite the right angle)
- Hypotenuse: c = sqrt(a^2 + b^2)
- Missing leg: a = sqrt(c^2 - b^2)
- Common triples: (3,4,5), (5,12,13), (8,15,17), (7,24,25)
- Converse: if a^2 + b^2 = c^2 holds, the triangle is right-angled
- Non-right triangles: use the law of cosines instead