Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools

The Pythagorean Theorem

How to use
  1. ▶ Play runs the proof, Next → and ← Back step one scene at a time, Reset restores the opening scene and the original figure. Learn more about the controls
  2. Slide XX along the bottom side to change aa and bb, or drag PP or QQ to move or turn the square; the readout under the canvas keeps a2+b2a^2 + b^2 equal to c2c^2. Learn more about why it holds
  3. Labels toggles the point names, Measures writes each marked angle's size beside its arc. The Step explanations log keeps every step so far. Learn more about reading a scene
Proof?Put four copies of the right triangle into the corners of a square of side a + b, each turned a quarter turn further than the last. What is left in the middle is a square of side c, because the two acute angles of the triangle add up to 90°. The big square has area (a + b)² = a² + 2ab + b², and also c² + four triangles = c² + 2ab. So a² + b² = c². Drag X to change a and b, or P and Q to move the square.Pythagorean theorem
Display
Drag X to change a and b, P or Q to move the square
αβabcPXW
a² + b² = 4.0 + 9.0 = 13.0, c² = 13.0
Step 1 / 6

Step explanations

1A right triangle with legs a, b and hypotenuse c
Given
The angle at P is right; PX = a, PW = b, WX = c. The two acute angles are α at X and β at W. To prove: a² + b² = c².
The readout shows a² + b² and c² in the frame's units. Learn more about the statement




Getting Started with the Visualizer

DemoA run through the proof player
Step 0 of 7
Step through the proof, then drag the point that splits the side into aa and bb and watch the squares of the sides keep their sum. The picture below is the player with its parts numbered; the other tabs list what can be dragged, what each control does and what the step log shows.
Opening scene: the controls
1234567
1Proof — the theorem loaded in the player; the ? gives its idea in one line
2Display — Labels shows the point names, Measures writes each marked angle's size beside its arc
3Draggable points — X slides along the bottom side and sets a and b; P and Q move or turn the square; the hollow points follow
4Readout — the line under the figure: a² + b² and c² in the frame's units, live while you drag
5Back, Play, Next, Reset — step through the proof or run it; Reset returns to step 1 and restores the original figure
6Speed and step counter — how fast Play advances, and which of the 6 steps is on screen
7Step explanations — every step reached so far, with its justification tag and a link to the section that explains it; click an entry to jump back to it
Proof complete: step 6 of 6
12345
1The inner square — XYZW, four sides c and four right angles: area c²
2The four triangles — one in each corner, legs a and b, all congruent to the given one: area ab/2 each
3The big square — PQRS, side a + b: its area (a + b)² is counted twice
4Justification tags — Given, Construction, SAS congruence, Angle sum, Area two ways, Algebra
5Replay — at the last step Play becomes Replay and Next is off

The Statement

In a right triangle, with legs aa and bb and hypotenuse cc opposite the right angle,

a2+b2=c2a^2 + b^2 = c^2


the square on the hypotenuse equals the two squares on the legs together. This is Proposition 47 of Book I of Euclid's Elements, the last substantial result of the book, and the best known theorem in mathematics. The player shows the right angle at PP, the legs PX=aPX = a and PW=bPW = b, the hypotenuse WX=cWX = c, and the two acute angles α\alpha and β\beta.

There are hundreds of proofs. Euclid's own, with the squares drawn on the three sides and a line from the right angle cutting the big square into two rectangles, is the longest page of Book I. The proof on this page is the rearrangement in a square of side a+ba + b, found in the ancient Chinese Zhoubi Suanjing and in Bhaskara's work; it is shorter and uses only two facts from the earlier pages, side-angle-side congruence and the angle sum of a triangle. The readout under the canvas shows a2+b2a^2 + b^2 and c2c^2 side by side, in the frame's own units, live while you drag.
αβabcPXW
Opening scene, frozen

The right triangle WPX: legs a and b, hypotenuse c, acute angles α and β.


A Square of Side a Plus b

The construction is a square of side a+ba + b with the triangle in one corner. Extend the leg PX=aPX = a by bb to QQ, extend the leg PW=bPW = b by aa to SS, and complete the square PQRSPQRS. Its side is a+ba + b both ways, and its four corners are right angles.

Now go round the square and cut each side the same way: at aa from one corner and bb from the next, always turning in the same direction. On PQPQ the cut is XX itself; on QRQR it is YY, with QY=aQY = a; on RSRS it is ZZ, with RZ=aRZ = a; and on SPSP it is WW, with SW=aSW = a, so that WP=bWP = b, which is where the given triangle's leg already was. In the player these four points are hollow, since they follow XX: slide XX and all four move together.
αβabcbababaPQXRSYZW
The square of side a + b, frozen

PQRS with each side cut at a from one corner and b from the next: X, Y, Z, W.


Four Copies of the Triangle

In each corner of the big square there is now a triangle: WPXWPX, XQYXQY, YRZYRZ, ZSWZSW. Each has a leg aa, a leg bb and the right angle of the square between them. Two triangles with two sides and the included angle equal are congruent (side-angle-side), so all four are copies of the given triangle.

Everything else about them follows. Each hypotenuse, XYXY, YZYZ, ZWZW and WXWX, has length cc. Each has area 12ab\frac{1}{2}ab, half the rectangle on its legs. And each has the same two acute angles, α\alpha opposite the leg bb and β\beta opposite the leg aa; this last fact is what the next step needs.
αβabcbababaPQXRSYZW
Four copies, frozen

A triangle with legs a, b and a right angle in every corner: all four congruent by SAS.


The Inner Square

The piece left in the middle, XYZWXYZW, has four sides of length cc. It remains to see that its angles are right angles. Look at XX. The side PQPQ is a straight line through it, so the three angles at XX add up to 180°180°: the angle α\alpha of triangle WPXWPX, the angle of XYZWXYZW, and the angle β\beta of triangle XQYXQY.

In a right triangle the two acute angles add up to 90°90°, because all three angles add up to 180°180° by the angle sum theorem and one of them is the right angle. So the angle of XYZWXYZW at XX is 180°−α−β=90°180° - \alpha - \beta = 90°. The same argument at YY, ZZ and WW shows that every angle of XYZWXYZW is right. Four equal sides and four right angles: XYZWXYZW is a square, and its area is c2c^2.
αββαabcbababacccPQXRSYZW
The inner square, frozen

XYZW: four sides c, and at X the angle between α and β is 180° − 90° = 90°.


Counting the Area Twice

The big square can be measured in two ways. Its side is a+ba + b, so its area is (a+b)2(a + b)^2. It is also made of exactly five pieces that do not overlap: the inner square, area c2c^2, and the four triangles, area 12ab\frac{1}{2}ab each. So

(a+b)2=c2+4⋅12ab=c2+2ab(a + b)^2 = c^2 + 4 \cdot \tfrac{1}{2}ab = c^2 + 2ab


This is the whole proof in one line; what remains is to read off a2+b2a^2 + b^2 from it.
αββαabcbababacccPQXRSYZW
Area two ways, frozen

(a + b)² for the big square; c² + four halves of ab for its pieces.


Why It Holds

Expand the left side: (a+b)2=a2+2ab+b2(a + b)^2 = a^2 + 2ab + b^2. Then

a2+2ab+b2=c2+2aba^2 + 2ab + b^2 = c^2 + 2ab


and taking 2ab2ab from both sides leaves a2+b2=c2a^2 + b^2 = c^2. The end-of-proof mark ∎ in the log closes the argument. The tags name the facts used: the given right triangle, a construction, side-angle-side congruence, the angle sum, area counted two ways, and a line of algebra.

The 2ab2ab that cancels is the four triangles. That is the idea of every rearrangement proof: the triangles are the same on both sides of the equation, so only the squares matter. Euclid's proof avoids the algebra by cutting the square on cc into two rectangles and showing each rectangle equal to one of the squares on the legs; the result is the same.
αββαabcbababacccPQXRSYZW
The conclusion, frozen

a² + 2ab + b² = c² + 2ab, so a² + b² = c².


Dragging the Figure

Slide XX along the bottom side: aa grows as bb shrinks, the four triangles change shape together, the inner square turns, and the readout keeps a2+b2a^2 + b^2 equal to c2c^2. When XX is in the middle, a=ba = b, the triangles are isosceles right triangles and the inner square is the big square turned through 45°45°, with half its area.

Drag PP or QQ to move or turn the whole square; the lengths change but the equation does not. A drag that would push a corner of the square out of the frame, or make the square too small to read, is refused, as is one that would take XX too close to a corner.
αββαabcbababacccPQXRSYZW
After dragging X, frozen

a longer than b now: the triangles are thinner, the inner square has turned, the equation still holds.


Consequences

• Distances. The distance between two points with coordinates (x1,y1)(x_1, y_1) and (x2,y2)(x_2, y_2) is (x2−x1)2+(y2−y1)2\sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}: the theorem applied to a right triangle with horizontal and vertical legs.
• Trigonometry. Dividing a2+b2=c2a^2 + b^2 = c^2 by c2c^2 gives sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1, the Pythagorean identity.
• Any triangle. For a triangle that is not right-angled the Law of Cosines, c2=a2+b2−2abcos⁡γc^2 = a^2 + b^2 - 2ab\cos\gamma, adds a correction term that vanishes when γ=90°\gamma = 90°.
• The converse. If a2+b2=c2a^2 + b^2 = c^2 then the angle opposite cc is right (Euclid I.48). This is how a 33-44-55 rope makes a right angle.
• Irrational lengths. The diagonal of a unit square is 2\sqrt{2}, which is not a fraction; the theorem is where irrational numbers first appeared.