Scottish engineer and inventor whose improvements in the steam engine led to its wide use in industry (1736-1819)