The Pythagorean theorem in this visualization
The Pythagorean theorem (Pythagoras’ theorem; in Chinese also the Gougu theorem) says that in a triangle with a right angle at , the legs and and the hypotenuse satisfy : the squares on the legs together have the area of the square on the hypotenuse. The converse holds too — a triangle with has a right angle at . The page draws Euclid’s figure (Elements I.47) and lets leave the right angle, which turns the theorem into the law of cosines.
Each altitude, carried on through the square on the opposite side, cuts that square into two rectangles. The rectangle next to a vertex has area (the two sides meeting there) × the cosine of the angle there, and the two rectangles next to the same vertex — one in each square that meets there — are equal: hatched next to , dotted next to , yellow next to . Adding the three squares’ pieces gives the law of cosines. At a right angle at the yellow pieces vanish and the altitude from cuts the square on into exactly and . Off the right angle the yellow pieces are the difference, each : positive when is acute, negative when it is obtuse. Any piece is negative, and drawn outside its square, exactly when the angle at its vertex is obtuse; the other piece of that square is then larger than the square.
The three proofs answer three questions. Shear (Euclid) moves the piece of next to into the square on : a shear keeps base and height, a quarter turn keeps everything, so every frame keeps the area; off 90° only that piece moves and the yellow ones stay behind. Dissection (Zhao Shuang’s figure, 3rd century) fills with four copies of the triangle and a square of side , , and turns two copies about corners to fill and . Similar splits the triangle along its altitude into two copies of itself on and ; similar figures’ areas scale with the square of a side, so semicircles, equilateral triangles or the triangle itself on the three sides add up just as the squares do.
Things to notice
- The equation needs the right angle, and is the side opposite it. Put the right angle at and the pieces next to vanish instead: . Lengths do not add: 3 + 4 is not 5.
- A piece can be larger than its square or negative: with , , the pieces at are , more than , and the piece at the obtuse is , drawn outside and dashed.
- The readouts say “= 0” and draw a right-angle mark only when the right angle is exact — set on the knob’s detent, typed, or caught while dragging . A triangle dragged close to it shows “≈ 0.01”: nearly right is not right.
Controls
- Drag C: , and the square on stay, and catches on the circle on diameter (a right angle at ) and on the lines through and perpendicular to . The knob turns with , kept; the wheels change , with kept. Type a side as
3,√2or1/3, the angle as60°orπ/3. Zhao’s figure and the similar triangles need a right angle: the page moves to 90° first and leaves the old triangle as a ghost you can go back to. - Presentation mode opens a full-screen view for projectors: Space proves, ← → step ∠C through the special angles, H hides every answer. Share copies a link to the current triangle, shape and proof.
Related
The distance between two points, , and on the unit circle are this theorem; the circle on diameter is where every angle is right (Thales, the inscribed angle theorem).
Further reading: Wikipedia: Pythagorean theorem; Wikipedia: Law of cosines; MacTutor History of Mathematics: Euclid of Alexandria.