Skip to main content
Daily Math Minute

The Pythagorean Theorem: Formula, Proof, and Examples

The Pythagorean theorem relates the three sides of a right triangle. Learn the formula, see a short proof using area, find missing sides, test whether a triangle is right, and use it to find distances.

GeometryBeginnerDaily Math Minute7 min read

What you'll learn

  • What the Pythagorean theorem says and which triangles it applies to
  • Why it's true, through a short proof that uses only area
  • How to find a missing hypotenuse or a missing leg
  • How to use the converse to test whether a triangle is a right triangle
  • How the theorem gives the distance between two points

Introduction

The Pythagorean theorem says that in any right triangle, the squares of the two shorter sides add up to the square of the longest side: a2+b2=c2a^2 + b^2 = c^2. If you know any two sides of a right triangle, it lets you find the third.

Why this matters

The theorem turns up anywhere you need a distance you can't measure directly. Builders use it to check that a corner is square: if one wall is marked at 3 feet and the other at 4 feet, the diagonal between the marks should be exactly 5 feet. It's how you find how high a ladder reaches, the diagonal size of a screen, or the straight-line distance between two points on a map. In coordinate geometry it becomes the distance formula, and in trigonometry it becomes the identity sin⁡2θ+cos⁡2θ=1\sin^2\theta + \cos^2\theta = 1.

The concept

Right triangles and their sides

Definition — Right triangle, legs, and hypotenuse

A right triangle is a triangle with one 90∘90^\circ angle, called the right angle. The two sides that form the right angle are the legs. The side across from the right angle is the hypotenuse. It's always the longest side.

Theorem — The Pythagorean theorem

In a right triangle with legs of length aa and bb and hypotenuse of length cc:

a2+b2=c2a^2 + b^2 = c^2
(1)

The theorem applies only to right triangles. For any other triangle, a2+b2a^2 + b^2 and c2c^2 are not equal.

Why it's true

There are hundreds of known proofs. This one uses nothing but the area of squares and triangles.

Proof

Start with a right triangle with legs aa and bb and hypotenuse cc. Make four identical copies of it.

Draw a large square with side length a+ba + b. Place one triangle in each corner of the large square, rotating each one so its legs run along the edges of the square. Every edge of the large square is then made of one leg of length aa and one leg of length bb.

The four hypotenuses form a tilted square in the middle with side length cc. Its corners are right angles, because at each point where two triangles meet on an edge, the two acute angles of the triangle and the corner of the tilted square together form a straight line, and the two acute angles of a right triangle add up to 90∘90^\circ.

Now compute the area of the large square in two ways. Directly, it's (a+b)2(a + b)^2. Piece by piece, it's four triangles, each with area 12ab\tfrac{1}{2}ab, plus the tilted square with area c2c^2. Setting these equal:

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

Expand the left side and simplify the right side:

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

Subtract 2ab2ab from both sides to get a2+b2=c2a^2 + b^2 = c^2.

Note — Older than Pythagoras

The theorem is named after the Greek mathematician Pythagoras, who lived around 570 to 495 BCE. However, Babylonian mathematicians were already working with these relationships more than a thousand years earlier. A clay tablet known as Plimpton 322, from around 1800 BCE, lists values connected to sets of whole-number right-triangle sides.

The converse: testing for a right angle

The theorem also works in reverse.

Theorem — Converse of the Pythagorean theorem

If the side lengths of a triangle satisfy a2+b2=c2a^2 + b^2 = c^2, where cc is the longest side, then the triangle is a right triangle.

This is exactly what the builder's 3-4-5 check relies on: 32+42=9+16=25=523^2 + 4^2 = 9 + 16 = 25 = 5^2, so a triangle with those sides must contain a right angle.

Pythagorean triples

Sets of three whole numbers that satisfy the theorem are called Pythagorean triples. The most common ones are worth recognizing on sight:

TripleCheck
3, 4, 59+16=259 + 16 = 25
5, 12, 1325+144=16925 + 144 = 169
8, 15, 1764+225=28964 + 225 = 289
7, 24, 2549+576=62549 + 576 = 625

Any multiple of a triple is also a triple. For example, 6, 8, 10 is 3, 4, 5 doubled.

Worked examples

Example — Worked example 1: finding the hypotenuse

Problem: A right triangle has legs of 6 and 8. Find the hypotenuse.

Step 1: Substitute the legs into equation (1): 62+82=c26^2 + 8^2 = c^2.

Step 2: 36+64=10036 + 64 = 100, so c2=100c^2 = 100.

Step 3: Take the positive square root, since lengths are positive: c=100=10c = \sqrt{100} = 10.

Answer: c=10c = 10

Example — Worked example 2: finding a leg

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

Step 1: The unknown is a leg, so it's aa or bb, not cc: 52+b2=1325^2 + b^2 = 13^2.

Step 2: 25+b2=16925 + b^2 = 169. Subtract 25 from both sides to get b2=144b^2 = 144.

Step 3: b=144=12b = \sqrt{144} = 12.

Answer: b=12b = 12

Example — Worked example 3: an answer that isn't a whole number

Problem: A 15-foot ladder leans against a wall with its base 4 feet from the wall. How high up the wall does it reach?

Step 1: The ladder is the hypotenuse, because it's opposite the right angle between the wall and the ground. The distance along the ground is one leg, and the height is the other: 42+h2=1524^2 + h^2 = 15^2.

Step 2: 16+h2=22516 + h^2 = 225, so h2=209h^2 = 209.

Step 3: h=209≈14.46h = \sqrt{209} \approx 14.46.

Answer: About 14.46 feet. Most real problems don't come out to a perfect square. Leave the answer as 209\sqrt{209} for an exact value, or round it for a measurement.

Example — Worked example 4: is it a right triangle?

Problem: Is a triangle with sides 6, 9, and 11 a right triangle?

Step 1: The longest side is 11, so it would have to be the hypotenuse.

Step 2: Compare 62+926^2 + 9^2 with 11211^2: 36+81=11736 + 81 = 117, but 112=12111^2 = 121.

Answer: 117≠121117 \neq 121, so by the converse, it is not a right triangle.

Distance between two points

To find the distance between two points on a coordinate grid, draw the right triangle whose legs are the horizontal and vertical gaps between them. The distance is the hypotenuse.

Example — Worked example 5: distance on a grid

Problem: Find the distance between (1,2)(1, 2) and (7,10)(7, 10).

Step 1: The horizontal leg is 7−1=67 - 1 = 6 and the vertical leg is 10−2=810 - 2 = 8.

Step 2: d=62+82=36+64=100=10d = \sqrt{6^2 + 8^2} = \sqrt{36 + 64} = \sqrt{100} = 10.

Answer: The distance is 10. Written in general form, this is the distance formula:

d=(x2−x1)2+(y2−y1)2d = \sqrt{(x_2 - x_1)^2 + (y_2 - y_1)^2}

Common mistakes

Warning — Using it on a triangle that isn't a right triangle

a2+b2=c2a^2 + b^2 = c^2 is only true for right triangles. Before using it, confirm there's a right angle, either from a marked square corner on the diagram or from the problem statement.

Warning — Adding when you should subtract

When the missing side is a leg, subtract: b=c2−a2b = \sqrt{c^2 - a^2}. In worked example 2, adding would give 25+169=194≈13.9\sqrt{25 + 169} = \sqrt{194} \approx 13.9. That's longer than the hypotenuse, which is impossible, since the hypotenuse is always the longest side.

Warning — Taking the square root of each term separately

a2+b2\sqrt{a^2 + b^2} is not a+ba + b. For example, 32+42=25=5\sqrt{3^2 + 4^2} = \sqrt{25} = 5, not 3+4=73 + 4 = 7. Add the squares first, then take one square root of the total.

Practice questions

  1. A right triangle has legs of 9 and 12. Find the hypotenuse.

    Show answer
    1. 92+122=81+144=2259^2 + 12^2 = 81 + 144 = 225, and 225=15\sqrt{225} = 15. This is the 3-4-5 triple multiplied by 3.
  2. A right triangle has a hypotenuse of 26 and one leg of 10. Find the other leg.

    Show answer
    1. b2=262−102=676−100=576b^2 = 26^2 - 10^2 = 676 - 100 = 576, and 576=24\sqrt{576} = 24. This is the 5-12-13 triple doubled.
  3. Is a triangle with sides 10, 15, and 18 a right triangle?

    Show answer

    No. 102+152=100+225=32510^2 + 15^2 = 100 + 225 = 325, but 182=32418^2 = 324. They're very close, but not equal, so the triangle has no right angle.

  4. A screen is 16 inches wide and 9 inches tall. To the nearest hundredth of an inch, how long is its diagonal?

    Show answer

    About 18.36 inches. d=162+92=256+81=337≈18.36d = \sqrt{16^2 + 9^2} = \sqrt{256 + 81} = \sqrt{337} \approx 18.36.

  5. Find the distance between (−3,4)(-3, 4) and (2,−8)(2, -8).

    Show answer
    1. The horizontal leg is 2−(−3)=52 - (-3) = 5 and the vertical leg is −8−4=−12-8 - 4 = -12. Squaring removes the negative sign: 25+144=169=13\sqrt{25 + 144} = \sqrt{169} = 13.

Summary

  • In a right triangle, a2+b2=c2a^2 + b^2 = c^2, where cc is the hypotenuse, the side opposite the right angle.
  • To find the hypotenuse, add the squares of the legs and take the square root. To find a leg, subtract.
  • The converse lets you test for a right angle: if a2+b2=c2a^2 + b^2 = c^2, the triangle is right.
  • The distance between two points is the hypotenuse of the right triangle formed by their horizontal and vertical gaps.

For more practice, work through the Pythagorean theorem lesson in the Geometry curriculum, or see another proof in the Grade 8 proving the Pythagorean theorem lesson.