David Brewster was born in Jedburgh on 11 December 1781. His father was James Brewster, rector of Jedburgh Grammar School. At the age of twelve, in 1793, Brewster began following classes at Edinburgh University with the ambition of going into the Church. In 1799 he became tutor to the Horsbrugh [sic] family in Pirn, Peebleshire, and in 1802 he was the editor of the Edinburgh magazine. Licensed to preach by the presbytery of Edinburgh, Brewster gave his first sermon in March 1804 but nervousness led him to abandon this career. In 1804 he became tutor to a family in Dumfriesshire and he remained there until 1807 while he pursued scientific studies and the study of literature.
In 1807, Brewster was a candidate for the Chair of Mathematics at St. Andrews University, but without success. In 1813, he submitted a paper to the Royal Society of London on Some properties of light and the same year he published a Treatise on new philosophical instruments. In 1814, illness prompted him to visit Paris and Geneva and on his return to Britain he continued publishing. In 1815, he became a Fellow of the Royal Society.
In 1816, Brewster invented the kaleidoscope and although he patented the invention, it was quickly pirated because of a fault in the registration. He published his Treatise on the kaleidoscope in 1819. Together with the mineralogist Professor Robert Jameson, he edited the Edinburgh philosophical journal, previously called the Edinburgh magazine, and in 1819 when the name changed again to the Edinburgh journal of science he was the sole editor. In 1820, Brewster became a member of the Institute of Civil Engineers in London, and in 1821 he was active in the formation of the Royal Scottish Society of Arts of which he became director. In 1822, he became a member of the Royal Irish Academy of Arts and Sciences.
It was at this time too that Brewster edited a translation of Legendre's Geometry and Euler's Letters to a German princess. Other published work to 1829 includes On the periodical colours produced by grooved surfaces, The optical nature of the crystalline lens, and The colours of film plates. In 1827, he published his account of a new system of illumination for lighthouses. In 1831, in York, he was among those who set up the British Association for the Advancement of Science. The same year, Brewster was knighted.
In December 1837, he became the Principal of the United College of St. Salvator and St. Leonard at St. Andrews University. In 1859 he became Principal of Edinburgh University.
Sir David Brewster died from an attack of pneumonia at Allerby, Melrose, on 10 February 1868.