# 3D Pythagorean Theorem – Formula and Examples

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 $latex {{c}^2}={{x}^2}+{{y}^2}+{{z}^2}$, where xy, 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.

##### GEOMETRY

Relevant for

Exploring examples with answers of the 3D Pythagorean theorem.

See examples

##### GEOMETRY

Relevant for

Exploring examples with answers of the 3D Pythagorean theorem.

See examples

## 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 cx, 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.

$latex {{c}^2}={{a}^2}+{{b}^2}$

$latex {{c}^2}={{x}^2}+{{y}^2}$

$latex {c}= \sqrt{{{x}^2}+{{y}^2}}$

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, ch, and z.

Here is the solution below:

$latex h^2={{c}^2}+{{z}^2}$

$latex {{h}^2}=(\sqrt{x^2+y^2})^2+{{z}^2}$

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

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.

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.

$latex {{c}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{c}^2}={{(4)}^2}+{{(4)}^2}+{{(4)}^2}$

$latex {{c}^2}=16 + 16 +16$

$latex c = \sqrt{48}$

$latex c = {4}\sqrt{3}$

Therefore, the length of c is $latex {4}\sqrt{3}$.

### EXAMPLE 2

Find the length of h in the prism below.

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.

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{h}^2}={{(2)}^2}+{{(3)}^2}+{{(4)}^2}$

$latex {{h}^2}=4 + 9 +16$

$latex h = \sqrt{29}$

Therefore, the length of h is $latex \sqrt{29}$.

### EXAMPLE 3

Find the length of h in this prism below.

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

We substitute these values in the formula:

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{h}^2}={{(2)}^2}+{{(3)}^2}+{{(2\sqrt{3})}^2}$

$latex {{h}^2}=4 + 9 +12$

$latex h = \sqrt{25}$

$latex h = 5$

Therefore, the length of h is 5.

### EXAMPLE 4

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

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

We substitute these values in the formula:

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{h}^2}=(2)^2+(3\sqrt{3})^2+(2\sqrt{3})^2$

$latex {{h}^2}=4 + 27 +12$

$latex h = \sqrt{43}$

Therefore, the length of h is $latex \sqrt{43}$.

### EXAMPLE 5

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

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 $latex 2\sqrt{3}$ 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:

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{h}^2}={{x}^2}+{{x}^2}+{{x}^2}$

$latex {{h}^2}={{3x}^2}$

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

$latex {{3x}^2}={{h}^2}$

$latex {{3x}^2}={{({2}\sqrt{3})}^2}$

$latex {{x}^2}=\frac{{({{2}\sqrt{3})}^2}}{3}$

$latex {{x}^2}=\frac{12}{3}$

$latex {{x}^2}= 4$

$latex {x}= 2$

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.

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:

$latex {{h}^2}={{x}^2}+{{y}^2}+{{z}^2}$

$latex {{h}^2}={{(3)}^2}+{{(3)}^2}+{{(3)}^2}$

$latex {{h}^2}=9 + 9+ 9$

$latex h = \sqrt{27}$

$latex h= 3\sqrt{3}$

Therefore, the length of h is $latex 3\sqrt{3}$ 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.

#### Find the side length of the cube that has a diagonal with a length of $latex \sqrt{3}$ m.  