Railroads are an old technology, but still a very important one. That's because they're the cheapest way to move a large amount of goods across great distances, and they make pretty compelling investments worth keeping on your radar. If you do, you'll see why Union Pacific Corporation (NYSE:UNP), CSX Corporation (NASDAQ:CSX), and, from up north, Canadian National Railway (USA) (NYSE:CNI) might make their way on to your buy list.

The giant
With a roughly $85 billion market cap, Union Pacific is more than double the size of its next largest publicly traded U.S. competitor. It has 86,000 miles of track across the western two-thirds of the country connecting 23 states. In other words, it's a vital link in the U.S. economic machine, moving products from where they're made, harvested, dug up, or arrive on these shores to where they're needed.

A Union Pacific train. Source: Cbl62, via Wikimedia Commons.

In fact, like most railroads, the list of products that get shipped on Union Pacific's trains is pretty incredible. It includes such things as coal, grain, cars, lumber, and the intermodal containers that carry goods from far-off lands to your nearby store shelves. If a product needs to go a vast distance and either originated or was going to one of the 23 states in which Union Pacific operates, Union Pacific probably touched it in some way.

Being so vital to the transportation of products, however, means that railroads, all of them, are highly sensitive to economic swings. When demand for goods falls, so do the top and bottom lines here. Longer-term shifts can sting, too. As an example, the long-term decline in coal demand driven by utilities that are switching to natural gas has been a major drag for railroads such as Union Pacific.

Partners in rail
But Union Pacific doesn't span the entire United States. And goods often have to travel from coast to coast, which is why you'll want to look at other major railroads, too. For example, the second largest railroad in the United States by market cap is CSX. This railway has 23,000 miles of track across 23 eastern states. Together, CSX and Union Pacific cover a huge swath of the continent. And, in fact, most of the railroads coordinate with each other because they have to, in order to move products efficiently for customers.

Moving things quickly and cheaply, in fact, is one of the hallmarks of the railroads. They are logistics dynamos, working very hard to ensure everything is moving as planned. But that doesn't always happen, and when it doesn't, customers can wind up unhappy. For example the so-called polar vortex that hit the eastern portion of the United States in 2013 had a huge impact on CSX's service and customer satisfaction. It led to a big increase in spending on new trains, track repairs, and other necessities to ensure that there wasn't a repeat the following winter.

That said, such capital spending isn't only focused around bad weather. Railroads are increasingly finding their services in need. And, thus, they have to spend heavily to prepare for future demand. In other words, if you're watching railroads, you'll want to watch capital spending. Too little, and a railroad might not be ready for bad weather or increased demand. Such spending is also important to ensuring low transportation costs relative to competitors in the industry and outside it. So you'll also have to juxtapose spending against how cheaply and efficiently railways move goods.

A Canadian National Engine. Source: Myke2020, via Wikimedia Commons.

Not the only game in North America
If you're looking at railroads, the U.S. has several to offer. But there are others to look at in foreign countries around the globe. Even if you prefer to stay close to home, however, you might want to examine Canadian National Railway. This company operates around 21,000 miles of track both north of our border and within it.

In fact, Canadian National's tracks go from coast to coast in Canada and then down to the Gulf Coast in the United States. It's the only transcontinental railroad in North America, boasting of serving every important Canadian market and 75% of the U.S. population. So if you're looking at domestic railroads, you really do need to think about foreign ones, too.

Cheap, efficient railroads
Until there's a major change in transportation, railroads are likely to remain the cheapest shipping alternative when customers need to move a large amount over great distances. That makes companies such as Union Pacific, CSX, and Canadian National a vital part of the economic ecosystem in North America and the world. And it's a good reason you'll want to watch this trio of railroads and their competitors.

Reuben Brewer has no position in any stocks mentioned. The Motley Fool recommends Canadian National Railway and CSX. The Motley Fool owns shares of Canadian National Railway. Try any of our Foolish newsletter services free for 30 days. We Fools may not all hold the same opinions, but we all believe that considering a diverse range of insights makes us better investors. The Motley Fool has a disclosure policy.