CalcForAll

The Pythagorean Theorem — Formula, Proofs, and Real-World Uses

Blog › Math · 10 min read · Published 2026-03-05

Master the Pythagorean theorem: a² + b² = c². Learn the formula, see visual proofs, and discover how it's used in construction, navigation, and physics.

What Is the Pythagorean Theorem?

The Pythagorean theorem is one of the most fundamental and well-known results in all of mathematics. It states that in a right triangle (a triangle with one 90° angle), the square of the length of the hypotenuse (the side opposite the right angle) is equal to the sum of the squares of the other two sides. Expressed as an equation:

a² + b² = c²

Where a and b are the two shorter sides (legs) and c is the hypotenuse (always the longest side, always opposite the right angle).

Named after the ancient Greek mathematician Pythagoras (~570–495 BC), though Babylonian mathematicians knew of the relationship at least 1,000 years earlier. Clay tablets from around 1800 BC show Babylonian scribes computing Pythagorean triples with remarkable precision.

Solving for Any Side

The theorem can be rearranged to find any missing side:

  • Find hypotenuse: c = √(a² + b²)
  • Find a leg: a = √(c² − b²) or b = √(c² − a²)

Worked Examples

Example 1: A right triangle has legs of 3 cm and 4 cm. Find the hypotenuse.

c = √(3² + 4²) = √(9 + 16) = √25 = 5 cm

Example 2: A right triangle has a hypotenuse of 13 and one leg of 5. Find the other leg.

a = √(13² − 5²) = √(169 − 25) = √144 = 12

Example 3: A 10-foot ladder leans against a wall with its base 6 feet from the wall. How high up the wall does it reach?

height = √(10² − 6²) = √(100 − 36) = √64 = 8 feet

Pythagorean Triples

A Pythagorean triple is a set of three positive integers (a, b, c) that satisfy a² + b² = c². The most famous:

  • (3, 4, 5) — the simplest and most commonly used
  • (5, 12, 13)
  • (8, 15, 17)
  • (7, 24, 25)
  • (20, 21, 29)
  • (9, 40, 41)

Any multiple of a Pythagorean triple is also a triple: (3, 4, 5) → (6, 8, 10) → (9, 12, 15) → (30, 40, 50). There are infinitely many Pythagorean triples, generated by the formula: a = m² − n², b = 2mn, c = m² + n² for any integers m > n > 0.

Proofs of the Pythagorean Theorem

There are over 400 known proofs. Here are the most elegant:

1. Area Rearrangement Proof

Construct a large square with side (a + b). Inside, arrange four copies of the right triangle, leaving a square hole in the center with side c. The area of the large square equals (a + b)² = a² + 2ab + b². The area also equals the four triangles (4 × ½ab = 2ab) plus the inner square (c²). Setting equal: a² + 2ab + b² = 2ab + c². Cancel 2ab: a² + b² = c². ∎

2. Similar Triangles Proof

Drop a perpendicular from the right angle to the hypotenuse, creating two smaller triangles. Both are similar to the original and to each other. Using the property that corresponding sides of similar triangles are proportional: a/c = d/a and b/c = e/b (where d + e = c). This gives a² = cd and b² = ce. Adding: a² + b² = cd + ce = c(d + e) = c × c = c². ∎

3. President Garfield's Proof (1876)

James A. Garfield (20th US President) published a proof using a trapezoid. Arrange two copies of the right triangle and a larger right triangle to form a trapezoid with parallel sides a and b, height (a + b). Trapezoid area = ½(a + b)(a + b). Triangle areas = ½ab + ½ab + ½c². Setting equal and simplifying yields a² + b² = c². ∎

Real-World Applications

Construction and Carpentry

The "3-4-5 rule" is used daily by builders to ensure right angles. To check if a corner is square: measure 3 feet along one wall and 4 feet along the other — the diagonal should be exactly 5 feet. For larger projects, use 6-8-10 or 9-12-15.

Navigation and GPS

GPS uses the 3D Pythagorean theorem to calculate distances: d = √(Δx² + Δy² + Δz²). The Haversine formula for Earth-surface distances is essentially the Pythagorean theorem adapted for spherical geometry.

Physics

Vector addition uses the Pythagorean theorem. If a boat travels 30 km east and then 40 km north, the direct distance from start to finish is √(30² + 40²) = 50 km. Force vectors, velocity components, and electric field magnitudes all rely on this relationship.

Computer Graphics and Game Development

Distance between two points on screen: d = √((x₂ − x₁)² + (y₂ − y₁)²). This is used for collision detection, pathfinding, hit detection, and rendering calculations in virtually every game and graphics application.

Surveying and Architecture

Surveyors calculate distances across terrain, architects determine diagonal dimensions of rooms and rooflines, and engineers calculate cable lengths for bridges — all using the Pythagorean theorem as the foundation.

Extensions of the Theorem

  • 3D Pythagorean theorem: d = √(a² + b² + c²) — the space diagonal of a rectangular box
  • Distance formula: d = √((x₂ − x₁)² + (y₂ − y₁)²) — coordinate geometry version
  • Law of Cosines: c² = a² + b² − 2ab·cos(C) — generalization for non-right triangles. When C = 90°, cos(90°) = 0, and it reduces to c² = a² + b².
  • Fermat's Last Theorem: While a² + b² = c² has infinite integer solutions, aⁿ + bⁿ = cⁿ has NO integer solutions for n > 2. Proved by Andrew Wiles in 1995 after 358 years of attempts.

Key Takeaways

The Pythagorean theorem is arguably the most useful mathematical formula ever discovered. From ancient construction to modern GPS, from basic geometry homework to cutting-edge computer graphics, a² + b² = c² is the foundation of distance calculation in two and three dimensions. Master it, and you have a tool that applies across mathematics, physics, engineering, architecture, navigation, and computer science — a 2,500-year-old formula that's more relevant than ever.

Related calculators