The Pythagorean Theorem in 3D – Diagonal of a Cuboid and a Cube

The Pythagorean Theorem in 3D – Diagonal of a Cuboid and a Cube

The Pythagorean Theorem in 3D

The Pythagorean theorem also works in three-dimensional space. Most often we use it to compute the space diagonal of a cuboid or a cube – that is, the segment that connects two opposite vertices of the solid.


Table of contents


The space diagonal of a cuboid

Imagine a cuboid with dimensions , , . The space diagonal is the segment connecting two opposite vertices – the longest segment that fits inside the cuboid.

The computation is done in two steps:

  1. First we compute the face diagonal on the base of the cuboid (a rectangle with sides , ):
  2. Then we apply the Pythagorean theorem a second time in the right triangle formed by the face diagonal, the space diagonal, and the height of the cuboid :

  3. Formula for a cuboid

    > 💡 Just square all three dimensions, add them, and take the square root. It's essentially an "extended" Pythagorean theorem.


    Formula for a cube

    A cube is a special case of a cuboid where . The formula therefore simplifies to:


    Solved examples

    Example 1: A cuboid has dimensions cm, cm, cm. Compute its space diagonal.

    Answer: The space diagonal of the cuboid is cm.


    Example 2: A cuboid has dimensions cm, cm, cm.


    Example 3: A cube has edge cm. What is the length of its space diagonal?

    Answer: The space diagonal of the cube is approximately cm.


    Example 4 (from real life): Will a wooden rod m long fit inside a box with dimensions m?

    It is enough to compare the length of the rod with the space diagonal of the box:

    A rod m long will fit in the box, because its longest diagonal is approximately m.


    Practice