David Gregory was a nephew of James Gregory. He studied at Marischal College, part of the University of Aberdeen, between 1671 and 1675. Notice that he started his university education at the age of 12 years. There is however, no evidence that he took his degree. After his university studies David, still only 16 years old, visited several countries on the continent and did not return to Scotland until 1683. At the age of 24 he was appointed Professor of mathematics at the University of Edinburgh.
At Edinburgh David Gregory taught Newtonian theories. He is famed for this since he was the first university teacher to teach the 'modern' theories at a time when even Cambridge was still teaching Greek natural philosophy.
Gregory's lecture notes at Edinburgh were to form the basis of Maclaurin's Treatise of Practical Geometry which was published in 1745. Gregory himself published Exercitatio geometria de dimensione curvarum in 1684 while at Edinburgh. Gregory also lectured at Edinburgh on mechanics and hydrostatics.
In 1690 there was political and religious unrest in Scotland and this was certainly one of the reasons that David decided to leave for England. In 1691 David was elected Savilian Professor at Oxford. Newton was a major influence in his appointment. In the same year he became Savilian Professor he was elected to be a Fellow of the Royal Society.
David Gregory certainly supported Newton strongly in the Newton - Leibniz controversy arguing, as did Wallis, that Leibniz had learnt of the calculus through a letter of Collins. In 1702 he published Astronomiae physicae et geometricae elementa which was a popular account of Newton's theories.
David Gregory did important work on series. He also worked on optics publishing Catoptricae et dioptricae sphericae elementa in 1695. This work describes telescopes which were a special interest of his. He also experimented with making an achromatic telescope.
David Gregory took ill on a journey from Bath to London and he died in an inn in Maidenhead.