Pythagorean Theorem: Formula, Steps, and Proof
Written and checked with AI using the references below. This is not human expert review.
Quick answer
The Pythagorean theorem states that in a right triangle, the square of the hypotenuse equals the sum of the squares of the legs. The hypotenuse is the side directly opposite the right angle. Knowing any two side lengths allows you to calculate the third side length exactly using this relationship.
The Core Rule and Geometric Formula
The Pythagorean theorem is a foundational principle of geometry that describes the exact relationship between the sides of a right triangle. A right triangle is any triangle containing one right angle. The two sides that meet to form the right angle are called legs. The side directly across from the right angle is called the hypotenuse. The hypotenuse is always the longest side of a right triangle.
Expressed as an algebraic equation, the theorem is written as:
a2 + b2 = c2
In this formula, a and b represent the lengths of the two perpendicular legs, and c represents the length of the hypotenuse. The exponents mean that each side length is multiplied by itself.
Beyond its algebraic formula, the theorem carries a concrete geometric meaning. Imagine building a flat, square box on each of the three sides of a right triangle. The surface area of the square built along leg a is a2. The surface area of the square built along leg b is b2. Adding those two surface areas together matches the surface area of the larger square constructed along hypotenuse c, which is c2.
| Variable | Geometric Role | Position in Triangle | Value Constraint |
|---|---|---|---|
| a | First leg | Forms one side of the right angle | Must be a positive real number |
| b | Second leg | Forms the second side of the right angle | Must be a positive real number |
| c | Hypotenuse | Opposite the right angle | Must be greater than both a and b |
A Complete Calculation for a Missing Side
As an illustrative example, consider a right triangle where horizontal leg a measures 6 centimeters and vertical leg b measures 8 centimeters. To calculate the unknown hypotenuse length c, work through this illustrative calculation:
- Identify the known values: In this illustrative example, leg a equals 6 centimeters and leg b equals 8 centimeters.
- Write the primary formula: State
a2 + b2 = c2before substituting values. - Substitute the measurements into the formula: Replace the variables with the illustrative values, carrying units through:
(6 cm)2 + (8 cm)2 = c2. - Square each leg length: Following the standard order of operations, compute the powers before adding:
36 cm2 + 64 cm2 = c2. - Add the squared values together: Combine the areas on the left side of the equation:
100 cm2 = c2. - Extract the square root: Isolate the variable c by taking the principal square root:
c = 10 cm.
To verify this illustrative calculation, perform a back-substitution check. Place 10 centimeters back into the hypotenuse position: 62 + 82 = 36 + 64 = 100, and 102 = 100. Because both sides produce identical values, the solution is confirmed. The physical side length is strictly positive 10 centimeters because geometric distance cannot be negative.
How to Generalize the Method for Other Sides
You can rearrange the Pythagorean theorem to calculate the length of an unknown leg when you know the hypotenuse and one leg. Instead of adding two squared values, isolate the unknown leg by subtracting the known squared leg from the squared hypotenuse.
To solve for leg a, subtract b2 from both sides of the equation: a2 = c2 − b2, which yields a = √(c2 − b2).
Similarly, to solve for leg b, subtract a2 from both sides: b2 = c2 − a2, which yields b = √(c2 − a2).
In an illustrative calculation, suppose a right triangle has a hypotenuse of 10 centimeters and a known leg of 8 centimeters. To find the remaining leg a:
- Write the rearranged expression:
a2 = (10 cm)2 − (8 cm)2. - Square each value:
a2 = 100 cm2 − 64 cm2. - Subtract the smaller area from the larger area:
a2 = 36 cm2. - Extract the square root:
a = 6 cm.
Ancient builders recognized sets of whole numbers that fit this relationship without fractions, known as Pythagorean triples. The sets 3, 4, 5 and 6, 8, 10 represent well-documented examples. When side lengths do not form a whole-number triple, distinguish exact radical values from rounded decimal approximations. In an illustrative calculation with legs of 3 inches and 5 inches, the squared sum is 32 + 52 = 9 + 25 = 34. The exact mathematical answer is √34 inches. If practical work requires a decimal figure, calculate an approximation and state the rounding precision.
Why the Geometric Relationship Holds True
Hundreds of distinct mathematical proofs support the Pythagorean theorem. They range from ancient geometric dissections to algebraic arguments. One visual explanation relies on rearranging four identical right triangles inside a larger square.
Consider four identical right triangles, each with legs a and b and hypotenuse c. Construct a large outer square with sides equal to (a + b). The total area of this large square is (a + b)2.
You can arrange these four triangles inside the outer square in two different ways:
- First arrangement: Place the four triangles around the corners of the outer square so their hypotenuses face inward. The four triangles together take up an area equal to four times half of base times height, which is
4 × (1/2)ab = 2ab. The empty region left in the center forms an interior square with sides of length c and an area ofc2. Therefore, the total area of the large square is2ab + c2. - Second arrangement: Shift the four triangles inside the same outer square so they pair up into two rectangles of width a and height b. These two rectangles occupy the exact same combined triangular area of
2ab. The remaining uncovered space inside the boundary is now divided into two separate squares: one square with areaa2in one corner, and another square with areab2in the opposite corner. The total area is therefore expressed as2ab + a2 + b2.
Because the outer boundary did not change size, both arrangements possess identical total area: 2ab + c2 = 2ab + a2 + b2. Subtracting the shared triangular area of 2ab from both sides leaves c2 = a2 + b2.
Other historical figures developed their own proofs. In 1876, James Garfield, who later served as president of the United States, published an original proof based on a trapezoid. He placed two identical right triangles along a baseline to form a third right isosceles triangle. Equating the trapezoid area formula to the sum of the three internal triangle areas produces a2 + b2 = c2 after algebraic simplification.
The theorem is named after Greek philosopher Pythagoras, born around 570 BC. However, cultures around the globe used this relationship long before him. Babylonian calculations used Pythagorean triples over one thousand years before Pythagoras was born. Clay tablets from around 1800 BC, such as tablet MS 3052 and tablet Plimpton 322, record these geometric measurements. In Egypt, Berlin Papyrus 6619 solved area problems that reduced to a right triangle with side lengths in the ratio 6:8:10. In India, the Baudhayana Shulba Sutra recorded geometric rules for right-angled altars. Early Chinese works such as the Zhoubi Suanjing explained the relationship as the Gougu theorem using geometric dissections.
Required Conditions and What Changes the Result
The Pythagorean formula functions reliably only when specific geometric conditions are met. Knowing these boundaries prevents calculation errors when exploring foundational math concepts in practical applications.
- The triangle must contain a right angle: The equation fails if the triangle is acute or obtuse. In an acute triangle,
c2 < a2 + b2. In an obtuse triangle,c2 > a2 + b2. For triangles without a right angle, use the Law of Cosines:c2 = a2 + b2 − 2ab cos(C). - The surface must be flat: The theorem requires Euclidean, flat geometry. On curved surfaces, such as a sphere, triangle angles add up to more than two right angles, and the standard Pythagorean formula does not yield correct distances.
- The correct side must be identified as the hypotenuse: A common mistake happens when learners place a known leg measurement into the variable c position. Always find the side directly across from the right angle before performing calculations. The value of c must always exceed both a and b.
- Consistent measurement units: All three sides must use the same unit of measure. If one leg is given in feet and another in inches, convert both sides into either inches or feet before squaring values. Much like calculating the area of a circle, keeping units uniform prevents scale errors.
When applied within a flat coordinate grid, the theorem extends directly into the Cartesian distance formula. The straight-line distance between two points (x1, y1) and (x2, y2) forms the hypotenuse of a right triangle whose legs are coordinate differences: d = √((x2 − x1)2 + (y2 − y1)2). In three dimensions, the principle generalizes further to find box diagonals and solid shapes through de Gua’s theorem, demonstrating how a simple rule for flat triangles forms the backbone of spatial measurement.
Frequently asked questions
Does the Pythagorean theorem work on every triangle?
No. It applies only to right triangles on a flat Euclidean surface. If a triangle does not contain a right angle, the formula fails. For general triangles, use the Law of Cosines to account for angles that are not right angles.
Can the hypotenuse ever be shorter than either leg?
No. In a right triangle, the hypotenuse is opposite the right angle, making it strictly the longest side. Its numerical length must always exceed leg a and leg b individually.
What is a Pythagorean triple?
A Pythagorean triple consists of three positive whole numbers that satisfy the equation a squared plus b squared equals c squared. Well-documented historical examples include 3, 4, 5 and 6, 8, 10, which produce right triangles with whole-number sides.
Why is only the positive square root used when solving for a side?
Algebraic equations yield both positive and negative roots. Because geometric side lengths represent physical distance, length cannot be negative. Therefore, only the positive principal square root gives a valid geometric solution.
Did Pythagoras invent the theorem first?
Historical evidence indicates he did not. Babylonian tablets predated Pythagoras by more than one thousand years, and ancient Egyptian, Indian, and Chinese mathematical texts documented the relationship independently before or alongside early Greek geometry.
Sources
- Pythagorean Theorem -- from Wolfram MathWorld · mathworld.wolfram.com
- Pythagorean theorem - Wikipedia · en.wikipedia.org
Written by AI; checked through automated evidence and editorial review. References retrieved October 12, 2026.
Spotted an error? Tell us what needs correcting.