Skip to content

← Math Further 6–8

What Is the Shortest Way to the River and Back?

Topic 19 · Grades 6–8 · Shortest paths and reflection

What this builds on from class
  • Grade 7: Transformation (reflection)
  • Grade 8: Lines and Angles
In this unit 9 sections
  1. Try it
  2. The mirror in the river
  3. Light already knows
  4. Off the side of the carrom board
  5. More puzzles of the same kind
  6. When the mirror trick breaks
  7. Where this is used
  8. Questions
  9. Where to go next

Every morning before school, Sunita takes the family’s gagri down to the river for water. Today her mother is planting in the family’s field, farther along the same side of the river, so Sunita must carry the full gagri there instead of back home.

Her home is 450 m from the river bank. The field is 150 m from the bank, and 800 m farther along it. The bank is straight here, and the ground between is open, so she can walk in a straight line from home to any spot on the bank, and from there straight to the field.

Where on the bank should she fill the gagri, so that her whole walk, home to river to field, is as short as it can be? Try it before you read on.

Try it

Home, river, field

Drag the yellow stop along the bank. The readouts show the two parts of the walk, the total, and the shortest total you have found so far.

River0 m200400600800HomeField
Home to stop
492 m
Stop to field
618 m
Total
1,111 m
Your shortest
1,111 m

Drag the stop along the bank to make the whole walk as short as you can.

Guess first. Where is the best place to stop?

Pick an answer to see why.

Try it

Stop by stop

Our script worked out the walk for a stop every 100 m along the bank, measuring from the point straight below home. (Each part of the walk is the long side of a right triangle, so its length comes from Pythagoras’ relation: for a stop 200 m along, home to stop is 2002+4502≈492 \sqrt{200^2 + 450^2} \approx 492 m.)

Stop, along the bank 0 m 100 m 200 m 300 m 400 m 500 m 600 m 700 m 800 m
Whole walk 1,264 m 1,177 m 1,111 m 1,063 m 1,029 m 1,008 m 1,000 m 1,012 m 1,068 m

Three things to notice:

  • a.The walk gets shorter and shorter, then longer again. There is one best stop, not a range of them.
  • b.Near the best stop the numbers hardly change: 500 m and 700 m are only 8 m and 12 m worse. Far from it they change fast.
  • c.The best stop, 600 m, splits the 800 m into 600 and 200. That is 3 to 1, and home and the field are 450 m and 150 m from the river: 3 to 1 again.

Try the pattern on new numbers. Home is 300 m from the river, the field 100 m, and they are 800 m apart along it. If the pattern in c is right, where is the best stop?

Pick an answer to see why.

Look at the angles

There is a second pattern, easier to see than to measure. At the best stop, look at the two straight paths where they meet the bank. Home is 450 m up and 600 m back, so the first path climbs 3 m for every 4 m along; the second climbs 150 m in 200 m, also 3 for every 4. They slope equally steeply, one on each side: the path comes down to the river at the same angle as it leaves, about 37° each. At any other stop the two angles are different.

Where have you seen that before? A ball bouncing off a wall. A ray of light bouncing off a mirror.

The mirror in the river

Here is the trick that solves the puzzle. Imagine the field reflected in the river, as if the water were a perfect mirror: a field F′ as far below the bank as the real field F is above it, straight below it.

A calm lake with forested hills and the white peaks of Machhapuchhre and the Annapurna range behind, their reflections upside down in the water
Figure 19.1 Still water is a mirror. Machhapuchhre and the Annapurna peaks over Phewa Lake, Pokhara, with the hills and peaks reflected in the lake: each reflection appears as far below the water’s surface as the thing itself is above it. Photo: Nabin845, CC BY-SA 4.0

Try it

The field’s reflection

Press Show the reflection. Then drag the stop and watch the dashed line from the stop to the reflection, and the readouts.

River0 m200400600800HomeField
Home to stop
492 m
Stop to field
618 m
Total
1,111 m
Angles with the bank
–

Press “Show the reflection” to see the field reflected in the river.

Now compare two lines from any stop P on the bank: the real path to the field, PF, and the dashed line to the reflection, PF′. They are always the same length. Here is why.

bankriverHhomeFfieldF′​the field’s reflectionPQM
Figure 19.2 Any stop P: triangles PMF and PMF′ (shaded) are the same shape and size, so the dashed PF′ is as long as PF. The shortest walk is the straight line from home H to F′, which meets the bank at Q. The three shaded angles at Q are equal.

In Figure 19.2, M is the point of the bank straight below the field. The triangles PMF and PMF′

  • share the side PM;
  • have MF = MF′, because the reflection is as far below the bank as the field is above it;
  • both have a right angle at M.

Two sides and the angle between them are the same, so the triangles are congruent (the same shape and size), and PF = PF′. This is what a reflection always does: it moves every point, but it keeps every length and every angle. You met that in Grade 7 when you reflected shapes in a line; here it does real work.

So every walk H → P → F is exactly as long as the walk H → P → F′, whichever stop you choose. And H and F′ are on opposite sides of the bank. The shortest way from H to F′ is the straight line, and it crosses the bank at one point, Q. Any other stop P bends the line at P, and a bent line is longer than a straight one.

Why is a bent line longer? H, P and F′ make a triangle, and in every triangle two sides together are longer than the third: the third side goes straight between its ends, and the other two make a detour through P. (Stretch a string tight between two pins: it is shortest when it is straight.) This is called the triangle inequality. Only when P is on the straight line HF′, at Q, do the two sides add up to exactly the third.

That is the whole proof. The method, reflect one end in the line you must touch and draw a straight line, is called the reflection trick, and the puzzle is known as Heron’s problem, after Heron of Alexandria, who solved it this way nearly two thousand years ago (see the story below).

Now with numbers

The straight line from home to F′ goes 800 m along the bank and 450 + 150 = 600 m down. So the shortest walk is

8002+6002=1,000,000=1,000 m, \sqrt{800^2 + 600^2} = \sqrt{1{,}000{,}000} = 1{,}000 \text{ m},

exactly what the table found. And where does it cross the bank? It falls 600 m in 800 m along, steadily, and it reaches the bank after falling 450 m, which is 450600=34 \tfrac{450}{600} = \tfrac{3}{4} of the way down, so 34 \tfrac{3}{4} of the way along: 34×800=600 \tfrac{3}{4} \times 800 = 600 m. That is pattern c of the table: the stop splits the distance along the bank in the same ratio as home and the field are from the river, 450 to 150. Now it isn’t a pattern any more; it is proved.

Why the angles are equal

Look at the angles at Q in Figure 19.2. The line from H through Q to F′ is straight, so the angle it makes with the bank on the left, above, equals the angle on the right, below (they are vertically opposite angles, from Grade 8’s Lines and Angles). And QF is the reflection of QF′, so it makes the same angle with the bank, above. So the path comes down to the bank and leaves it at the same angle: the equal angles of the table are no accident. The shortest walk is exactly the one where the angle in equals the angle out.

Light already knows

When light from a lamp bounces off a flat mirror into your eye, it obeys the law of reflection you met in Grade 7 Science: the angle of incidence equals the angle of reflection. Those angles are measured from the normal, the line at right angles to the mirror, but if the angles with the normal are equal, so are the angles with the mirror itself. So it is the shortest walk’s rule. Light going from the lamp to the mirror and then to your eye takes the shortest path that touches the mirror, just as Sunita’s walk does.

And it explains what you see in a mirror. Your eye can’t tell that the light bent at the mirror; it sees the light arriving in a straight line, as if from F′, the reflection. So the thing appears to be behind the mirror, as far behind as it is in front: the image of a plane mirror is exactly our F′.

Read more in Grade 7 Science, Laws of reflection of light, and try it with a torch in Law of Reflection.

Off the side of the carrom board

The same trick wins games. On a carrom board, the striker bounces off the sides almost like light off a mirror (spin and friction spoil it a little: see below). Suppose the queen sits behind another coin, so you can’t hit it straight. Where on the side should you aim, so that the striker bounces off and hits the queen?

Reflect the queen in the side, and aim straight at its image. The striker’s path to the side and on to the queen is exactly as long as the straight line to the image, and it bounces at equal angles: the mirror in the river again. One detail: the striker’s center turns 2.05 cm before the frame (half its width) when its edge touches the side, so the mirror line is that far in from the frame, not the frame itself.

Try it

Bank shot

Drag the yellow aim along the sides, and turn it a little with the buttons. Can you hit the queen? Then press Show the mirror.

queenstriker
Turn the aim:

Another coin is in the way. Turn the aim a little.

Answer

Off two sides

Now the queen is near the top-left corner, behind a crowd of coins, and no shot off one side gets through. Bounce off two sides: first the left, then the top. Reflect the queen in the left side, then reflect that image in the top side, and aim straight at the image of the image.

Why does that work? After the first bounce the striker moves as if it came from the mirror world of the left side; in that world, the top side has its own mirror image, and the second bounce is a reflection there. Unfold both bounces and the whole path is one straight line to the twice-reflected queen.

Try it

Off two sides

The coins block every straight shot and every shot off one side. Find a shot off two sides, then press Show the mirror.

queenstriker
Turn the aim:

Missed: the striker touches no coin. Drag the yellow aim along the sides.

Answer

More puzzles of the same kind

The river and the road

Sunita’s cousin lives between a river and a road that meet at an angle of 60°. Each morning he walks from home to the river, then to the road, then back home. What is his shortest round trip?

This time there are two lines to touch, and the walk starts and ends at the same place. Reflect home in the river, to H₁, and in the road, to H₂. The first part of the trip, home to the river, is as long as H₁ to that point; the last part, the road to home, is as long as that point to H₂. So the whole trip is as long as a broken line from H₁ to the river, to the road, to H₂: shortest when it is straight.

60°riverroadOHhomeH1​H2​PQ
Figure 19.3 The river and the road meet at O at 60°. The straight line from H₁ (home reflected in the river) to H₂ (home reflected in the road) crosses the river at P and the road at Q: the shortest round trip is H → P → Q → H.

The twist: if the river and the road meet at a right angle or wider, the straight line from H₁ to H₂ passes through the corner O or outside the angle, and the best trip goes to the corner itself, touching the river and the road at the same point. With home 1 km from a right-angled corner the shortest trip is 2 km: there and back. The trick still gives the answer; it just tells you the stops have run together.

Where to build the bridge

A different kind of shortest walk. Sunita’s school is 1,200 m along the river and on the other side: home is 300 m from the near bank, the river is 50 m wide, and the school is 200 m beyond the far bank. The village will build one footbridge, straight across the river. Where should it go, so that the walk to school is as short as possible?

Every route crosses the bridge, and every bridge is 50 m long, so the bridge part doesn’t depend on where it stands. Here the trick isn’t a reflection: slide home 50 m straight across, the width of the river, to H′. The walk from home to the bridge is then exactly as long as from H′ to the bridge’s far end (they are opposite sides of a parallelogram), so the rest of the route is as long as H′ → far end of the bridge → school: shortest when straight.

river, 50 m wideHhomeH′​Sschoolbridge
Figure 19.4 Slide home across by the river’s width, to H′. The straight line from H′ to the school crosses the far bank where the bridge must end. To scale.

That slide is a translation, another of Grade 7’s transformations. Like a reflection, it keeps every length, and that is all the trick needs.

An ant on a box

Shortest walks on the outside of a box are found by unfolding it, which is the mirror trick again: folding a face down flat is a reflection of it in the edge it hinges on.

AB12 cm5 cm4 cm
Figure 19.5 A box 12 cm long, 4 cm deep and 5 cm high. An ant at the bottom front corner A wants to reach the opposite top corner B, walking on the outside.

When the mirror trick breaks

Back at the river. Sunita doesn’t walk at the same speed both ways. Say she walks 80 m a minute with the empty gagri, but with it full only 40 m a minute. Now the shortest walk isn’t the quickest.

Try it

A heavy gagri

The blue part of the walk is with the full gagri, at half speed. The red mark is the stop for the shortest walk, 600 m along. Drag the stop to make the time as short as you can.

River0 m200400600800HomeField
To the river, empty (80 m a minute)
6 min 09 s
On to the field, full (40 m a minute)
15 min 28 s
Total time
21 min 37 s

Total time 21 min 37 s. The shortest walk, stopping at 600 m, takes 15 min 38 s. Can you find a quicker stop?

Answer

Every meter with the full gagri costs twice as much time as a meter with the empty one. So the best stop moves along the bank to shorten the slow part, even though the whole walk gets a little longer (about 1,023 m instead of 1,000 m). The reflection trick finds the shortest path; when the two parts are walked at different speeds, the quickest path is a different one.

Where this is used

Questions

★ A lamp A is 2 m from a mirror on a wall, and a person’s eye B is 6 m from the same wall, 12 m farther along it. Where along the wall does the light that reaches the eye hit the mirror?

Pick an answer to see why.

a.★

A village needs one pump on a straight river bank, with a pipe from the pump to each of two tanks on the same side. Tank A is 2 km from the river, tank B is 1 km from it, and they are 6 km apart along the river. Where should the pump go to use the least pipe, and how much pipe is that? Compare it with putting the pump straight below tank A.

Hint
Answer
b.★★

Rajan is 160 cm tall and his eyes are 150 cm above the floor. He stands in front of a mirror hung flat on the wall. What is the shortest mirror in which he can see the whole of himself, from his feet to the top of his head, and at what height must its bottom edge be? Does it matter how far from the wall he stands?

Hint
Answer

★★ On a carrom board, the striker’s center is 10 cm from the side’s mirror line and a coin’s center is 20 cm from it, 30 cm farther along. Where along the side should the striker bounce to hit the coin?

Pick an answer to see why.

c.★★

Sunita says: “With the heavy gagri, I should stop right below the field, so that I don’t carry the water any farther than 150 m.” Use the widget’s numbers (80 m a minute empty, 40 m a minute full) to check whether she is right.

Answer
d.★★★

Home H and the field F are on the same side of a straight river. Prove that, of all the stops on the bank, the one where the two paths make equal angles with the bank is the shortest, and that there is only one such stop.

Hint
Answer

Where to go next

Where these facts come from
  • Heron (Hero) showing that the law of reflection off a plane surface follows from the light’s total path being a minimum, in his Catoptrics (1st century); Fermat’s principle of least time, first proposed in 1662 (his letter to La Chambre of 1 January 1662); the lifeguard comparison; ants doing similar calculations: Wikipedia, “Fermat’s principle”, read October 2026.
  • Heron of Alexandria, his uncertain dates, the steam-driven aeolipile and the coin-operated water dispenser, the Catoptrica on light and mirrors: Wikipedia, “Hero of Alexandria”, read October 2026.
  • Heron’s dates from the eclipse of the Moon of 13 March 62 identified by Neugebauer in 1938, the Catoptrica as a book on mirrors (attributed by some to Ptolemy, by most to Heron), and the aeolipile as the first known device to turn steam into turning motion: J. J. O’Connor and E. F. Robertson, “Heron of Alexandria”, MacTutor History of Mathematics, read October 2026.
  • Alhazen’s problem (a round mirror), Ptolemy’s special cases in the second century, Ibn al-Haytham’s Book of Optics in the 11th century, Elkin’s proof of 1965 and Neumann’s of 1997: Wikipedia, “Alhazen’s problem”, read October 2026.
  • The ants: J. Oettler, V. S. Schmid, N. Zankl, O. Rey, A. Dress and J. Heinze, “Fermat’s Principle of Least Time Predicts Refraction of Ant Trails at Substrate Borders”, PLOS ONE 8(3), e59739 (2013): Wasmannia auropunctata, walking speeds of 2.97 mm/s on smooth and 1.73 mm/s on rough felt, trails not different from Fermat’s prediction; read October 2026.
  • Heron’s problem (two points on the same side of a line; reflect one, and the triangle inequality), its name, and Heron’s Catoptrica: Alexander Bogomolny, “Heron’s Problem”, Cut the Knot, read October 2026.
  • Carrom: the 74 cm board, the striker’s 4.1 cm and the coins’ 3.02–3.18 cm, nine black, nine white and a red queen, rebound shots: Wikipedia, “Carrom”, read October 2026.
  • Mirror aiming systems in billiards and their limits (slow roll, the mirror line by speed, sidespin): David Alciatore, “VEPS GEMS, Part VII: Contact-Point Mirror Kick”, Billiards Digest, July 2010, and “Kick Shot Mirror Aiming Systems”, read October 2026.
  • Dudeney’s spider and fly (the Weekly Dispatch, 14 June 1903; the room 30 × 12 × 12 feet; 42 feet against 40, over five faces): Wikipedia, “The spider and the fly problem”, read October 2026.
  • The photo of Phewa Lake: Nabin845, on Wikimedia Commons (CC BY-SA 4.0).
  • Every number in the topic (the table, the best stops and walks, the angles, the bucket’s quickest stop and times, the river-and-road trip, the bridge, the box, the pump, the mirror’s height, the carrom bounces) was computed by a script of our own, which also checked each answer by trying every stop; the carrom widget’s coins were placed and checked by trying 72,000 directions.