Seems odd that Butte MT is not marked on this 1884 map of the west. The UP line just sort of joins the NP west of Helena (?). Is the map sloppy?
[
www.raremaps.com]
Googled about the UP line into Butte and a news article says it was built as narrow gauge and was the first rail line in Montana (who knows?).
“The U&N was a subsidiary of the Union Pacific, which had acquired it in 1877-78. The narrow-gauge, 3-foot-wide rails crossed Monida Pass on May 9, 1880, the first railroad in Montana.”
[
mtstandard.com]