Roberts studied at Queen Elizabeth's Grammar School, Horncastle. He matriculated in 1845 at the University of London, where he earned in 1847 his bachelor's degree in mathematics and in 1849 his master's degree in mathematics and physics, as first in his class. Next he studied law and became a solicitor in 1853. After a few years of law practice he abandoned his law career and returned to mathematics, although he never had an academic position. He had his first mathematical paper published in 1848. In 1865 he was an important participant in the founding of the London Mathematical Society (LMS). From 1866 to 1892 he acted as legal counsel for LMS, from 1872 to 1880 he was the organization's treasurer, and from 1880 to 1882 its president. In 1896 he received the De Morgan Medal of the LMS. In 1878 he was elected FRS.