Maxwell grew up in a rich religious family. In 1845, when he was only 14, he wrote a paper describing a way of drawing mathematical curves with a piece of string. In 1847 he started studying mathematics at the University of Edinburgh. In 1850 Maxwell changed to Peterhouse and then Trinity College at the University of Cambridge. He won prizes from the university for his work and was given his degree in 1854. From 1855 to 1872 he did research on colour blindness.