In 1784 his family moved to Edinburgh, where he himself was set to learn the trade of a bookbinder. In 1790 he appears as "William Wallace, bookbinder" living and trading at Cowgatehead, at the east end of the Grassmarket.
His taste for mathematics had already developed itself, and he made such use of his leisure hours that before the completion of his apprenticeship he had made considerable acquirements in geometry, algebra and astronomy. He was further assisted in his studies by John Robison (1739-1805) and John Playfair, to whom his abilities had become known.
After various changes of situation, dictated mainly by a desire to gain time for study, he became assistant teacher of mathematics in the Perth Academy in 1794. This post he exchanged in 1803 for a mathematical mastership in the Royal Military College at Great Marlow, in which post he continued after it moved to Sandhurst, with a recommendation by Playfair.
Wallace developed a reputation for being an excellent teacher. Among his students was Mary Somerville. In 1838 he retired from the university due to ill health. In his final years he lived at 6 Lauriston Lane on the south side of Edinburgh.
In his earlier years Wallace was an occasional contributor to Leybourne's Mathematical Repository and the Gentleman's Mathematical Companion. Between 1801 and 1810 he contributed articles on "Algebra", "Conic Sections", "Trigonometry", and several others in mathematical and physical science to the fourth edition of the Encyclopædia Britannica, and some of these were retained in subsequent editions from the fifth to the eighth inclusive. He was also the author of the principal mathematical articles in the Edinburgh Encyclopædia, edited by David Brewster. He also contributed many important papers to the Transactions of the Royal Society of Edinburgh.
He mainly worked in the field of geometry and in 1799 became the first to publish the concept of the Simson line, which erroneously was attributed to Robert Simson. In 1807 he proved a result about polygons with an equal area, that later became known as the Bolyai-Gerwien theorem. His most important contribution to British mathematics however was, that he was one of the first mathematicians introducing and promoting the advancement of the continental European version of calculus in Britain.
Wallace was married to Janet Kerr (1775-1824).
His daughter, Margaret Wallace, married the mathematician Thomas Galloway. His sons included the Rev Alexander Wallace (1803-1842) and Archibald C. Wallace (1806-1830).
He also appears to have had a son William Wallace (1784-1864) when William was aged only 16. The mother is not clear.
This article incorporates text from a publication now in the public domain: Chisholm, Hugh, ed. (1911). "Wallace, William (Scottish mathematician)". Encyclopædia Britannica (11th ed.). Cambridge University Press.