Robertson was born at Duns, Berwickshire, the son of Abraham Robertson, “a man of humble station”. He attended school at Great Ryle in Northumberland, and later at Duns. At age 24, he moved to London, he had hopes of travelling to the East Indies, but his patron died. He took himself alone to Oxford, where he sought to finance himself by opening an evening school for mechanics. This failed, and he served for a while as an assistant to a local apothecary. He then gained patronage from John Smith (1721—1796), the Savilian professor of geometry. Robertson competed a Bachelor of Arts in 1779 and completed his Master in Arts in 1782.
In 1784, he deputized for Smith, who was then acting as a physician at Cheltenham and then followed Smith as Savilian professor of geometry. His lectures were considered clear, and he was always anxious to encourage his pupils. Thus in 1804 he printed a demonstration of Euclid v, Definition 5, for the benefit of beginners.
In 1789, Robertson was presented by the dean and canons of Christ Church to the vicarage of Ravensthorpe, near Northampton, but his principal residence was still in Oxford. He married, about 1790, Miss Bacon of Drayton in Berkshire, who died a few years after he became professor. They had no children.
He declined to publish the manuscripts of Thomas Harriot. Two of Robertson's five papers in the Philosophical Transactions were fiercely criticized, and he responded by publishing a "Reply to a Critical and Monthly Reviewer" (1808). He contributed several papers to the first series of the British Critic, and two to the Edinburgh Philosophical Journal, in 1822.
1801: Robertson gave evidence before a committee of the House of Commons which reported in 1801 on the expediency of replacing London Bridge by a single arch. In 1807 he graduated BD and DD.
1801: The same year he was in London making calculations for Lord Grenville's system of finance, and in 1808 he drew up the tables for Spencer Perceval's system of increasing the sinking fund by granting life annuities on government security.