William Thomson's father, James Thomson, was a teacher of mathematics and engineering at the Royal Belfast Academical Institution and the son of a farmer. James Thomson married Margaret Gardner in 1817 and, of their children, four boys and two girls survived infancy. Margaret Thomson died in 1830 when William was six years old. William and his elder brother James were tutored at home by their father while the younger boys were tutored by their elder sisters. James was intended to benefit from the major share of his father's encouragement, affection and financial support and was prepared for a career in engineering. In 1832, his father was appointed professor of mathematics at Glasgow and the family moved there in October 1833. The Thomson children were introduced to a broader cosmopolitan experience than their father's rural upbringing, spending mid-1839 in London and the boys were tutored in French in Paris. Much of Thomson's life during the mid-1840s was spent in Germany and the Netherlands. Language study was given a high priority. His sister, Anna Thomson, was the mother of James Thomson Bottomley FRSE (1845–1926). Youth Thomson had heart problems and nearly died when he was 9 years old. He attended the Royal Belfast Academical Institution, where his father was a professor in the university department. In 1834, aged 10, he began studying at the University of Glasgow, not out of any precociousness; the University provided many of the facilities of an elementary school for able pupils, and this was a typical starting age. In school, Thomson showed a keen interest in the classics along with his natural interest in the sciences. At the age of 12 he won a prize for translating Lucian of Samosata's Dialogues of the Gods from Ancient Greek to English. In the academic year 1839/1840, Thomson won the class prize in astronomy for his Essay on the figure of the Earth which showed an early facility for mathematical analysis and creativity. His physics tutor at this time was his namesake, David Thomson. Throughout his life, he would work on the problems raised in the essay as a coping strategy during times of personal stress. On the title page of this essay Thomson wrote the following lines from Alexander Pope's Essay on Man. These lines inspired Thomson to understand the natural world using the power and method of science: Thomson became intrigued with Fourier's Théorie analytique de la chaleur