The Pythagorean Theorem in Three Dimensions

Suppose a box is 24 inches long, 15 inches wide, and 12 inches tall.  A thin rod is placed in this box so one end is at one corner and the other end at the opposite corner:

If we look at the shadow of the rod on the bottom of the box, its length can be found by the Pythagorean Theorem:

Now the shadow and the right edge of the box are legs of a right triangle, so we can use the Pythagorean Theorem again to find the length of the rod:

 

In general, if the length, width and height of a right, rectangular prism (a box) have lengths a, b and c, then the length, d, of the longest diagonal is given by the following three-dimensional version of the Pythagorean Theorem: