Not sure which lesson to do first? Find your level and get a plan →

Math · Geometry Fundamentals · Grade 9-12

Shortest Path Intuition

Shortest path intuition asks for the minimum-length route between two points, where the route's shape depends on the space.


Quick Answer

Shortest path intuition asks for the minimum-length route between two points, where the route's shape depends on the space. On an open flat plane the answer is a straight line, but on the surface of a box, a can or the Earth, or around an obstacle, that straight line may be forbidden. Then you flatten the surface (unfold the box, unroll the can), follow a great circle on a sphere, or pass the obstacle at its corners in straight pieces.

Why This Matters

Flight routes, cables run along walls, and robots steering around furniture all depend on it. A flight from New York to Madrid follows a great circle that looks curved on a flat map, yet it is hundreds of kilometres shorter than flying due east. Without the idea, people measure straight through walls or solids, or trust the line that looks straight on a map.

Intuitive Explanation

An ant sits on one corner of a closed cardboard box and wants to reach the far top corner. It cannot tunnel through, so the straight line through the inside is useless. Its route along the surface looks bent as it folds over an edge. Unfold the two faces it crosses into one flat rectangle, though, and the best route is a straight line again, which the Pythagorean theorem can measure.

Unfolding works because it does not stretch the surface: every path on the box keeps its length on the flat net. On a flat sheet straight is shortest, so the shortest path on the box is the one that becomes straight when unfolded. A can works the same way: unroll its side into a rectangle. A sphere cannot be flattened without stretching, so there the shortest path is an arc of a great circle, a circle centered at the sphere's center, like the equator.

Obstacles change the answer too. To get past a building, the shortest path runs straight to a corner, then straight on from there, hugging the corner like a string pulled tight around a post.

On an open flat field none of this is needed: the straight segment and the distance formula give the answer at once. The special thinking matters only when the straight segment is blocked or leaves the surface. One caution: a box can be unfolded in several ways, and each gives a different straight line. Measure each one and keep the smallest.

Think of it like this. A shortest path behaves like a string pulled tight between two pins: on a flat board it snaps straight, laid over a box it lies flat across the faces, and on a ball it settles along a great circle. A tight string only finds the best route nearby, though, and can get caught on the wrong side of an obstacle.

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.


When to Use

Use shortest-path thinking when a problem asks for the least distance or shortest route and the path must stay on a surface (a box, a can, the Earth) or go around an obstacle. Unfold or unroll flat-faced and cylindrical surfaces, use great circles on spheres, and pass obstacles at their corners. If both points sit on an open flat plane, just use the distance formula; if the question is the distance around a closed shape, that is perimeter.

Tip. Ask: Am I finding the least-distance route in a space where a straight line may not be allowed or shortest?

How to Recognize It

Before measuring a route, identify where the path is allowed to go: across open flat ground, only along a surface, or around something it cannot pass through.

  1. Can the straight segment between the two points actually be travelled?

    If yes, the distance formula gives the answer and nothing more is needed. If that segment would pass through a solid, a wall or the inside of the Earth, you need the shortest allowed route instead.

  2. Does the path have to stay on the faces of a box or the side of a cylinder?

    If yes, unfold or unroll the surface into a flat net and draw a straight line on it; try each way of unfolding, because different nets give different lengths. A sphere cannot be flattened, so on a sphere use a great-circle arc.

  3. Must the path touch a line along the way, such as a river where a horse drinks before reaching the barn?

    If yes, reflect the destination across that line and draw a straight segment to the reflected point; where it crosses the line is the best place to touch. A light ray bouncing off a mirror follows the same rule.

  4. Is the question about going all the way around a shape rather than from one point to another?

    If yes, it is perimeter, a fixed total rather than a route you choose. If it asks only why going direct beats a detour, the reason is the triangle inequality.

Shortest Path Intuition compared with Distance formula, Perimeter, and Triangle inequality

Each row is about lengths along paths, and the triangle inequality even explains why straight is short. Ask whether the straight segment is allowed: if yes, use the distance formula; if the path is restricted, find the shortest route; if you go all the way around, it is perimeter.

Shortest Path Intuition

Meaning
Use this when you need the minimum-length route and the space is curved, obstructed, or restricted to a surface.
Key test
Am I finding the least-distance route in a space where a straight line may not be allowed or shortest?
Example
An ant on a corner of a 3×3×1 box must reach the opposite top corner along the surface. What is the shortest route?

Distance formula

Meaning
Gives the straight-line length between two points on a flat plane.
Key test
Use when the plane is open and a straight segment is a valid path.
Formula
(x2−x1)2+(y2−y1)2
Example
Distance from (0,0) to (3,4)

Perimeter

Meaning
Measures the full distance around a shape, not the route between two points.
Key test
Use when you want the total boundary length, not a connection.
Formula
P=2(l+w)
Example
Fencing around a yard

Triangle inequality

Meaning
States any one side is shorter than the other two combined — a why, not a route.
Key test
Use to justify that a direct hop beats a detour, not to find the path.
Formula
a+b>c
Example
Walking diagonally beats two legs of an L

Formula & Notation

Worked Examples

Example 1 — Ant on a box

Easy

An ant on a corner of a 3×3×1 box must reach the opposite top corner along the surface. What is the shortest route?
Show the steps and the answer
  1. Rule out the straight line through the box, 32+32+12=19≈4.36.

    That line passes through the inside, so it is shorter than any surface route but not allowed.

  2. Unfold a side face (3 by 1) and the top (3 by 3) into one flat rectangle, 3 wide and 1+3=4 long.

    Unfolding keeps every surface length the same, and on a flat sheet the straight line is the shortest route.

  3. Measure that rectangle's diagonal: 32+42=25=5.

    The start and end corners are opposite corners of the unfolded rectangle.

  4. Check the other unfolding: two side faces laid end to end make a rectangle 3+3=6 long and 1 wide, with diagonal 37≈6.08.

    Different unfoldings give different straight lines, and the shortest route is the smallest of them, 5.

Answer: 5 units

Takeaway: Unfold the faces the route crosses, draw the straight line, and compare every unfolding. The surface route, 5, is necessarily longer than the forbidden route through the box.

Example 2 — Open flat plane

Standard

Find the shortest path from (0,0) to (6,8) across an empty field.
Show the steps and the answer
  1. Check the space: an open, flat field with nothing in the way.

    On a flat plane with no obstacles, the straight segment is allowed, and it is the shortest route.

  2. Use the distance formula: (6−0)2+(8−0)2=36+64=100=10.

    The horizontal and vertical changes are the legs of a right triangle.

  3. Compare with walking along the axes: 6+8=14, which is longer.

    Any bent route is longer than the straight segment, as the triangle inequality says.

Answer: 62+82=10

Takeaway: On an open flat plane, no unfolding or detour is needed: the shortest path is the straight segment.

Example 3 — Find the mistake: up and around a can

Application

A can is 12 cm tall and its circumference is 16 cm. An ant on the bottom rim wants to reach the point on the top rim halfway around the can. Lena writes: "Go straight up 12 cm, then halfway around the top, 8 cm, so the shortest route is 20 cm." Find the mistake and correct it.
Show the steps and the answer
  1. Find Lena's error: she split the trip into an up part and an around part, a bent path on the surface.

    Going up and then around is like walking two sides of a triangle, and a slanted route can cut the corner.

  2. Unroll the can's side into a rectangle 16 cm wide and 12 cm tall. The start is a bottom corner; the end is 16÷2=8 cm along the top edge.

    Unrolling does not stretch the side, so lengths on the rectangle equal lengths on the can.

  3. Draw the straight line: 82+122=64+144=208≈14.4 cm.

    On the flat rectangle the straight segment is shortest; rolled back up, it becomes a slanted spiral around the can.

  4. Compare: 20−14.4=5.6, so the spiral saves about 5.6 cm.

    The improvement confirms that Lena's route was not the shortest.

Answer: 208=413≈14.4 cm

Takeaway: On a surface that can be unrolled flat, flatten it first; the shortest route is the straight line on the flat picture.

Where You'll See It

  • Flight paths between continents

    Flights from New York to Madrid follow a great circle that bows north on a flat map. It looks longer on paper, but on the globe it is hundreds of kilometres shorter than flying due east along the latitude both cities share, which saves fuel and time.

  • Running a cable along walls

    An electrician must run a cable along a wall and the ceiling, not through the air. Unfolding the wall and ceiling into one flat picture shows the shortest run as a straight diagonal, which can save metres of cable compared with following the corner.

  • Robot vacuums steering around a sofa

    A robot crossing a room with a sofa in the way plans its route in straight pieces that touch the sofa's corners, like a string pulled tight around posts. Any route that swings wider is longer.

Common Mistakes

  1. The slip: Assuming the straight line is always shortest

    Instead: on a sphere the shortest path is a great-circle arc, not a chord through the surface.

  2. The slip: Measuring distance through a solid or past a wall

    Instead: the path must stay on the allowed surface or around the obstacle.

  3. The slip: Forgetting to unfold a 3-D surface

    Instead: flatten a box or cone first, then the shortest surface path becomes a straight line.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. Find the shortest path across an open field from (1,2) to (7,10), in metres.

    Hint: With nothing in the way, the shortest path is a straight segment.

  2. In a city with a square street grid, you must walk 3 blocks east and 4 blocks north along the streets. How long is the shortest walk? How long is the straight line?

    Hint: You cannot walk through buildings. Every route must cover the east blocks and the north blocks.

  3. An ant walks on the outside of a can 12 cm tall with a circumference of 10 cm. It goes from a point on the bottom rim to the point directly opposite on the top rim. Find the shortest path.

    Hint: Unroll the side of the can into a rectangle. How far around does the ant go?

  4. A hiker at A(0,3) must touch a river along the x-axis and then reach a tent at B(8,3). Find the shortest total path and where she should touch the river.

    Hint: Reflect B across the river. The best route then becomes a straight line.

  5. A field is 30 m by 40 m. You need (a) the length of fence around it and (b) the shortest walk from one corner to the opposite corner. Which is perimeter and which is a shortest path?

    Hint: One question goes all the way around; the other goes from one point to another.

  6. Two cities on the equator are 90∘ apart in longitude. Earth's radius is 6,371 km. A student says the shortest flight is the straight chord, 6,3712≈9,010 km. Correct this.

    Hint: Can the plane go through the Earth? What path stays on the surface?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why do flights from New York to Tokyo pass near Alaska?

On a globe, the shortest route between two cities is an arc of a great circle, a circle whose center is the Earth's center. On a flat map that arc bulges toward the North Pole, so it looks like a detour, but it is shorter than the route that looks straight on the map. The great-circle route from New York to Tokyo is about 10,800 km long and runs over northern Canada and Alaska.

If straight is shortest, why does light bend when it enters water?

Light takes the quickest path, not the shortest. It travels about 25% slower in water than in air, so it bends to spend less of its trip in the slow part. A lifeguard running on sand and then swimming should do the same, running farther along the beach before entering the water. This idea, the principle of least time, is due to Pierre de Fermat.

Is the shortest path always unique?

No. Between opposite corners of a grid of city blocks, many staircase routes tie: going 3 blocks east and 2 blocks north can be done in 10 different orders, all 5 blocks long. On a sphere, the North and South Poles are joined by infinitely many shortest paths, one along every line of longitude. When there is a tie, say so and give one example.

What is taxicab distance?

It is distance measured when you may move only along grid lines, like a taxi in a city of square blocks. From (0,0)(0,0) to (3,4)(3,4) the taxi drives 3+4=73+4=7 blocks, while a bird flies the straight-line distance of 5. In general it is ∣x2−x1∣+∣y2−y1∣|x_2-x_1|+|y_2-y_1|. In this geometry, a circle, the set of points 1 unit from a center, looks like a square standing on one corner.

Learning Path

← Before

Distance
Shortest Path Intuition

You are here

Next →

Nothing after this yet
You need Distance (straight-line distance and the Pythagorean theorem) first. Shortest path intuition adds the idea that the space decides what straight means: unfold flat surfaces, follow great circles on spheres, hug the corners of obstacles. With it you can solve spider-and-fly box puzzles and compare flight routes, and later find shortest routes through networks of roads, where each link has a length.

See Also