A mountain railway travels over a mountain whose gradient is steep. In order for a train to travel such precipitous slopes, many different hill climbing methods can be employed. The methods used most commonly include a rack railway, a cable railway, and a funicular railway.
A normal railway operates on the principle of adhesion. The friction between the wheels and the rail is great enough that power delivered to the wheels causes the train to move. Friction ceases to be efficient upon reaching a medium slope and stops working completely on steeper slopes. As a result other techniques are used by mountain railways to traverse near vertical landscapes.
A rack railway remedies this adhesion dilemma by adding a rack-and-pinion setup to the mountain railway. This is a locomotive driven method, unlike the others, in which a third rail is set between the normal two rails, which the train can grip with a cog, or cogs, mounted beneath it. This middle rail is called the rack rail and has teeth that rise either from its upper surface or from its sides. Cogs are mounted to the underside of the train that lock with the rack rail. The result is a simple mountain railway that prevents the train from losing its grip while running both up and down hill.
A cable railway is a type of mountain railway with a train attached via a cable to a stationary engine residing at the elevated destination. It is often the case that these trains are not permanently attached to the cable. The cables and cars may be switched from track to track as the need presents itself. The train does not use a locomotive engine with this design. Cable railways are most often employed on work sites such as mines and quarries.
The funicular railway is similar to the cable railway. It also uses a cable mounted system to move its cars up and down a mountain railway. Unlike a cable railway, the funicular's cable is attached to two cars, or trams, of equal weight. While one moves up the slope, the other comes down, each balancing the other and preventing any sort of drastic movement. Very little energy is required to move the trains as a result and a simple electric-powered pulley is capable of moving both cars on the mountain railway.