The algebraic proof of the Pythagorean theorem finds the area of one square in two ways. A square of side a + b contains four right triangles and a tilted square of side c, so (a + b)2 = 4 · 1 over 2ab + c2. Expanding gives a2 + 2ab + b2 = 2ab + c2, and subtracting 2ab leaves a2 + b2 = c2.
The (a + b)² proof, line by line
Take a right triangle with legs a and b and hypotenuse c. Arrange four copies inside a square of side a + b, one in each corner, so that every side of the big square is split into a piece a and a piece b. The region left in the middle is a square of side c; the next section proves it.
Area from the side. The big square has side a + b, so
Area = (a + b)2Area from the pieces. Each triangle has area 1 over 2 × base × height = 1 over 2ab, and the middle square has area c2. The pieces fill the big square with no gaps or overlaps, so
Area = 4 · 1 over 2ab + c2 = 2ab + c2Set them equal and simplify. Both expressions describe the same region, so they are equal. Expand the left side, then subtract 2ab from both sides:
(a + b)2= 2ab + c2a2 + 2ab + b2= 2ab + c2a2 + b2= c2That's the whole proof. Every line is either an area fact or a standard algebra step, and nothing depends on the particular lengths, so it holds for every right triangle. This is the reason the result is often called the "(a + b)2 proof".
Why (a + b)² = a² + 2ab + b²
The expansion is the distributive property: (a + b)2 = (a + b)(a + b) = a2 + ab + ba + b2 = a2 + 2ab + b2. The picture shows the same thing with areas. It also shows why (a + b)2 = a2 + b2 is wrong: that forgets the two rectangles. (This picture is, in fact, the second arrangement of the rearrangement proof with the rectangles left uncut.)
Check it with numbers
Try the 5-12-13 triangle. The big square has side 17, the four triangles have total area 4 · 1 over 2 · 5 · 12, and what's left should be 132:
172 − 4 · 1 over 2 · 5 · 12 = 289 − 120 = 169 = 132A numerical check is not a proof, since it covers only one triangle, but it is a quick way to catch a slip in the algebra.
Why the middle shape really is a square
The proof uses the area c2 for the middle shape, so you have to know it is a square. Its four sides are all hypotenuses of identical triangles, so they all have length c. That alone only makes it a rhombus. For the angles, look at any point where two triangles meet on an edge of the big square. Three angles sit there along a straight line: one acute angle of the first triangle, the corner of the middle shape, and the other acute angle of the second triangle. Straight-line angles add to 180°, and the two acute angles of a right triangle add to 90°, so the corner of the middle shape is 180° − 90° = 90°.
Four equal sides and four right angles make a square. There is a labeled diagram of this argument on the rearrangement proof page.
The (b − a)² proof
A second algebraic proof puts the four triangles inside the square on the hypotenuse instead of around it. Place them so that each hypotenuse is one side of a square of side c, with each triangle a quarter turn from the last. They leave a small square hole in the middle. If b is the longer leg, the hole has side b − a.
Add up the pieces and expand (b − a)2 = b2 − 2ab + a2:
c2= 4 · 1 over 2ab + (b − a)2= 2ab + b2 − 2ab + a2= a2 + b2Why is the hole a square of side b − a? At each corner of the big square, two triangles meet: one with its acute angle β there, the other with α. Since α + β = 90°, the corner of the square, the short leg of one triangle lies exactly along the long leg of the next. So each long leg b is made of the neighbor's short leg a plus a side of the hole, which therefore has length b − a. Each corner of the hole lies on a straight leg next to a triangle's right angle, so it measures 180° − 90° = 90°.
This is the figure in Bhāskara's proof, and in the Chinese hypotenuse diagram of the gougu proof, where the triangles were colored red and the central square yellow. If a = b, the hole shrinks to a point and the formula becomes c2 = 2a2, which is still correct.
Two-column proof for homework
Many geometry classes ask for proofs in two columns: each statement on the left, the reason that justifies it on the right. Here is the (a + b)2 proof in that format.
| Statement | Reason |
|---|---|
| 1. Draw a square of side a + b and mark each side a from a corner, going round in order. | Construction |
| 2. Each corner triangle has legs a and b and a right angle between them. | By construction; the corners of a square are 90° |
| 3. Each corner triangle is congruent to the original triangle, so each has hypotenuse c. | SAS congruence |
| 4. The inner quadrilateral has four sides of length c. | Step 3 |
| 5. Each angle of the inner quadrilateral is 90°. | Angles on a straight line sum to 180°; the acute angles of a right triangle sum to 90° |
| 6. The inner quadrilateral is a square with area c2. | Definition of a square (steps 4 and 5); area of a square |
| 7. Area of the big square = (a + b)2. | Area of a square |
| 8. Area of the big square = 4 · 1 over 2ab + c2. | Area addition (the pieces do not overlap and fill the square) |
| 9. (a + b)2 = 2ab + c2 | Steps 7 and 8 (transitive property); simplify 4 · 1 over 2ab |
| 10. a2 + 2ab + b2 = 2ab + c2 | Distributive property (expand) |
| 11. a2 + b2 = c2 | Subtraction property of equality |
If your class writes paragraph proofs instead, turn each row into a sentence: "Since the corners of a square are right angles, each corner triangle has legs a and b with a right angle between them, so by SAS it is congruent to the original triangle." The logic is identical.
Algebraic proof vs. rearrangement proof
The two proofs start from the same picture, which is why they're often confused. They differ in how they finish.
| Rearrangement proof | Algebraic proof | |
|---|---|---|
| What you do | Compare two arrangements of the same pieces | Compute one area in two ways |
| Figures needed | Two squares (or one animated) | One square |
| Algebra needed | None: subtract equal areas | Expanding (a + b)2 |
| Best for | Seeing why it is true | Writing a formal proof |
President Garfield's proof is a third member of the family: it uses half of the same square, a trapezoid, and the same algebra. Proofs that use no areas at all, like the similar triangles proof, work very differently; the guide to all the proofs compares them.
Common mistakes
- Expanding (a + b)2 as a2 + b2. The middle term 2ab is the heart of the proof. See common mistakes for more on squaring sums.
- Using ab for the triangle's area. A right triangle is half of an a × b rectangle, so its area is 1 over 2ab. Four of them make 2ab, not 4ab.
- Skipping the "why is it a square?" step. Without it, the middle area might not be c2.
- Assuming what you're proving. Don't find the side of the middle square as √a2 + b2. It is c because it is the hypotenuse of a triangle congruent to the original, and that is all the proof needs.
Frequently asked questions
What is the algebraic proof of the Pythagorean theorem?
It writes the area of a square of side a + b in two ways: as (a + b)2, and as four triangles of area 1 over 2ab plus a middle square of area c2. Setting the two equal and simplifying gives a2 + b2 = c2.
Why does (a + b)² appear in the proof?
Because the four triangles fit around the edges of a square whose side is one short leg plus one long leg, a + b. Its area, (a + b)2, is the "first way" of computing the area; adding up the pieces is the second.
Is the algebraic proof the same as Bhāskara's proof?
They are close relatives. The (b − a)2 version on this page uses exactly Bhāskara's figure. Bhāskara's own presentation is usually shown as a rearrangement of the pieces rather than as algebra; see Bhāskara's proof.
Can I use numbers instead of a and b?
Numbers make a good check, but they prove the theorem only for that one triangle. To prove it for all right triangles, keep the letters a, b and c, so every step works whatever their values.
Who discovered the algebraic proof?
The figure is ancient and its origin is unknown; versions appear in Chinese and Indian mathematics. Writing it with modern algebraic symbols is much more recent, because that notation only developed in the last few centuries.
Sources and further reading
- Eli Maor, The Pythagorean Theorem: A 4,000-Year History (Princeton University Press, 2007).
- Elisha Scott Loomis, The Pythagorean Proposition, 2nd ed. (1940; reissued by the National Council of Teachers of Mathematics, 1968), the section on algebraic proofs.
- Roger B. Nelsen, Proofs Without Words: Exercises in Visual Thinking (Mathematical Association of America, 1993).
- Alexander Bogomolny, Pythagorean Theorem and its many proofs, Cut the Knot.
- Pythagorean Theorem, Wolfram MathWorld.
Keep exploring
- ProofsThe Rearrangement Proof of the Pythagorean TheoremThe rearrangement proof of the Pythagorean theorem, animated: four triangles in two squares, why the middle is a square, a full write-up and a paper activity.
- ProofsBhāskara's Proof of the Pythagorean TheoremBhaskara's "Behold" proof of the Pythagorean theorem, animated: the square on the hypotenuse becomes a² + b², plus the algebra and his second, similarity proof.
- ProofsPresident Garfield's Trapezoid ProofJames Garfield's 1876 trapezoid proof of the Pythagorean theorem: an animated build, the area found two ways, why angle ABD is 90°, and the story behind it.
- ProofsSimilar Triangles Proof of the Pythagorean TheoremProve the Pythagorean theorem with similar triangles: the altitude to the hypotenuse makes three similar right triangles, so a² = cp, b² = cq and a² + b² = c².
- 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.
- 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.