Shortest Path Intuition Examples in Math

Start with the recap, study the fully worked examples, then use the practice problems to check your understanding of Shortest Path Intuition.

This page combines explanation, solved examples, and follow-up practice so you can move from recognition to confident problem-solving in Math.

Concept Recap

The minimum-length route connecting two points, whose form depends on the geometry of the underlying space.

On a flat surface the straight line is always the shortest path between any two points.

Read the full concept explanation โ†’

How to Use These Examples

  • Read the first worked example with the solution open so the structure is clear.
  • Try the practice problems before revealing each solution.
  • Use the related concepts and background knowledge badges if you feel stuck.

What to Focus On

Core idea: The shortest route between two points is a straight line on a flat plane but bends to fit a curved or obstacle-filled space.

Common stuck point: The procedure for shortest path intuition is the easy part; the trap is assuming the straight line is always shortest. Asking "Am I finding the least-distance route in a space where a straight line may not be allowed or shortest?" first is what keeps a correct-looking calculation from being attached to the wrong concept.

Sense of Study hint: Ask: Am I finding the least-distance route in a space where a straight line may not be allowed or shortest?

Worked Examples

Example 1

medium
A river runs along the xx-axis. Town AA is at (2,3)(2, 3) and town BB is at (8,5)(8, 5), both north of the river. A pumping station on the river at point P(x,0)P(x, 0) connects to both towns. Find xx that minimises the total pipe length AP+PBAP + PB.

Answer

P=(4.25,โ€…โ€Š0)P = (4.25,\; 0); minimum pipe length =โˆฃABโ€ฒโˆฃ=(8โˆ’2)2+(โˆ’5โˆ’3)2=100=10= |AB'| = \sqrt{(8-2)^2+(-5-3)^2} = \sqrt{100} = 10 units.

First step

1
Step 1: Reflect BB across the river (xx-axis) to get Bโ€ฒ(8,โˆ’5)B'(8, -5).

See the full worked solution + why-it-works coaching

SetupKey insightWhy it worksCommon pitfallConnection

Unlock answer keys One Family plan โ€” every worked solution, all subjects

Example 2

hard
What is the shortest path between two points in the Euclidean plane, and why? Then explain why the shortest path on the surface of a sphere is a great circle arc.

Example 3

medium
Reflection trick: a point A=(1,4)A = (1, 4) must connect to a point B=(7,2)B = (7, 2) via the line y=0y = 0. Minimize AP+PBAP + PB where PP is on the xx-axis.

Example 4

medium
An ant on the outside of a closed cylinder (r=1r=1, height 44) walks from the bottom rim point AA to the top rim point BB directly above AA, going around the cylinder once. Find the shortest path length.

Example 5

medium
Snell's law / refraction analogy: a swimmer at (0,4)(0, 4) on land wants to reach a drowner at (8,โˆ’3)(8, -3) in water. The land/water boundary is the xx-axis. The swimmer runs at 55 m/s on land and swims at 33 m/s. What entry point P=(x,0)P = (x, 0) minimizes total time?

Example 6

medium
A fly is at one corner of a closed 3ร—4ร—53 \times 4 \times 5 box. What is the shortest surface path to the diagonally opposite corner?

Example 7

hard
A river is a strip of width 22 between y=0y = 0 and y=2y = 2. Town A=(0,5)A = (0, 5) is north of the river and town B=(10,โˆ’3)B = (10, -3) is south. A bridge must be built perpendicular to the river (so it has length 22). Find the total minimum road length Aโ†’A \to bridge โ†’B\to B.

Example 8

hard
Reflective shortest path: a billiard ball at (2,3)(2, 3) must bounce off the wall y=0y = 0 then hit the pocket at (8,1)(8, 1). Find the bounce point.

Example 9

challenge
Steiner point: three towns sit at the vertices of an equilateral triangle of side 11. Find the shortest total length of a road system connecting all three (the Steiner tree).

Practice Problems

Try these problems on your own first, then open the solution to compare your method.

Example 1

easy
What is the shortest distance from point P(4,3)P(4, 3) to the origin? Justify that the straight line gives the minimum.

Example 2

hard
An ant on the surface of a unit cube wants to travel from vertex A=(0,0,0)A = (0,0,0) to the opposite vertex B=(1,1,1)B = (1,1,1) along the surface. What is the shortest surface path, and what is its length?

Example 3

easy
On a flat surface, what is the shortest path between two points?

Example 4

easy
On the surface of the Earth (a sphere), the shortest path between two cities is called a what?

Example 5

easy
Is a winding road between two towns the shortest path?

Example 6

easy
The shortest path between (0,0)(0,0) and (3,4)(3,4) on a plane has what length?

Example 7

easy
An ant must crawl along the surface of a box to reach the opposite corner. Can it go in a straight line through the box?

Example 8

easy
Why is a straight line the shortest path between two points on a plane (intuitively)?

Example 9

easy
Flight paths on a globe often curve toward the poles on a flat map. Why?

Example 10

easy
Light travels between two points by the shortest path in uniform air. What shape is that path?

Example 11

medium
A spider and a fly are on opposite walls of a room. To find the spider's shortest crawling path along the walls, what technique helps?

Example 12

medium
A person at (0,3)(0, 3) must touch the river (the xx-axis) then reach (8,5)(8, 5). What technique finds the shortest such path?

Example 13

medium
On a sphere, is the equator a shortest path between two points on it?

Example 14

medium
Why can the shortest path differ between a flat map and the real curved Earth?

Example 15

medium
A delivery robot must visit point A, then B, then return home, all on a flat grid. Within that order, what makes each leg shortest?

Example 16

medium
On a cylinder, the shortest path between two points (wrapping around) becomes a straight line when you do what?

Example 17

medium
Two points are 3 apart horizontally and 4 apart vertically on a wall. A bug crawls only horizontally and vertically (grid path). What is the shortest grid-path length, and how does it compare to the straight-line distance?

Example 18

medium
Why does the shape of the underlying space change what 'shortest path' means?

Example 19

challenge
A box is 12 long, 4 wide, 3 tall. An ant crawls from one bottom corner to the opposite top corner along the surface. Using unfolding, find the shortest path length.

Example 20

challenge
A cow at (2,5)(2, 5) must drink from a straight river along the xx-axis, then reach the barn at (10,3)(10, 3). Find the minimum total distance.

Example 21

challenge
Explain why three soap films meeting at a point always form 120ยฐ angles, connecting it to shortest-path/least-area ideas.

Example 22

challenge
Why is the straight-line shortest path on a plane equivalent to the statement of the triangle inequality?

Example 23

easy
Find the shortest distance between (0,0)(0,0) and (6,8)(6,8) on a flat plane.

Example 24

easy
Find the straight-line distance from (1,2)(1, 2) to (7,10)(7, 10).

Example 25

easy
On a 2D grid, you can only move along streets (horizontal or vertical, no diagonals). What is the shortest 'taxicab' distance from (0,0)(0,0) to (3,4)(3,4)?

Example 26

easy
Find the straight-line distance in 3D from (0,0,0)(0,0,0) to (2,3,6)(2, 3, 6).

Example 27

medium
On a grid with diagonal moves allowed (each step is one unit in a cardinal or diagonal direction), what is the shortest number of steps from (0,0)(0,0) to (5,8)(5, 8)?

Example 28

medium
An ant on the surface of a 1ร—1ร—11\times 1\times 1 cube goes from one corner to the diagonally opposite corner along the surface. What is the shortest such path length?

Example 29

medium
On a flat plane, a path goes from (0,0)(0,0) to (3,0)(3,0) to (3,4)(3,4). What is the path length, and what is the shortest direct length?

Example 30

medium
Two points on Earth (radius 63716371 km) are 1.01.0 radian apart along a great circle. Estimate the great-circle distance.

Example 31

medium
In a maze (graph), what algorithm finds the shortest path in number of edges from start to goal?

Example 32

hard
Point A=(0,5)A = (0, 5) and point B=(12,5)B = (12, 5) are on the same side of the xx-axis. A path goes Aโ†’Pโ†’BA \to P \to B where PP is on the xx-axis. Find PP that minimizes the total length.

Example 33

hard
An ant on the outside of a cone (slant height 1010, base radius 33) walks from a point on the base back to the same point going once around. Find the shortest path length.

Example 34

hard
An ant on a cylinder of radius 11 goes from (1,0,0)(1, 0, 0) to (โˆ’1,0,5)(-1, 0, 5) (the diametrically opposite point, 55 units up). Find the shortest surface path length.

Example 35

hard
On a graph with vertices A,B,C,DA, B, C, D and edges AA-BB (weight 11), AA-CC (weight 44), BB-CC (weight 22), CC-DD (weight 11), BB-DD (weight 55), find the shortest weighted path from AA to DD.

Related Concepts

Background Knowledge

These ideas may be useful before you work through the harder examples.

distance formal