8TH GRADE MATHEMATICS • GEOMETRY

The Pythagorean Theorem in 2D and 3D

Learn how a 2,500-year-old formula helps you find missing lengths in right triangles — and even in three-dimensional space.

Where Did the Pythagorean Theorem Come From?

Imagine you need to build a perfectly square corner for a garden bed, but you don't have a giant protractor. Thousands of years ago, builders faced the exact same problem. They discovered that if you measure specific side lengths on a triangle, you can create a perfect right angle every time. That discovery eventually became one of the most famous ideas in all of mathematics: the Pythagorean Theorem.

~1800 BCE
Ancient Babylonian clay tablets (like Plimpton 322) show lists of number triples that satisfy the Pythagorean relationship. Builders used these triples to create right angles long before anyone wrote a formal proof.
~800 BCE
Indian mathematicians recorded the Baudhayana Sulba Sutra, which describes the relationship between the sides of a right triangle and gives specific examples. This is one of the earliest written references to the theorem.
~500 BCE
The Greek mathematician Pythagoras and his followers are credited with providing one of the first known logical proofs of the theorem. The result has carried his name ever since.
~300 BCE
Euclid includes a proof of the theorem in his famous work Elements (Book I, Proposition 47). His proof uses areas of squares built on each side of a right triangle.
Today
The Pythagorean Theorem is one of the most-used formulas in science, engineering, architecture, and everyday problem solving. Over 400 different proofs have been published!

So why does this matter to you? Because the Pythagorean Theorem gives you a reliable way to find a missing side of any right triangle — whether you're measuring a TV screen, figuring out a shortcut across a field, or calculating a distance in 3D space.

Core Principles & Definitions

Before we jump into calculations, let's make sure you know the key vocabulary and ideas. Every word here will come up again and again, so take a moment to get comfortable with them.

1

Right Triangle

A triangle that has exactly one right angle (a 90° angle). The right angle is usually marked with a small square in the corner.
2

Hypotenuse

The longest side of a right triangle. It is always the side across from (opposite) the right angle. We often label it c.
3

Legs

The two shorter sides of a right triangle. They are the sides that form the right angle. We usually label them a and b.
4

The Theorem

In any right triangle, the square of the hypotenuse equals the sum of the squares of the two legs: a² + b² = c².
Key Takeaway
Think of it like a seesaw: the two legs' squares sit on one side, and the hypotenuse's square sits on the other. They always balance perfectly in a right triangle. If you know any two sides, you can find the third!

Seeing the Theorem: A Visual Proof

One of the best ways to understand the Pythagorean Theorem is to see it. The diagram below shows a right triangle with a square built on each side. The area of the square on the hypotenuse () is exactly equal to the combined areas of the squares on the two legs ( + ).

Right triangle with squares drawn on each side, illustrating that a² + b² = c².

In the picture above, you can imagine literally cutting out the two smaller squares ( and ) and rearranging their pieces to fill the big square () perfectly. That's what the equation a² + b² = c² is really saying: the areas of the leg-squares add up to the area of the hypotenuse-square.

This relationship only works for right triangles. If the triangle doesn't have a 90° angle, the equation won't balance.

How to Use the Formula

Let's look at the actual formula and learn how to rearrange it, depending on which side you need to find.

The Pythagorean Theorem
a² + b² = c²
a and b are the legs; c is the hypotenuse (longest side)

There are two main situations you'll run into.

Situation 1 — Finding the Hypotenuse

When you know both legs (a and b) and need the hypotenuse (c), plug the legs into the formula and solve:

Finding the Hypotenuse
c = √(a² + b²)
Square each leg, add them, then take the square root.

Situation 2 — Finding a Leg

When you know the hypotenuse and one leg, rearrange the formula to isolate the missing leg:

Finding a Missing Leg
a = √(c² − b²)
Square the hypotenuse, subtract the known leg squared, then take the square root.

Here's the key idea: you always need to know two sides to find the third. And always double-check which side is the hypotenuse — it's the one across from the right angle, and it's always the longest.

Key Takeaway
Think of the formula like a recipe. If you're finding the hypotenuse, you add the squares, then take the square root. If you're finding a leg, you subtract the squares, then take the square root. Add or subtract — that's the only difference.

Extending to Three Dimensions

The Pythagorean Theorem doesn't stop at flat shapes. You can use it in 3D (three-dimensional) space too! Imagine a rectangular box (like a shoebox). What if you wanted to find the length of the longest diagonal — the one that goes from one corner all the way through the inside of the box to the opposite corner?

A rectangular box showing the space diagonal calculated using the 3D Pythagorean Theorem.

Here's the trick: you use the Pythagorean Theorem twice. First, find the diagonal across the base of the box (a flat triangle). Then, use that base diagonal as one leg of a new right triangle, with the box's height as the other leg. The hypotenuse of that second triangle is the space diagonal.

3D Pythagorean Theorem (Space Diagonal)
d = √(l² + w² + h²)
l = length, w = width, h = height of the box

Notice how this looks just like the 2D version, but with three squared terms added together instead of two. That's really all there is to it!

This 3D formula is useful in real life. For example, if you're shipping a long fishing rod and need to know whether it fits diagonally inside a box, you'd use this formula to find the longest possible length that fits inside.

Worked Examples

Let's walk through two complete problems — one in 2D and one in 3D — step by step.

Example A — 2D: Finding the Hypotenuse
1
ProblemA ladder is placed 6 feet away from the base of a wall. The ladder reaches 8 feet up the wall. How long is the ladder?
2
Step 1 — Draw It OutThe wall and the ground form a right angle. The ground distance is one leg (a = 6 ft), the wall height is the other leg (b = 8 ft), and the ladder is the hypotenuse (c = ?).
3
Step 2 — Write the Formulaa² + b² = c²
4
Step 3 — Plug In the Numbers6² + 8² = c² → 36 + 64 = c² → 100 = c²
5
Step 4 — Solve for cc = √100
c = 10
6
Step 5 — InterpretThe ladder is 10 feet long. Notice that 6, 8, 10 is a well-known Pythagorean triple — a set of whole numbers that satisfy the theorem perfectly.
Example B — 3D: Space Diagonal of a Box
1
ProblemA shipping box is 12 inches long, 4 inches wide, and 3 inches tall. What is the length of the longest diagonal inside the box?
2
Step 1 — Identify the Dimensionsl = 12 in, w = 4 in, h = 3 in
3
Step 2 — Write the 3D Formulad = √(l² + w² + h²)
4
Step 3 — Plug In the Numbersd = √(12² + 4² + 3²) = √(144 + 16 + 9) = √169
5
Step 4 — Solved = √169
d = 13 inches
6
Step 5 — InterpretThe longest diagonal inside the box is 13 inches. That means an object up to 13 inches long could fit inside if placed diagonally corner to corner.

Strengths & Limitations

The Pythagorean Theorem is incredibly useful, but it does have its limits. Let's compare what it can and can't do.

StrengthsLimitations
Works for any right triangle, no matter the sizeOnly works for right triangles — not obtuse or acute triangles
Easy to extend to 3D problems with rectangular boxesDoesn't directly handle curved surfaces or non-rectangular shapes
Uses simple operations: squaring, adding, and square rootsAnswers are sometimes irrational numbers (like √2 ≈ 1.414…) that can't be written as exact decimals
Can verify whether a triangle is a right triangleDoesn't tell you anything about the angles (other than confirming the 90° angle exists)
Key Takeaway
The Pythagorean Theorem is like a Swiss Army knife for right triangles — it's simple, reliable, and handles most everyday problems. But just like a Swiss Army knife can't replace a full toolbox, you'll eventually learn other tools (like trigonometry and the Law of Cosines) for triangles that aren't right triangles.

Connections to Advanced Topics

The Pythagorean Theorem isn't just a stand-alone formula — it's the foundation for many ideas you'll see later in math. Here's a peek at how it connects to more advanced concepts.

What You Know NowWhere It Leads
a² + b² = c² finds a missing sideThe Distance Formula (used in algebra and coordinate geometry) is actually the Pythagorean Theorem in disguise!
Finding side lengths in right trianglesTrigonometry (sine, cosine, tangent) lets you find angles and sides
3D diagonal: √(l² + w² + h²)The 3D Distance Formula in higher math and physics uses the same pattern
Checking if a triangle is a right triangleThe converse of the theorem: if a² + b² = c², then the triangle must be a right triangle

For example, the Distance Formula you'll learn in algebra — d = √[(x₂ − x₁)² + (y₂ − y₁)²] — is really just the Pythagorean Theorem applied to a coordinate grid. The horizontal and vertical distances between two points become the legs, and the straight-line distance is the hypotenuse. Once you see this connection, you'll realize the Pythagorean Theorem is everywhere.

Practice Problems

Try these five problems on your own. They start easy and get tougher. Click "Show Answer" when you're ready to check your work.

PROBLEM 1CONCEPTUAL
In a right triangle, one leg is 5 cm and the other leg is 12 cm. Without doing any calculation, which side is the hypotenuse — the 5 cm side, the 12 cm side, or the unknown side? Explain how you know.
PROBLEM 2BASIC CALCULATION
A right triangle has legs of length 9 and 12. Find the length of the hypotenuse.
PROBLEM 3INTERMEDIATE
A right triangle has a hypotenuse of 20 cm and one leg of 16 cm. What is the length of the other leg?
PROBLEM 4APPLIED / REAL-WORLD
A baseball diamond is a square with sides of 90 feet. A player throws the ball from home plate to second base (diagonally across the square). How far is the throw? Round to the nearest tenth of a foot.
PROBLEM 5CHALLENGE (3D)
A room is 15 feet long, 12 feet wide, and 8 feet tall. A spider in one corner of the floor wants to reach the opposite corner of the ceiling. If the spider could fly in a straight line through the air, how far would it travel? Round to the nearest tenth.

Lesson Summary

The Pythagorean Theorem states that in any right triangle, the sum of the squares of the two legs equals the square of the hypotenuse: a² + b² = c². You can rearrange this formula to find any missing side — use addition and a square root to find the hypotenuse, or subtraction and a square root to find a leg. This theorem works for every right triangle, no matter how big or small.

In three-dimensional problems, you extend the same idea to find the space diagonal of a rectangular box: d = √(l² + w² + h²). This is just the Pythagorean Theorem applied twice. Whether you're calculating the length of a ladder, the diagonal of a baseball field, or the longest object that fits in a shipping box, the Pythagorean Theorem is your go-to tool. It connects to the Distance Formula and trigonometry you'll study next — so mastering it now sets you up for success in algebra, geometry, and beyond.

Varsity Tutors • 8th Grade Mathematics (Common Core) • The Pythagorean Theorem in 2D and 3D