The 3D Pythagorean theorem is an extension of the 2D Pythagorean theorem that can be used to solve problems in three dimensions such as cubes, and rectangular pyramids. In three dimensions, the general formula of the 3D Pythagorean theorem is , where *x*, *y*, and *z* are the corresponding lengths of the three dimensions.

In this lesson, we will examine at how the Pythagorean theorem works in three dimensions. We will also look at the proofs and examples with solutions.

## 3D Pythagorean Theorem formula and proof

The Pythagorean theorem is a formula that can be used to calculate the lengths of a right triangle’s three sides. The Pythagorean theorem tells us that, the square of the hypotenuse is equal to the sum of the squares of the legs.

Remember that the hypotenuse is the triangle’s side opposite the right angle (90°), and the legs are the triangle’s other two sides. The following triangle will be used to demonstrate this:

In this triangle, the formula of the Pythagorean theorem is:

This formula holds true in 2D, how about in 3D?

Imagine a cube and we want to find the length of the diagonal, that is, the distance from the bottom-most left front corner to the top-most right back corner (A to B):

We can draw a right triangle on the bottom face of the prism. Then, we assign *c*, *x*, and *y* as three sides of the right triangle.

In the diagram above, we can identify a right triangle, where we can use the Pythagorean theorem to find *c*.

Let *h* be the distance we wanted to know. To find the length of *h*, we can use the value of *c* as one of the legs of a right triangle, which has the sides, *c*, *h*, and *z*.

Here is the solution below:

We can now derive a general formula using the final result of the solution.

The formula of the 3D Pythagorean Theorem is:

## 3D Pythagorean theorem – Examples with answers

We can solve different 3D Pythagorean theorem situations using the formula shown above. There is a thorough solution for each of the following examples. Try to solve the problems yourself before looking at the solution.

**EXAMPLE 1**

Find the length of *c* in the cube below.

##### Solution

First, we have to identify the three sides and each corresponding length of the cube. In this case, the three lengths are equal to 4 units. We can now directly use the 3D Pythagorean theorem formula and substitute each value into the formula below.

Therefore, the length of *c* is .

**EXAMPLE 2**

Find the length of *h* in the prism below.

##### Solution

First, we have to identify the three sides and each corresponding length. In this case, we have 2, 3, and 4 units. We can now directly use the 3D Pythagorean theorem formula and substitute the values into the formula below.

Therefore, the length of *h* is .

**EXAMPLE 3**

Find the length of *h* in this prism below.

##### Solution

Similarly, we have to identify the three sides and their respective lengths of 2, 3, and units. We can now use the 3D Pythagorean theorem formula directly.

We substitute these values in the formula:

Therefore, the length of *h* is 5.

**EXAMPLE 4**

Find the length of the *h*, in the diagram below.

##### Solution

Similarly, we have to identify the three sides and their respective lengths of 2, 3, and units. We can now use the 3D Pythagorean formula directly.

We substitute these values in the formula:

Therefore, the length of *h* is .

**EXAMPLE 5**

Find the length of *x* of the cube in the diagram below.

##### Solution

In this case, we have to solve this using a different approach given that the lengths of the sides of the cube are not given.

We see that the hypotenuse of the cube is unit. Then, we have to remember that the cube has three identical sides:

Let’s say *x = y = z*

We can derive now a new form of the 3D Pythagorean theorem by using those identical sides:

And now, we can substitute the value that is given:

Therefore, the length of each side of the cube is 2 units.

**EXAMPLE 6**

Find the length of the diagonal of the cube that has the three sides with a length of 3 mm.

##### Solution

Since it is a cube all sides have the same lengths. Therefore, we can use the 3D Pythagorean theorem formula to find the length of the diagonal using the length of 3 for the three sides.

We substitute these values in the formula below:

Therefore, the length of *h* is mm.

## 3D Pythagorean theorem – Practice problems

Test your knowledge on this topic by solving the 3D Pythagorean theorem questions below. To answer the exercises, use the 3D Pythagorean theorem formula outlined above. If you are having trouble with these exercises, look over the examples that have been solved above.

## See also

Interested in learning more about the Pythagorean theorem? Take a look at these pages:

### Learn mathematics with our additional resources in different topics

**LEARN MORE**