Adam was a classical scholar and educational reformer. His family were tenant farmers in Morayshire, and he walked 150 miles from there to Edinburgh, aged seventeen, to attend logic classes at the university. Augmenting his interest in education, in 1763 he was appointed Rector of Edinburgh High School. Adam was a popular teacher, and his pupils included Sir Walter Scott, the critic Lord Francis Jeffery, Lord Chancellor Henry Brougham and the MP Francis Horner. In around 1805, fourteen former pupils commissioned Raeburn to paint Adam’s portrait, which they presented to the High School. When he died, his obituary referred to this portrait, stating that Raeburn had painted “an excellent likeness of the worthy rector, who is represented in the act of teaching his pupils”.