Mathematics

Pythagorean Theorem a² + b² = c²

One of the most fundamental relationships in geometry, connecting the three sides of every right triangle.

↓ Scroll to explore
The Theorem

What does it say?

In any right triangle — a triangle with one 90° angle — the square of the length of the hypotenuse (the side opposite the right angle) equals the sum of the squares of the other two sides.

a b c
a² + b² = c²
a — one leg
b — other leg
c — hypotenuse

Proofs

Why is it true?

Over the centuries, mathematicians have discovered more than 370 distinct proofs. Here are three of the most celebrated.

🟦

Geometric (Square) Proof

Arrange four identical right triangles inside a large square. The area left over in the centre equals c². Rearranging them proves a² + b² = c².

🔺

Similar Triangles

Drop a perpendicular from the right angle to the hypotenuse. The two smaller triangles are similar to each other and to the original, yielding the relation directly.

Algebraic Proof

Place the same four triangles differently inside the same square. Comparing the two area expressions — (a+b)² — gives a² + b² = c² algebraically.


Calculator

Try it yourself

Fill in any two sides and the missing one will be calculated instantly. Leave the side you want to find blank.

Enter two values above to calculate the third.

Only right triangles. All values must be positive.


Applications

Where is it used?

🏗️

Architecture & Construction

Builders use the 3-4-5 rule (a classic Pythagorean triple) to ensure walls and foundations meet at perfect right angles.

🗺️

Navigation & GPS

Distances between coordinates on a flat plane are computed with the theorem. GPS systems generalise it into three dimensions.

🖥️

Computer Graphics

Every distance calculation in 2-D and 3-D engines — collision detection, lighting, camera transforms — relies on the theorem.

🔭

Physics & Engineering

Vector magnitudes, signal processing, and structural stress analysis all use the Euclidean distance formula derived from it.


History

A brief timeline

~1800 BCE

Babylonians — Clay tablet Plimpton 322 records Pythagorean triples centuries before Pythagoras was born, showing the relationship was known in Mesopotamia.

~800 BCE

Baudhayana (India) — The Sulba Sutras state the theorem for rectangles and its use in altar construction.

~570 BCE

Pythagoras of Samos — The Greek philosopher is traditionally credited with the first general proof, giving the theorem its name.

300 BCE

Euclid — Included a rigorous proof as Proposition 47 of Book I in his monumental work Elements.

1876 CE

James A. Garfield — The future 20th U.S. President published an original trapezoid-based proof in the New England Journal of Education.


Generalisation

The Law of Cosines

The Pythagorean theorem works only when one angle is exactly 90°. The Law of Cosines extends the same idea to any triangle, whatever its angles.

c² = a² + b² − 2ab · cos(C)
a, b — the two enclosing sides
C — the angle between them
c — the opposite side

Proof — coordinate geometry

Place vertex C at the origin, B at (a, 0) along the x-axis, and A at (b cos C, b sin C) — the exact point reached by travelling distance b from C at angle C. Side c is then the straight-line distance from A to B.

x y C B A (0, 0) (a, 0) (b cos C, b sin C) b c a C

Apply the distance formula c² = (xA − xB)² + (yA − yB)², then expand and simplify:

Distance c² = (b cosCa)² + (b sinC
↓  expand  (x − y)² = x² − 2xy + y²
Expand = b² cos²C − 2ab cosC + a² + b² sin²C

Special case — right angle

When the angle C is 90°, we have cos(C) = 0. The law of cosines therefore simplifies to the Pythagorean theorem:

c² = a² + b²

Interactive Demo

Angle 60°
Acute
cos(C) = 0.5