Skip to content
Matheminate
TopicsProgressWorksheetsGamesLabToolsAbout
Home/OlympiadMath Olympiad Practice/The Longest Stick
GeometryIntermediate

The Longest Stick

Skill: using Pythagoras twice, in two planes

Problem

A box with a lid is 3 cm wide, 4 cm deep, and 12 cm tall.

What is the length of the longest thin straight stick that can lie completely inside the box?

Hints

Hint 1

Start on the floor of the box. What is the longest straight line you can draw on that 3-by-4 rectangle?

Hint 2

That floor diagonal, together with a vertical edge of the box, forms another right triangle. Which two lengths are its legs?

Hint 3

Apply Pythagoras twice. Once for the floor, once for the space diagonal.

Solution

  1. 1

    Start on the floor.

    The floor is a 3 by 4 rectangle. The longest straight line on it is the diagonal, and Pythagoras gives √(3² + 4²) = √25 = 5 cm.

  2. 2

    Stand a triangle on that diagonal.

    The longest line in the box runs from a bottom corner to the opposite top corner. Use the floor diagonal as one leg of a new right triangle. The other leg is a vertical edge of length 12 cm. The vertical edge is perpendicular to the floor, so it is perpendicular to the floor diagonal as well, which is what makes the new triangle right-angled.

  3. 3

    Apply Pythagoras again.

    The space diagonal is √(5² + 12²) = √(25 + 144) = √169 = 13 cm.

  4. 4

    Compare with the one-step form.

    Squaring twice and adding gives 3² + 4² + 12² = 9 + 16 + 144 = 169, so the answer is √169 = 13. The shortcut is this same calculation rearranged, not a separate rule.

  5. 5

    Why this is the longest.

    Any straight line inside the box has length at most the distance between the two farthest points. The farthest pair is a pair of opposite corners, and the line joining them lies inside the box, so 13 cm is both achievable and the maximum. A stick of that length would just touch both corners.

Answer: 13 cm.

Why this works

Each application of Pythagoras needs a genuine right angle. The second step is valid because a vertical edge is perpendicular to every line in the horizontal floor, including the floor diagonal. Without that right angle the triangle would not be right-angled and Pythagoras would not apply.

Adding the three dimensions, 3 + 4 + 12, is the usual mistake. Lengths along different directions do not add like distances on one line; their squares add instead.

Try a related problem

A box is 2 cm by 3 cm by 6 cm. How long is its longest internal stick?

7 cm. The floor diagonal is √(2² + 3²) = √13. The space diagonal is √(13 + 6²) = √(13 + 36) = √49 = 7 cm. The direct form gives the same thing: √(4 + 9 + 36) = √49 = 7. The answer is a whole number here, which is a sign the arithmetic is clean.

← All Olympiad problems

Matheminate

Free math practice for Grades 4–12.

© 2026 Matheminate. All rights reserved.

Practice

  • Topics
  • Interactive Lab
  • Math Articles
  • Olympiad Practice

Site

  • About
  • Contact
  • Support
  • Privacy
  • Terms

Follow

  • Instagram
  • X