Dugald Stewart's father was Matthew Stewart who was Professor of Mathematics at the University of Edinburgh at the time Dugald was born. Matthew Stewart had married Marjorie Stewart, the only daughter of Archibald Stewart, writer to the signet, on 20 May 1750. Dugald was their only child who survived beyond childhood. He attended Edinburgh high school from 1761 to 1765 and then entered the University of Edinburgh where he took an arts degree although he attended courses in natural philosophy :-
From his classes in natural philosophy Stewart carried away the greatest admiration for "the inductive method".
Advised by his moral philosophy professor Adam Ferguson to attend the lectures of Thomas Reid in Glasgow, Stewart spent the year 1771-72 there. He was particularly influenced by Reid's An Inquiry into the Human Mind on the Principles of Common Sense (1764). Stewart returned to Edinburgh in 1772 and by that time his father's health was deteriorating so Dugald Stewart assisted his father with teaching mathematics. In fact Matthew Stewart was forced give up teaching and went to live on his estate at Catrine in Ayrshire. Dugald completely took over the duties of mathematics professor and he performed these duties so well that in 1775 he was elected joint professor with his father.
Although he was now the Professor of Mathematics at Edinburgh, his interests were firmly in philosophy and he also taught moral philosophy at Edinburgh during session 1778-79 while Adam Ferguson was in America. Stewart taught mathematics at Edinburgh for 13 years until Adam Ferguson resigned in 1785 when he was appointed to the philosophy chair and resigned from the chair of mathematics. The following comment in  links Stewart's mathematics and philosophy:-
[Dugald] Stewart, like Reid, held that philosophy should be a scientific discipline unfettered by metaphysical speculations and categories, though he objected to some of Reid's formulations of his new science of mind. Stewart's affinity for the scientific approach to philosophical problems is reflected in his mathematics career, and he often made analogies between the axioms of mathematics and the laws that govern human thinking.
In 1783 Stewart married Helen Bannatyne; they had one son Matthew. Sadly Helen died in 1787. On 29 July 1790 Stewart married Helen D'Arcy Cranstoun; they also had one son George who died in 1809. After the death of George, Stewart was greatly affected and his health began to deteriorate. He resigned from his chair in 1810.
Stewart had been involved in an interesting controversy in 1805 over the appointment of Leslie to the chair of mathematics at Edinburgh. The story of this controversy, and Stewart's part in it, is told in  and it is an interesting one since it revolves round whether the Church could control the scientific views taught in the universities:-
Before his election the Edinburgh moderates had insinuated that Leslie was an atheist. They adduced note xvi of his "Heat" in which he had written favourably about the doctrine of the sceptical David Hume that causation was nothing more than an observed constant and invariable sequence of events. When they brought forward their own candidate, Thomas MacKnight, an Edinburgh clergyman, Stewart and Playfair protested against the uniting of clerical and academic posts and objected to the intended clerical domination of the University of Edinburgh on the pattern of St Andrews. After Leslie's election the Edinburgh moderates, determined to oust Leslie, took the affair to the general assembly of the Church of Scotland, its highest forum, which decided in May 1805 by the narrow majority of 96 to 84 that the affair be dropped and Leslie be left undeposed from his mathematics chair.
In fact Stewart, in his role as an elder, supported Leslie when he addressed the General Assembly where Leslie was charged with atheism. Stewart was a staunch believer in intellectual freedom and his views supporting Leslie were set out in A short statement of some important facts (1805).
Stewart was a philosopher of high international standing :-
Stewart followed Reid in claiming that any philosophy which contravenes the principles of common sense must be false, and the problem is to discover and eliminate the premise which yields such results. he added the requirement that philosophical propositions must not change the meanings of concepts of ordinary life ...
Stewart's publications include Outlines of Moral Philosophy (1793), Philosophical Essays (1810), and Philosophy of the Active and Moral Powers of Man (1828). His major publication, however, was Elements of the philosophy of the human mind which appeared in three parts over a period of 35 years. The first appeared in 1792, the second in 1814 and the third part in 1827. Grave writes in :-
Natural philosophy became science, [Stewart] held, when inquiry, freed from metaphysical conjecture, was directed towards discovering by observation and experiment the laws governing the connection of physical phenomena. The science of nature has advanced by bringing these uniformities, by the same method, under laws of higher generality ... The transformation of the philosophy of the mind is similar. It requires that the phenomena of consciousness be approached without conjecture and that the laws of connection be inductively established. The aim of the science of the mind is to arrive at a knowledge of the "general laws of constitution", which would correspond to Newtonian principles in physics and, like them, would make possible the deductive explanation of a great range of phenomena.
In fact Stewart's influence on physics is especially interesting and it form the main topic of  where Olson argues that Stewart's view of mathematics put geometry at its foundations rather than algebra, and that his views on this influenced the physical thinking of Maxwell and Rankine. We end this brief description of Stewart's philosophical ideas with the following summary from :-
Stewart was perfectly aware of the tensions in his own thinking. On the one hand, he was a thorough inductionist in philosophy and psychology ... On the other hand, he was sensitive to the realistic interpretations of Kepler and Galileo, who saw that hypotheses were not simply instrumental devices. He was pulled both ways, and his work emerges as a significant connecting link between naive inductivism and later technical views on scientific theory ...
The following comment occurs in Encyclopaedia Britannica:-
[Dugald] Stewart's affinity for the scientific approach to philosophical problems is reflected in his mathematics career, and he often made analogies between the axioms of mathematics and the laws that govern human thinking.
Article by: J J O'Connor and E F Robertson