All Tools

Pythagorean Theorem Explorer

Solve for any missing side, see the classic visual proof with squares on each side, generate Pythagorean triples, and extend the theorem to three dimensions. All calculations run in your browser with step-by-step math.

a² = 9b² = 16c² = 25a = 3b = 4c = 5
9+16=25(25.00 = 25.00)

Controls

Side a3
Side b4

Results

Pythagorean Theorem
a2+b2=c2a^2 + b^2 = c^2
Step-by-Step
c=a2+b2=32+42=25.00=5.0000c = \sqrt{a^2 + b^2} = \sqrt{3^2 + 4^2} = \sqrt{25.00} = 5.0000
Side a
3.0000
Side b
4.0000
Side c
5.0000
9.00
16.00
25.00
Triangle type: rightRight Triangle

Reference Guide

The Pythagorean Theorem

In a right triangle, the square of the hypotenuse equals the sum of the squares of the other two sides.

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

You can solve for any side. Given two sides aa and bb, the hypotenuse is c=a2+b2c = \sqrt{a^2 + b^2}. Given one leg and the hypotenuse, the other leg is a=c2b2a = \sqrt{c^2 - b^2}.

Visual Proof with Squares

Draw a square on each side of a right triangle. The area of the square on the hypotenuse equals the combined area of the squares on the two legs.

Area(c)=Area(a)+Area(b)\text{Area}(c) = \text{Area}(a) + \text{Area}(b)

For the classic 3-4-5 triangle, 9+16=259 + 16 = 25. This geometric interpretation is why the theorem works: it is fundamentally a statement about areas.

Pythagorean Triples

A Pythagorean triple is a set of three positive integers (a,b,c)(a, b, c) that satisfy a2+b2=c2a^2 + b^2 = c^2. A triple is primitive if gcd(a,b,c)=1\gcd(a, b, c) = 1.

a=m2n2,b=2mn,c=m2+n2a = m^2 - n^2, \quad b = 2mn, \quad c = m^2 + n^2

Euclid's formula generates all primitive triples when m>n>0m > n > 0, gcd(m,n)=1\gcd(m, n) = 1, and mnm - n is odd. Multiply by any positive integer kk to get derived triples.

3D Distance Formula

The Pythagorean theorem extends to three dimensions. The distance from the origin to (x,y,z)(x, y, z) uses the theorem twice.

d=x2+y2+z2d = \sqrt{x^2 + y^2 + z^2}

First find the distance in the xy-plane: dxy=x2+y2d_{xy} = \sqrt{x^2 + y^2}. Then combine with z: d=dxy2+z2d = \sqrt{d_{xy}^2 + z^2}. Each step is one application of a2+b2=c2a^2 + b^2 = c^2.