I spent about a month in the UK earlier this summer, and that meant I took a lot of train trips. I love riding trains: the feeling of endless possibility I get when I look at the departure boards, the countryside rolling by, the fantastic people-watching, ~~the two-hour delay between Edinburgh and Manchester because a train got stuck on the tracks in front of us~~, and of course, the mathematical properties of train routes. I spend a lot of time on trains, or really on any mode of transit, thinking about metrics.

At its most abstract, a metric is a function that takes in two inputs and spits out a positive number (or zero). Less formally, it’s a way of calculating the distance between two points. The metric we’re most familiar with is the “as the crow flies” metric: distance on a flat piece of paper or map.

In order to qualify as a metric, a function must obey a few rules. First, as stated above, it must be nonnegative. It must give the same length to the route from A to B as it does from B to A, and it must give the output 0 when (and only when) asked about the distance from any point to itself. Finally, if you’re looking at any three points in your space, the distance from A to C must be less than or equal to the distance from A to B plus the distance from B to C. We call this property the triangle inequality because it’s easily illustrated using a picture of a triangle.

The straight line distance between two points is the standard example of a metric, but there are lots of other ones that come up quite naturally in everyday life. To get from my apartment to the library, I can't cut diagonally across city blocks. I have to walk where the streets are, so I have to go south some number of blocks and then east some number of blocks. The standard metric would underestimate how far I have to walk to get there, so I need a new metric, one that takes the actual layout of the streets into account. A metric for a city with a grid system is often called the “Manhattan metric,” or the “taxicab metric.” (The "Salt Lake City" metric would be another good name for it. Our city streets are extremely griddy!)

Getting back to trains, there’s a metric sometimes nicknamed “SNCF” after the French national rail system: in order to get from any point in France to any other point in France, you have to take a train to Paris and then take a train from Paris to your destination. Connections have gotten better, but in my French train experience, the description seems apt. (The metric is also sometimes called the British Rail metric, with London taking the role of Paris, but that doesn’t seem quite as fair to me. The "Frontier Airlines metric" would be a good name for it, too, with Denver in place of Paris.)

But I want to think about a different way of measuring "distance" on trains. When I’m riding a train, I’m not actually concerned with the number of miles I travel. I’m concerned with the price and/or the amount of time it takes. Usually these are correlated with distance, but the correlation isn't perfect. Time and price are not always metrics mathematically: stopover scheduling might easily make the trip from A to B longer than the trip from B to A. But I was scandalized to learn that British rail ticket prices do not even satisfy the triangle inequality!

That’s right, if you want to get from point A to point C on a train in the UK, it’s sometimes cheaper to buy two tickets: one from point A to point B, somewhere along the way, and one from point B to point C. And this isn’t necessarily a matter of a few pence. The article linked above gives examples of savings of more than 50% on some itineraries. They say that a one-way ticket from Birmingham to Bristol was42.10, but a ticket from Birmingham to Cheltenham was 17.90 and Cheltenham to Bristol was 7.30, for a total cost of 25.20. (The article was published in November 2009, so prices have probably changed since then.) There are multiple websites dedicated to helping the savvy traveler exploit the non-metric nature of rail ticket prices. But I'm somewhat offended that it's even possible.

As a frequent flier, I'm aware that the cost of a ticket can be opaque, but this is not about buying on the right day or flying on a Wednesday to save money. Split ticketing can be used for the same trip bought at the same time. Your experience as a passenger will be exactly the same except that you'll have to hand over your tickets twice instead of just once, and you'll pay less to do it. For air travel, sometimes a flight with a layover is cheaper than a flight without, but the passenger experience is very different for those two trips. Additionally, if you actually bought the tickets as two separate flights, I'm pretty sure the cost would be higher than buying them as one itinerary. Maybe I'm also huffy about split ticketing on trains because I see air travel as a completely irrational system, so its strange pricing schemes don't feel like a violation of natural law, but I expect more from trains. The culprit seems to be the menagerie of different train companies, who set prices for different portions of trips.

I did not experience split ticketing myself because I bought a rail pass. I don’t know that it saved me much money, but it sure saved me the time and hassle of figuring out the intricacies of ticket prices. Plus, I think it was an appropriate protest against non-metric distance functions.