It is a hot day and a long, empty beach. Two ice-cream vendors arrive with their carts. The swimmers are spread evenly along the sand, and each swimmer walks to whichever cart is closer. Where should you park yours?

Two vendors, one beach

Try it yourself. The beach below is 400 metres long. Drag either cart along the sand. Every dot is a customer, and it takes the colour of the cart it walks to.

0 m 200 m 400 m
Lime cart's customers50%
Coral cart's customers50%
Average walk to a cone100 m
Drag the carts, or press a button. "Let them compete" makes each vendor, in turn, hop to the best spot given where the other one is.

Why the middle wins

Put your cart at the 100 m mark, with the rival at 300 m. Everyone left of 200 m is closer to you, so you serve half the beach. The same goes for your rival. It looks balanced and stable.

It is not. Take one step toward the middle and the dividing line, which always sits halfway between the two carts, shifts toward your rival. The swimmers between your old spot and the new line now find you closer. You gained customers and the rival lost the same number. Your rival sees this and steps toward the middle too, to win them back. Each step only makes sense for the vendor taking it, and the two of them leapfrog all the way to the centre.

Press "Let them compete" to watch it happen. The vendors stop at the 200 m mark, side by side, each with exactly half the beach. Neither can do better: any move away from the middle hands the other vendor more than half.

The bill goes to the customers

With both carts at 200 m, the average swimmer walks 100 m for a cone. Now press "Park at ¼ and ¾". The carts sit at 100 m and 300 m, each vendor still serves exactly half the beach, and the average walk drops to 50 m. The vendors earn the same either way, but the swimmers are twice as well served.

The sum is short. A cart in the middle of the stretch it serves leaves customers an average walk of a quarter of that stretch. Carts at ¼ and ¾ each sit in the middle of a 200 m stretch, so the average walk is 200 ÷ 4 = 50 m. Carts side by side in the centre each sit at the end of a 200 m stretch, so the average walk is half of it: 100 m.

The better arrangement is not stable because it relies on trust. At ¼ and ¾, either vendor can slide toward the middle and take customers from the other. So they do, and the beach settles into the worse outcome.

Where the idea comes from

This is the "linear city" model from Harold Hotelling's 1929 paper "Stability in Competition", published in the Economic Journal. Its conclusion, sometimes called Hotelling's law, is that competing sellers have a pull toward making their offers alike. The same logic is used to explain why petrol stations cluster at one junction, why rival shops open on the same street, and why two parties competing for votes often drift toward the political middle.

Where the model breaks

The neat result needs strict conditions. Every customer must buy one cone no matter how far the walk, and prices must be fixed. Real beaches are different. Some swimmers give up and stay on their towels if the cart is too far, which pushes vendors apart. Carts can also change prices, and in 1979 Claude d'Aspremont, Jean Jaskold Gabszewicz and Jacques-François Thisse showed that once prices are free to move, Hotelling's tidy answer no longer holds in its original form.

Numbers matter too. With two vendors the middle is a stable resting place. With three, the picture is messier: a newcomer can park right beside one cart and squeeze it, which then moves, and the arrangement keeps shifting, even though the carts still tend to crowd toward the centre.

What to take away

Competition does not automatically spread sellers out to serve everyone well. When customers have nowhere better to go, each seller is pulled toward the same crowded spot, and the walk is longer for everybody. Next time two identical cafés sit next to each other, you are looking at the beach with the carts in the middle.