Matthew Murray was born in Newcastle-upon-Tyne in 1765. He was apprenticed as a millwright and after moving to Leeds he found work as a engineer with John Marshall, a linen manufacturer. Murray was employed by Marshall, Fenton & Company to improve a flax-spinning machine that had originally been invented by John Kendrew and Thomas Porthouse from Darlington. The machines did not perform well. Breakages frequently occurred and the yarn came out lumpy and hairy.
By June 1790 Murray had created an efficient machine that produced good quality yarn. Marshall's partner, Samuel Fenton, was impressed by Murray, and together with another engineer, David Wood, formed Fenton, Murray & Wood. The engineering works was based next to John Marshall's Temple Mill, in Water Lane, Leeds. Trade grew and by the beginning of the 19th century, Murray's company were challenging Boulton & Watt for the position as the leading producer of steam engines in Britain.
In 1810, John Blenkinsop was the manager of Middleton Colliery asked Murray to help him produce a steam locomotive. Blenkinsop wanted to find a way of reducing the cost of transporting coal to the nearby town of Leeds. Together they produced four locomotives. Blenkinsop and Murray decided that a steam locomotive with smooth wheels on a smooth rail would not have sufficient adhesion to propel itself and a load. They therefore experimented with producing a rack railway.
The Salamanca (named after a battle in the Peninsular War) locomotive, with its cog-toothed driving wheels, first appeared in public on 24th June, 1812. The locomotive had two vertical cylinders within the top of the boiler, and the pistons drove the rack wheels through rods and pinions. The locomotive weighed 5 tons and on a level track was capable of hauling a load of 90 tons at 4 mph. The locomotive was a great success and together they built three more. A local artist, George Walker, produced the first ever painting of a locomotive when he visited Middleton Colliery in 1814.
The four locomotives produced by Matthew Murray and John Blenkinsop, replaced 50 horses and 200 men at the Middleton Colliery. The locomotives were fairly expensive to use and heavy wear took place between the driving gear wheel and the horizontal rack. Despite these problems, the four locomotives were used at the colliery until 1835.
Matthew Murray died in 1826. His former company declined the invitation to build locomotives for the Stockton & Darlington Railway. However, in the 1830s, Fenton, Murray & Wood did supply the Great Western with locomotives.