David Gregory (originally spelt Gregorie) FRS (?1659 – 10 October 1708) was a Scottish mathematician and astronomer. He was professor of mathematics at the University of Edinburgh, Savilian Professor of Astronomy at the University of Oxford, and a commentator on Isaac Newton's Principia.The fourth of the fifteen children of David Gregorie, a doctor from Kinnairdy, Banffshire, and Jean Walker of Orchiston, David was born in Upper Kirkgate, Aberdeen.