Where a railway has to cross a range of mountains, it is important to lower the summit as much as possible, as this reduces the steepness of the gradients on either side. This can be done with a summit tunnel or a deep summit cutting.
A summit tunnel can lower the summit even more, and paradoxically, the steeper the hill, the shorter the tunnel tends to be; tunnels cost the same no matter how much overburden there is, while cuttings tend to increase in cost with the square of the overburden.
Care had to be taken with summit tunnels in the early days of steam with designs that suffered from problems with smoke and slippery rail. Notorious tunnels came to be known as rathole tunnels.
The ruling gradient of a section of railway line between two major stations is the gradient of the steepest stretch. The ruling gradient governs the tonnage of the load that the locomotive can haul reliably.
The pioneering Liverpool and Manchester Railway was built at a time when choice between locomotive and cable haulable was not clear cut. Therefore all hill climbing (1 in 100) sections was concentrated in one place where cable haulage by stationary engines could be used if necessary, while the rest of the line was engineered to be so gently graded (say 1 in 2000) that even primitive locomotives would have a chance of succeeding. As it turned out at the Rainhill Trials of 1829, locomotives proved capable of handling the short 1.6-km length of 1 in 100 gradients on either side of the Rainhill level.
Since the early trains had primitive brakes, it was also necessary to have very gentle gradients to reduce the need for strong brakes. Sudden changes in gradients would have also overstressed the primitive couplings between the carriages.
The gentle 1 in 2000 gradients were made possible by very substantial earthworks and bridges.
The Cromford and High Peak Railway also opened in 1830 but had gradients so steep - 1 in 8 - that cable haulage was essential. It hauled mainly coal.