Some locomotives collect electricity from overhead cables, while others take power from a third “live” rail on the track. It is very expensive to build the lines or rails that carry the electric current, but electric locomotives are cleaner, quieter, faster, and more reliable than steam or diesel engines.