Thomas Muir, mathematician and educationist, studied at the University of Glasgow where he initially excelled in Greek. However, the prominent mathematician and physicist William Thomson (later Lord Kelvin) recognised and encouraged his mathematical ability. In 1868 he obtained the Master of Arts (MA) degree in mathematics (with distinction), and also qualified as a teacher. After some time as a tutor at the University of St Andrews (1868-1871) he continued his mathematical studies in Berlin and Göttingen, meeting some of the top German mathematicians whose most recent work was hardly known in Britain. In 1871 he became assistant in mathematics at the University of Glasgow. After reading his first mathematical paper before the Royal Society of Edinburg in 1872 he was elected a Fellow of this society at an unusually young age. Several of his early papers dealt with the transformation of infinite series into continued fractions. In 1874 he was appointed head of the mathematics and science departments at the Glasgow High School, where he remained for 18 years. In 1874 he also took up as his life's work in mathematics the history and theory of determinants. His first book, Treatise on the theory of determinants, was published in 1882. Soon thereafter he was elected president of the Edinburgh Mathematical Society, delivering a presidential address entitled "On the promotion of research". In October 1876 he married Maggie Bell, with whom he had four children.
In May 1892 Muir succeeded Sir Langham Dale* as superintendent-general of education in the Cape Colony. Soon after his appointment he launched an extensive survey of educational facilities and on the basis of the information so gained instituted much needed reforms. The Department of Education was enlarged and its organisation improved; more school inspectors were appointed; additional teachers were recruited, most of them Scotish graduates; and several teachers' training colleges established. Through his efforts statutory school boards were introduced in 1905 to supervise and promote education locally. Compulsory schooling for European children up to age 13 (or passing Grade 6) was introduced on an experimental basis in urban areas in 1909 and was soon adopted by most school boards throughout the colony. He promoted the widening of the primary school curriculum by making provision for the teaching of subjects such as woodwork, nature study, drawing and needlework. From 1899 successful schools were graded as "high schools" and received more staff, so that pupils could be better prepared for matriculation. He introduced the teaching of science, and made money available for laboratories and equipment. However, his view of secondary education was rather narrowly academic, with the result that vocational training (including agriculture) was neglected. He was none the less the most important reformer and organiser in the history of Cape education. When the Union of South Africa was formed in 1910 he continued as superintendent-general of education of the Cape Province, a post he retained until his retirement in 1915 at the age of 70.
In spite of his heavy work load Muir found time to continue his studies of determinants. He published a total of 307 mathematical papers and was particularly active during his retirement. Four papers appeared in the Reports of the South African Association for the Advancement of Science (1903, 1916), seven in the Transactions of the South African Philosophical Society (1904-1907), 56 in the Transactions of the Royal Society of South Africa (1908-1934), while most of the rest were published in Edinburgh. In these papers he supplemented or improved existing proofs, added new material, reviewed earlier work, and presented bibliographies of earlier publications on determinants. He also wrote a textbook of arithmetic for schools (1878) and a textbook of the theory of determinants for colleges (1882, with subsequent editions to 1933). However, his major work was a five-volume treatise, The theory of determinants in the historical order of its development (London, 1890-1929). This monumental work constituted perhaps the most detailed and comprehensive history of any branch of theoretical knowledge. Not only did it make the pioneering work in this field since the late seventeenth century readily available, but also served to systematise isolated, overlapping, and duplicate contributions. Part 1 of the first volume appeared in 1890, and the whole Volume 1 in 1906. It covered the topic from its origins with G.W. Leibniz until 1840. Subsequent volumes dealt with the years 1840-1860 (Vol. 2, 1911), 1860-1880 (Vol. 3, 1920), 1880-1900 (Vol. 4, 1923), and 1900-1920 (Vol. 5, 1929). At the time of his death Muir was rather optimistically working on a sixth volume which would take the history forward to 1940. What makes this work all the more remarkable is the fact that it was carried out in an academically poorly developed colony with restricted library facilities. This drawback was partly overcome with the help of colleagues overseas. He bequeathed his mathematical library, then one of the finest private collections of mathematical books and journals in the world, to the South African Public Library (now the National Library, Cape Town).
Muir was a leading public figure at the Cape, a kindly, courteous man with a quick sense of humour, a penetrating wit, and wide cultural interests that included music, poetry and English literature. For example, he wrote the words of a song, "A highland idyll" (1915?). He served on the council of the University of the Cape of Good Hope from 1892 to 1913, as vice-chancellor from 1897 to 1901, and as joint vice-chancellor from 1901 to 1905. He was also an examiner for the university, setting papers in various branches of mathematics for the BA and BA Honours examinations during 1894-1896. In September 1893 he was appointed by the government as one of the trustees of the South African Museum and served in that capacity to his death in 1934. He was also a trustee of the South African Public Library from 1893 to 1928. As an excellent organiser with a keen interest in scientific research he was appointed a member of the Meteorological Commission of the Cape of Good Hope soon after his arrival in 1892, serving for many years. With the help of the famous Scotish meteorologist Alexander Buchan* he brought about the appointment of Charles M. Stewart* as secretary of the Commission in 1897. Also in 1892 he became a member of the South African Philosophical Society, served on its council from 1893, and as president from 1895 to 1897. In 1908 he became one of the initial Fellows of its successor, the Royal Society of South Africa, and served as joint vice-president. Meanwhile in 1895 the government of the Cape Colony appointed the Geological Commission of the Cape of Good Hope to organise a geological survey of the colony, with Muir as one of its five members. In 1902 he was a foundation member of the South African Association for the Advancement of Science, serving as joint vice-president during its first two years and as president in 1910.
Muir received many honours: An honorary Doctor of Laws (LLD) degree from the University of Glasgow (1882), the Keith Prize of the Royal Society of Edinburgh (1884, 1899), honorary Fellowship of the Scottish Geographical Society (1892), Fellowship of the Royal Society of London (1900), the Gunning-Victoria Prize for scientific work of the Royal Society of Edinburgh (1916), and the first honorary Doctor of Science (DSc) degree from the University of Cape Town (1921). He was made a Companion of the Order of St Michael and St George (CMG) in 1901, and received a knighthood in 1915.