Background
He was born 17 April 1797 in Marnoch, Banffshire (now in Aberdeenshire), the son of William Ogilvie, farmer, and Ann Leslie, daughter of a farmer in a neighbouring parish.
He was born 17 April 1797 in Marnoch, Banffshire (now in Aberdeenshire), the son of William Ogilvie, farmer, and Ann Leslie, daughter of a farmer in a neighbouring parish.
Adding to his income by private tuition, he graduated Master of Arts
After receiving some elementary education at home, and attending the parish school for two quarters, Ogilvie worked as a ploughman till he was twenty-one. In 1818, after an accident, one of his legs had to be amputated above the knee. Afterwards Ogilvie taught successively in two subscription schools, in the parishes of Fordyce and Gamrie, both in Banffshire.
With the help of a local schoolmaster, he prepared for university, and in October 1824 he entered Marischal College, Aberdeen. on 14 April 1828.
He remained in Aberdeen as a tutor till 13 May 1831, when he was appointed mathematical master in Gordon"s Hospital, an educational establishment in the city. Marischal College conferred on him the honorary degree of Doctor of Laws on 15 January 1848.
He retained his mastership till July 1859. Ogilvie died of typhoid fever at Aberdeen on 21 November 1867.
On 15 November 1842 Ogilvie married Susan Smart, daughter of a farmer near Stonehaven, Kincardineshire.