Richard Trevithick, a British mining engineer and inventor, built the first train in 1804. The train was powered by a steam engine with a large flywheel to even the piston rod action, giving the world the first machine that could carry a large number of people and goods.