Wallace became a mathematics teacher at Perth Academy in 1794 and he married in the same year; the marriage produced three daughters and a son. At this time Wallace began to publish mathematics and his first paper appeared in the Proceedings of the Royal Society of Edinburgh in 1796. He also began writing articles for Encyclopaedia Britannica with the first on Porisms appearing in 1801. A further paper submitted to the Royal Society of Edinburgh in 1802 made it clear that this school teacher of mathematics had an outstanding research talent (although it later transpired that Legendre had discovered the results six years earlier).
Playfair advised Wallace to apply for the post of professor at the Royal Military College at Great Marlow which became vacant in 1803, and one year after he was appointed there he was joined by Ivory. Thomas Leybourn's Mathematical Repository was produced by the staff at the Royal Military College and Wallace soon joined in contributing articles. He was also approached to write further articles for Encyclopaedia Britannica and for the Edinburgh Encyclopaedia while, in addition, he set about writing textbooks for his students at the Military College.
Then, in 1819, he was appointed professor of mathematics at Edinburgh University. Leslie had been the professor of mathematics at Edinburgh since 1805, but he resigned the chair when appointed to the more prestigious post of professor of natural philosophy. Candidates for the vacant chair included Wallace, Haldane (who was professor at St Andrews) and Charles Babbage. The Edinburgh chair was considered to be the leading mathematics chair for a Scot to hold, and certainly the Englishman Babbage was not seriously considered although he was supported by Ivory. Wallace was supported by Leslie, the previous occupant of the chair, while Haldane had been successful in obtaining the St Andrews chair on political grounds in preference to considerably more talented mathematicians (including Wallace and Ivory) and hoped to repeat the same success again.
Wallace had an impressive collection of testimonials including ones written by Playfair, Dugald Stewart, Maskelyne, Charles Hutton, William Herschel and Maseres. Leslie also wrote a letter of support. In a straight vote between Wallace and Haldane, Wallace was appointed by 18 votes to 10. He soon made an impact on the teaching at Edinburgh, deciding to change from using Leslie's book to teach instead from Playfair's edition of Euclid's Elements. This really annoyed Leslie who now regretted that he had supported Wallace over Haldane and even regretted resigning the mathematics chair himself. Carlyle wrote in a letter to a friend (see for example ):-
Wallace, whom I went this day to see, is a person of about fifty years old - short, bald-headed with a grim and intelligent countenance. his manner is blunt; he speaks with a scotch accent, - and if his unaffected and patient demeanour is accompanied with a display of philosophical reflection - which I cannot assert or deny - he ought surely to be a great favourite with the public. Leslie and he are said to be on the eve of battle - for the "Elements of Geometry" and curves of the second order are to be discarded for Playfair's Euclid! Love me, love my dog - the saw says; still more should it say: love me, love my book. Science, you see, was well as religion, is at times disturbed by the feuds of its professors. What have we to say but wish these worthies a fair field and no favour?Wallace's work was on geometry and Simson's line (which is definitely not due to Simson!) appears first in a paper of Wallace in 1799. One of Wallace's theorems:-
... if 4 lines intersect each other to form 4 triangles (omit one line in turn) then the circumcircles of the triangles have a point in common ...was generalised to 2n lines by Clifford.
Perhaps his most significant contribution, however, was the fact that he advocated the Continental approach to the calculus and was one of the first in Britain to do so. In his article Fluxions which appeared in Encyclopaedia Britannica in 1810 he shows his intentions in the preface (see for example ):-
... in explaining the foundations of the method, we have endeavoured to show that it rests upon purely analytical, namely the theory of limiting ratios, and this being the case, the subject may be treated as a branch of pure mathematics, without having occasion to introduce any ideas foreign to geometry ...In this Encyclopaedia Britannica article Wallace uses Newton's notation, but in his article Fluxions for the Edinburgh Encyclopaedia which was published in 1815 he used Leibniz's differential notation and was therefore the first to write an English treatise on the calculus using differential notation. In  Panteki discusses a letter written by Wallace to Peacock in 1833 in which he points out his contributions in introducing the differential notation in Britain which Peacock seems to have chosen to ignore. Peacock was keen to claim that the introduction of differential notation in Britain was due to Cambridge mathematicians, especially the Analytical Society.
Wallace also invented the pantograph, an instrument for duplicating a geometric shape at a reduced or enlarged scale. In addition to mathematical articles, he wrote articles on astronomy which he published in the Transactions of the Royal Astronomical Society.
In  it is said that:-
He took an active interest in the erection of the Observatory on the Calton Hill and the monument to Napier. As a Professor, Wallace was regarded as an able teacher, he was popular alike with pupils and colleagues. In recognition of his services to learning and to the University, he was made an honorary Doctor of Laws.Wallace retired from his chair at Edinburgh in 1838 due to ill health. He had held the chair for almost 20 years but these had not proved one in which he produced much in the way of original research. Indeed his health had broken down in 1835 and for his last three years in the chair at Edinburgh he did not even teach. In May 1835 he had written to written to the Lord Chancellor requesting a pension and giving his own assessment of his achievements. After his retirement, however, his health improved markedly as he reported in a letter written in 1839 (see for example ):-
... after more than three years seclusion, confined a great part of the time to my bed, i have appeared again ... on the stage of human existence. Though unable to walk, and almost to stand, I never ceased to think [and write books on geometry and conic sections]. ... My recovery is quite a phenomenon here. ... I this day accompanied by Mr Kelland my success in the Professorship of Mathematics here ascended Arthurs seat which is upwards of 800 feet high ...He published two books after he retired, A Geometrical Treatise on the Conic Sections with an Appendix Containing Formulae for their Quadrature (1838) and Geometrical Theorems and Analytical Formulae with their application to the Solution of Certain Geodetical Problems and an Appendix (1839). He also published four further papers, although it seems likely that the research for these had been done many years earlier.
His remarkable return to health did not last very long, for he died five years after he retired.
Article by: J J O'Connor and E F Robertson