Leaving Glasgow with the degree of M.A., he spent the years 1868 to 1871 in St Andrews, as Tutor in Mathematics at St Leonard's College Hall. From 1871 to 1874 he was again in Glasgow, as assistant to the professor of Mathematics; and from 1874 to 1892 he was chief mathematical master in the Glasgow High School, where he also taught science. About 1870 he had travelled abroad and had studied in Berlin, and in 1882 he studied in Göttingen.
This first period of his life was distinguished not merely by his work for mathematical education in Scotland, of which the practical fruits were a textbook on arithmetic for schools (1878), and another on the elementary theory of determinants (1882, an excellent book, unfortunately long out of print), but by a large number of original papers on mathematical subjects. As his great lifework, the history of determinants, came to absorb more and more of his time and attention, it was only natural that his later papers should be almost exclusively concerned with determinants and cognate topics; but the titles of his earlier papers (the date of the earliest ones being 1873) indicate that his interests at that time were more in the direction of continued fractions and the automorphic transformation of quadrics. In 1874 he published a short tract on the "expression of a quadratic surd as a continued fraction." It was probably the close relation of continued fractions to persymmetric determinants and to continuants (the properties of which he rediscovered, but withdrew from publication on learning of Sylvester's priority in the matter) that shaped the bent of his future energies. Between 1875 and 1880 he conceived the project of writing a history of determinants, and in 1881 the Quarterly Journal published his first list (of forty pages) of writings on determinants, the second list appearing in 1886. In 1890 appeared Part I of the first volume of the History.
Up to this time his career had conformed to a type not unusual in Scotland; for example it is closely parallel to that followed at a somewhat later date by his younger contemporary, the late Professor George A Gibson. Deserved honours had already fallen his way; the LL.D. of the University of Glasgow, to which he had been examiner in mathematics since 1879, was bestowed on him in 1882 at an unusually early age, and the Keith Prize of the Royal Society of Edinburgh had been awarded to him in 1884. In the natural course of events he might have counted on spending another quarter century of increasing distinction, usefulness and recognition in his native country. In 1892 a convergence of circumstances changed all this; the second half of his life was destined to be spent on the other side of the world and in other surroundings. For one thing he had been advised, for the sake of his wife's health (Margaret Bell of Dumbartonshire, whom he married in 1876 and who predeceased him by many years) to seek a warmer climate, and he had in mind to apply for the chair of mathematics in the Leland Stanford University, California. In the same year Cecil Rhodes, Prime Minister of Cape Colony, was in need of a successor to Sir Langham Dale, Superintendent General of Education for Cape Colony. On the recommendation of Lord MacLaren, Sir John Murray (of the "Challenger") and Professor Chrystal, Muir was interviewed by the agent, Mr Thomas Fuller (author of the "Life of Cecil Rhodes") and by Rhodes himself, who was then in England. The impression which Muir made can be inferred from the remark of Rhodes at the meeting of the board of election; he declined to waste time over the production of testimonials, saying, "I have seen the man."
For almost a quarter of a century Muir laboured in his new post, retiring in 1915. The extent of his contribution to the progress of education in South Africa is inestimable, and ample tribute was paid to it on the almost festal occasion of his 89th birthday, and again immediately after his death. It involved enough administrative work to crush anyone less hale, less strong-willed, together with many practical innovations, the introduction in schools of courses in science and in handicraft, the establishment of Training Colleges. He was Vice-Chancellor of the University of the Cape of Good Hope from 1897 to 1901. In 1899 he had been awarded the Keith Prize of the Royal Society of Edinburgh for the second time; in 1916 he received from the same Society the Gunning-Victoria prize. In 1901 he was given the C.M.G., and received at the same time the LL.D. of the University of the Cape of Good Hope. In 1910 he was President of the South African Association for the Advancement of Science; and in 1915 he received a knighthood.
His years of retirement might well have been an Indian summer of calm retrospect, spent in the sunlight on the stoep of his house at Rondebosch. Such was not his nature. In his own words (from the preface of the fifth volume of the history of determinants) retirement meant the "attainment of freedom to resume the old work in earnest." It was resumed in earnest, in the face of handicaps, the remoteness from adequate libraries of reference (a defect he remedied for himself by building up his own remarkable library of mathematical books and periodicals) and the dislocation caused by the Great War. The first volume had been published in 1906, the second in 1911; the third followed in 1920 and the fourth (which brought the commentaries up to 1900) in 1922. Still he laboured, purposing to complete a fifth volume, which should bring the survey up to 1920. This duly appeared in 1930, when he was 86 years old. During all this time his own original papers (many of them by-products of his historical research) continued to flow at a uniform rate, many of the earlier ones having been commented on with detachment (not free from occasional strictures) in the history itself.
Up to the age of 80 his health had been almost perfect; he had hardly known illness as a personal experience. In 1925 he endured a severe illness from which he was not expected to recover. During his convalescence his mind was set on attending a meeting of some consequence, and he actually had himself carried up the stairs to the room, thus enacting in real life a dramatic scene not unfamiliar to readers of the late John Galsworthy's short stories and novels. He recovered, resumed tennis, which he continued to play until the age of 84, and when medically advised to give up that pastime he took exercise by walks with his dog Sandy among his pines at Elmcote, and by sawing wood in true Gladstonian fashion. A firm, uniform and very legible handwriting, in which all his manuscripts were written, testified to the end his strength of nerve. Ten days before his death he was correcting proofs of his last two papers (and here let us pay a tribute to the unobtrusive devotion of his secretary, Miss A M Cogan, who copied in full all the manuscripts of his later years); and to the last he preserved an unclouded mind, and had full possession of his faculties.
An appreciation of his work would require two separate articles of some length, one to do proper justice to his work for education in Scotland and in the Union of South Africa, the other to give a survey and adequate account of his 307 original papers, his textbooks and his history of determinants. In the space at our disposal it is not possible to do more than make brief reference to either, but it is fitting to say something about his monumentum aere perennius, the five volumes of the history.
His published work covers sixty years; his work on the history must have covered fifty-five. In the later volumes the increasing bulk of material to be described and assessed was less onerous in the handling, in view of the momentum already gained and the improvement of reviews of mathematics and other sources of reference. The real crux must have been at the beginning; for prior to 1841 (when Cayley stabilised the notation of determinants, though for long after that date, and even up to the present time, writers often indulged their own notational idiosyncrasies) determinants were not always distinguished by a special notation, but appeared in various -disguises. This fact quite precluded any cursory perusal; nothing but line-by-line scrutiny would do. To this almost intolerably tedious labour Muir brought a dour Scottish thoroughness and a determination to see justice done. Such of his manuscript as remains (tidy bundles, neatly labelled) bears evidence that again and again he revised a first depreciatory impression, a second reading being self-imposed to discover any underlying merit in the paper commented upon. Not the least of the good features (its unobtrusiveness indicating the time and trouble taken to make it so) is the welding of the material, the text being expounded by a wealth of felicitous brief examples, and by luminous pointers towards possible extension of the matter reviewed. It is this capacity for taking unbounded pains that makes Muir the ideal commentator.
The fifth volume brought the history up to 1920. Here the venerable author might have rested; but the surviving notes to which we have already alluded contain summaries of papers up to 1927 and lists up to 1930, as well as a bibliography of papers on matrices, a subject in which, through the work of Cayley, Sylvester and Frobenius, he had always been interested. Like MacMahon, he was curious about the abstract structure of determinants, permanents and cyclical products; and the work of these two men, in some respects complementary, on the generating functions of determinants and permanents and their relation to symmetric functions, can be put into contact with the theory of the symmetric group as developed by Frobenius.
The character of Muir pierces through all that he did; strength of will, tolerance, humour, courtesy, kindliness. In paying respect to his memory it is fitting, in conclusion, that we should bear in mind with pride that he was one of the founders of our Society, and a pioneer member. He died rich in honours, happy in three generations of his descendants, surrounded by grateful recognition for long service from his native and from his adopted country, felix opportunitate mortis.