The Pythagorean theorem in three dimensions
A rod has to go into a box corner to corner, rising as it crosses. How long can it be?
Where you are 18 in Triangles
When you reach for it
The Pythagorean theorem is about a flat triangle with a right angle. In using the theorem the right triangle always sat in one flat picture: a ladder against a wall, a path across a field. Many lengths in the world do not lie flat. A rod laid corner to corner in a box rises as it crosses the box. The point of a pyramid sits above the middle of its base. No face of the solid contains these lengths, so no right triangle with them as a side is drawn for you.
The move is to find a right triangle that stands up inside the solid. Usually one of its legs is not given either, so you first find that leg from a second right triangle lying flat in a face. The theorem is used twice: once across a face, then once more through the inside.
Reach for it when:
- the length you want joins two corners of a box that are not on the same face;
- something long has to fit inside a box, a tank or a crate;
- a pyramid gives you one of its height, its slant height or its sloping edge, and you need another.
The procedure
Naming the parts of a box
A box, called a rectangular prism in prisms and pyramids, has a length l, a width w and a height h. Every face is a rectangle. A face diagonal joins opposite corners of one face. A space diagonal joins two corners that do not share a face, so it runs through the inside of the box. A box has four space diagonals, one from each bottom corner to the top corner furthest from it, and they all have the same length.
First triangle: across the floor
The floor is a rectangle l by w. Its diagonal f, with an edge l and an edge w, makes a triangle whose angle between l and w is a corner of the rectangle, so it is a right angle. The theorem gives
You do not need f itself, only f^2, because the next step squares it again. Keep f^2 exact.
Second triangle: up through the box
Now look at three lengths: the floor diagonal f, the vertical edge h standing at the far end of f, and the space diagonal d from the near end of f to the top of that edge. They make the shaded triangle in the figure, and its angle between f and h is a right angle.
Here is why. The two walls that meet along that edge are rectangles, so the edge meets each of the two floor edges at its foot at a right angle. A line perpendicular to two different lines of a flat surface, where they cross, is perpendicular to every line in that surface through its foot. Think of a flagpole standing straight up on flat ground: a straight path drawn on the ground from its foot meets the pole at a right angle whichever way the path runs. The floor diagonal is one such path.
So f and h are the legs and d is the hypotenuse:
The two steps as one
Put f^2 = l^2 + w^2 into the second equation:
and since a length is positive, \displaystyle d = \sqrt{l^2 + w^2 + h^2}. The square of the space diagonal is the sum of the squares of the three edges that meet at a corner. Crossing a wall first instead of the floor adds the same three squares in a different order, so it gives the same answer.
The diagonal of a cube
A cube is a box with all three edges equal to s. Then d^2 = s^2 + s^2 + s^2 = 3s^2, and
using \displaystyle \sqrt{ab} = \sqrt{a}\,\sqrt{b} for positive numbers. Since \displaystyle \sqrt{3} \approx 1.732, a cube’s space diagonal is a little under 1.75 times its edge.
Why the space diagonal is the longest rod
Take any straight rod inside the box. Its two ends are some distance a apart along the length, b along the width and c up the height, so by the same two steps its length squared is a^2 + b^2 + c^2. Each gap fits inside the box, so a \le l, b \le w, c \le h, and the rod’s length squared is at most l^2 + w^2 + h^2. No straight rod inside the box is longer than the space diagonal.
A square pyramid
A square pyramid whose apex V is directly above the center O of its square base has three lengths that people want, and they are easy to mix up:
- the height h, from V straight down to O, inside the solid;
- the slant height \ell, from V down the middle of a face to M, the midpoint of a base edge;
- the lateral edge e, from V down to a corner B of the base.
Two right triangles connect them. Write s for the base edge.
Inside, triangle VOM, with its right angle at O. The segment VO stands straight up from the base, so it is perpendicular to OM, a line in the base through its foot: the flagpole again. The leg OM runs from the center of the square to the middle of a side, which is half a side, \displaystyle \frac{s}{2}. So \displaystyle h^2 + \left(\frac{s}{2}\right)^2 = \ell^2.
On a face, triangle VMB, with its right angle at M. Each face is an isosceles triangle, since its two sloping sides are both lateral edges. The segment VM cuts the face into two triangles with matching sides (VM shared, MA = MB, VA = VB, where A is the base edge’s other end), so they are congruent by SSS and their angles at M are equal. Two equal angles making a straight line are each 90^\circ. The leg MB is half a base edge, so \displaystyle \ell^2 + \left(\frac{s}{2}\right)^2 = e^2.
Worked examples
The space diagonal of a shipping box
A shipping box measures 12 cm by 16 cm across the floor and 21 cm high, inside. How long is a space diagonal?
SolutionFloor first. The floor is a rectangle, so its diagonal f is the hypotenuse of a right triangle with legs 12 and 16:
Then up. The 21 cm edge stands straight up at the end of the floor diagonal, so it is perpendicular to it, and f and 21 are the legs of a right triangle with hypotenuse d:
Check with the one-line form: 12^2 + 16^2 + 21^2 = 144 + 256 + 441 = 841 = 29^2. Each space diagonal of the box is 29 cm.
A curtain rod in a box
Rafferty has to post a curtain rod 92 cm long, in one piece. His shipping box is 30 cm by 50 cm across the floor and 75 cm high, inside. Does the rod fit lying flat on the floor? Along the diagonal of a side? Corner to corner through the box?
SolutionEach place the rod could lie is a diagonal, so find all three.
The floor is 30 by 50:
so \displaystyle f = \sqrt{3400} \approx 58.3 cm. Far too short.
The largest side face is 50 by 75. Its diagonal g has g^2 = 50^2 + 75^2 = 2500 + 5625 = 8125, so g \approx 90.1 cm. Still about 2 cm short. The other side face, 30 by 75, is smaller still: \displaystyle \sqrt{900 + 5625} = \sqrt{6525} \approx 80.8 cm.
Through the box, the second triangle has legs f and 75. Use f^2 = 3400 as it stands:
and d = 95 cm, since 95^2 = 9025. The rod fits, but only corner to corner, rising as it crosses the box, with 3 cm to spare.
The longest thermometer stick in a fish tank
Saskia-Mae’s fish tank is 50 cm long, 25 cm wide and 30 cm tall, inside. What is the longest straight thermometer stick that fits completely inside the tank with its lid closed?
SolutionThe longest straight segment inside a box is a space diagonal. Across the bottom,
and up through the tank, with the 30 cm edge as the other leg,
so \displaystyle d = \sqrt{4025} \approx 63.4 cm. The exact value can be tidied with a simpler square root: \displaystyle \sqrt{4025} = \sqrt{25 \cdot 161} = 5\sqrt{161}.
This is why f^2 is kept exact. The floor diagonal is \displaystyle \sqrt{3125} \approx 55.90 cm. Rounding it to 56 first gives 56^2 + 30^2 = 3136 + 900 = 4036, and \displaystyle \sqrt{4036} \approx 63.5, wrong in the first decimal place. Round once, at the end. The longest stick is about 63.4 cm.
How tall is the box?
Tobias has a box whose floor is 28 cm by 21 cm. He stretches a string from a bottom corner to the opposite top corner and finds a space diagonal of 37 cm. How tall is the box?
SolutionThe floor diagonal comes first, as before:
In the second triangle the hypotenuse is now known and a leg is not. The legs are 35 and h, the hypotenuse is 37, so
The box is 12 cm tall. Check: 28^2 + 21^2 + 12^2 = 784 + 441 + 144 = 1369 = 37^2.
The diagonal of a storage cube
Una’s storage cube has inside edges of 50 cm. (a) What is the longest straight rod it holds? (b) What is the smallest cube that holds a pole 1 m long?
Solution(a) All three edges are 50, so
and \displaystyle d = \sqrt{7500} = \sqrt{2500} \cdot \sqrt{3} = 50\sqrt{3}. With \displaystyle \sqrt{3} \approx 1.732, that is 50 \times 1.732 = 86.6 cm.
(b) A cube of edge s holds a rod up to \displaystyle s\sqrt{3} long. Working in centimeters, the pole fits when \displaystyle s\sqrt{3} \ge 100, that is, when
A cube with 58 cm edges works, since \displaystyle 58\sqrt{3} \approx 100.46, and one with 57 cm edges does not, since \displaystyle 57\sqrt{3} \approx 98.73.
The glass pyramid roof
Vidar is fitting a glass roof shaped like a square pyramid. The base is a square with 8 m sides, each of the four sloping edges is 9 m, and the apex is directly above the center of the base. Find the slant height of a face and the height of the roof.
SolutionName the points as in Figure 3: apex V, center of the base O, a base corner B and the midpoint M of a base edge through B.
The slant height lies on a face, so use the face triangle VMB. It has its right angle at M, because the face is isosceles and M is the midpoint of its base. Its hypotenuse is the sloping edge 9 and one leg is half the base edge, 4:
The height lies inside, so use the triangle VOM. It has its right angle at O, because VO stands straight up from the base. Its hypotenuse is the slant height just found, and one leg is OM, from the center to the middle of a side, again half the base edge, 4:
The slant height is about 8.06 m and the height is 7 m.
Check by a different pair of triangles. The base diagonal has square 8^2 + 8^2 = 128, so half of it, from O to the corner B, has square \displaystyle \frac{128}{4} = 32. The triangle VOB is right-angled at O with hypotenuse 9, so h^2 = 81 - 32 = 49 again.
Boundaries
The box must be rectangular. Every step used a right angle: at the corner of the floor, and where the vertical edge meets the floor. A slanted box, such as a carton squashed so that it leans, has a floor that is a parallelogram and edges that do not stand straight up. Neither triangle is right-angled, and \displaystyle \sqrt{l^2 + w^2 + h^2} gives a wrong length.
Inside measurements for what fits inside. A rod sits inside the walls, so use the box’s inside length, width and height. Outside measurements give a number that is too big.
A rod with no thickness. The space diagonal is the longest line segment inside the box. A real rod has thickness and hits the walls near the corners, so a thick rod only just shorter than the diagonal may not fit. The space diagonal is an upper limit, not a promise.
The pyramid’s apex above the center, on a square base. The triangle VOM is right-angled at O only because O, the center, is the foot of the height, and OM is half a side only because the base is a square. If the apex is off-center, the faces have different slant heights. If the base is a rectangle that is not a square, O is a different distance from the long sides and the short sides, so there are two slant heights.
One unit throughout. A box measured in centimeters and meters at once must be converted before anything is squared.
Where this goes next
The two steps here are the whole idea behind distance in space. In the plane, the distance formula is the theorem used once, on a right triangle whose legs are the gaps in x and in y. In space, coordinates in three dimensions add a third gap, in z, and the distance between two points is exactly the space diagonal of the box whose edges are the three gaps:
The magnitude of one of the vectors in space is the same square root.
The pyramid lengths come back straight away. Surface area needs the slant height and volume needs the height, so a problem that gives one and asks for the other runs through the triangle VOM.
Exercises
The space diagonal of a box
Find the length of a space diagonal of each box.
- A box 6 cm by 8 cm by 24 cm.
- A box 20 cm by 60 cm by 90 cm.
- A box 30 cm by 20 cm by 10 cm. Give the exact value and a decimal to one place.
- A crate 1.2 m by 0.9 m by 0.8 m.
Will it fit?
- Willemijn wants to post a curtain rod 1.25 m long in a shipping box that is 50 cm by 40 cm by 1 m inside. Will it fit?
- A fish tank is 80 cm by 35 cm by 45 cm inside. Will a thermometer stick 1 m long fit completely inside with the lid closed?
- A storage cube has inside edges of 40 cm. What is the longest straight stick it holds? Give the exact value and a decimal to one place.
Working backwards
- A box has a floor 9 cm by 12 cm and a space diagonal of 25 cm. How tall is it?
- A box has a square floor, a height of 7 cm and a space diagonal of 9 cm. How long is a side of the floor?
- A cube has a space diagonal of 12 cm. How long is its edge? Give the exact value and a decimal to two places.
Square pyramids
Each pyramid has a square base and its apex directly above the center of the base.
- The base edges are 14 m and the sloping edges are 25 m. Find the slant height and the height.
- The base edges are 6 cm and the height is 4 cm. Find the slant height and the length of a sloping edge.
- A glass pyramid roof has base edges of 12 m and a slant height of 10 m. Find its height and the length of a sloping edge.
Explain why
- In a box, the floor diagonal f, the vertical edge h at its far end and the space diagonal d make a triangle. Explain why the angle between f and h is a right angle, and why the angle between f and d is not.
- Explain why the space diagonal of a box is longer than every edge and every face diagonal.
- A storage cube has edges of 1 m. Show that a rod 1.7 m long fits inside it and a rod 1.8 m long does not. Then explain why the space diagonal is not 3 m, even though d^2 = 1^2 + 1^2 + 1^2 = 3.
Answers
- 26 cm. Across the floor, f^2 = 6^2 + 8^2 = 100. Up through the box, d^2 = 100 + 24^2 = 100 + 576 = 676, and 26^2 = 676.
- 110 cm. d^2 = 400 + 3600 + 8100 = 12100, and 110^2 = 12100.
- \displaystyle \sqrt{1400} = 10\sqrt{14} \approx 37.4 cm. d^2 = 900 + 400 + 100 = 1400.
- 1.7 m. d^2 = 1.44 + 0.81 + 0.64 = 2.89, and 1.7^2 = 2.89.
- No. In centimeters, d^2 = 2500 + 1600 + 10000 = 14100, so d \approx 118.7 cm, shorter than the 125 cm rod.
- No. d^2 = 6400 + 1225 + 2025 = 9650, so d \approx 98.2 cm, shorter than 100 cm.
- \displaystyle 40\sqrt{3} \approx 69.3 cm. d^2 = 3 \cdot 40^2 = 4800, and \displaystyle \sqrt{4800} = 40\sqrt{3}.
- 20 cm. f^2 = 9^2 + 12^2 = 225, then h^2 = 25^2 - 225 = 625 - 225 = 400.
- 4 cm. With floor side s, s^2 + s^2 + 7^2 = 81, so 2s^2 = 32, s^2 = 16.
- \displaystyle 4\sqrt{3} \approx 6.93 cm. 3s^2 = 144, so s^2 = 48 and \displaystyle s = \sqrt{48} = 4\sqrt{3}.
- Slant height 24 m, height \displaystyle \sqrt{527} \approx 22.96 m. On a face, \ell^2 = 25^2 - 7^2 = 576. Inside, h^2 = 576 - 7^2 = 527.
- Slant height 5 cm, sloping edge \displaystyle \sqrt{34} \approx 5.83 cm. Inside, \ell^2 = 4^2 + 3^2 = 25. On a face, e^2 = 25 + 3^2 = 34.
- Height 8 m, sloping edge \displaystyle \sqrt{136} \approx 11.66 m. Inside, h^2 = 10^2 - 6^2 = 64. On a face, e^2 = 10^2 + 6^2 = 136.
- The two walls meeting along the edge h are rectangles, so h meets both floor edges at its foot at right angles; it is therefore perpendicular to every line in the floor through its foot, f included. The angle between f and d cannot also be right: the angles of a triangle add to 180^\circ, so a triangle with one right angle has no room for a second.
- In a right triangle the hypotenuse is longer than either leg, since d^2 = f^2 + h^2 is bigger than f^2 and than h^2. Any face diagonal is a leg of an upright right triangle whose hypotenuse is a space diagonal, so it is shorter than the space diagonal. Any edge is a leg of a right triangle on a face whose hypotenuse is a face diagonal, so it is shorter still.
- d^2 = 3, so \displaystyle d = \sqrt{3} \approx 1.732 m. Since 1.7 < 1.732 the 1.7 m rod fits, and since 1.8 > 1.732 the 1.8 m rod does not. The sum 3 is the square of the diagonal, so the last step is a square root. Three edges end to end make a bent path between the same two corners, and the straight diagonal is shorter, so it must be less than 3 m.