A Fairlie is a type of articulated steam locomotive that has the driving wheels on bogies. The locomotive may be double-ended (a double Fairlie) or single ended (a single Fairlie). Fairlies are most associated with the Ffestiniog Railway in Wales.
While the Fairlie locomotives are used only on heritage railway, the vast majority of diesel and electric locomotives in the world today follow a form not very different from the Fairlie — two power trucks with all axles driven, and many also follow the Fairlie's double-ended concept, being capable of driving equally well in both directions.
The Fairlie was invented and patented by the Scottish engineer Robert Francis Fairlie in 1864. He had become convinced that the conventional pattern of locomotive was seriously deficient; they wasted weight on unpowered wheels (the maximum tractive effort a locomotive can exert is a function of the weight on its driving wheels) and on a tender that did nothing but carry fuel and water without contributing to the locomotive's adhesive weight. Furthermore, the standard locomotive had a front and back, and was not intended for prolonged driving in reverse, thus requiring a turntable or wye at every terminus.
Fairlie's answer was a double-ended steam locomotive, carrying all its fuel and water aboard the locomotive and with every axle driven. The double-ended part was accomplished by having one double-ended boiler on the locomotive, with one firebox in the centre and a smokebox at each end. The locomotive looked fairly conventional until the observer realised that the locomotive was two-faced, Janus-like. Fairlie was not the first person to devise a double-ended steam locomotive. The "Seraing", built by John Cockerill for the Semmering Trials in 1851 was very similar in design to a double Fairlie.