Clausius was born in Köslin (now Koszalin, Poland) in the Province of Pomerania in Prussia. His father was a Protestant pastor and school inspector, and Rudolf studied in the school of his father. In 1838, he went to the Gymnasium in Stettin. Clausius graduated from the University of Berlin in 1844 where he had studied mathematics and physics since 1840 with, among others, Gustav Magnus, Peter Gustav Lejeune Dirichlet and Jakob Steiner. He also studied history with Leopold von Ranke. During 1848, he got his doctorate from the University of Halle on optical effects in Earth's atmosphere. In 1850 he became professor of physics at the Royal Artillery and Engineering School in Berlin and Privatdozent at the Berlin University. In 1855 he became professor at the ETH Zürich, the Swiss Federal Institute of Technology in Zürich, where he stayed until 1867. During that year, he moved to Würzburg and two years later, in 1869 to Bonn.