Although Gauss made many contributions to applied science, especially electricity and magnetism, pure mathematics was his first love: he called mathematics "the queen of the sciences" and arithmetic "the queen of mathematics." His influence on mathematics was as significant to nineteenth-century science as Newton's had been to the science of the eighteenth century.
Gauss studied mathematics at the University of Göttingen from 1795 to 1798, and received his doctorate for a proof of an algebraic theorem which had long eluded definitive proof. His Disquisitiones arithmeticae appeared when he was only twenty-four, and in his development of the idea of complex numbers revolutionized number theory and Euclidean geometry.
Gauss applied many of his mathematical insights in the field of astronomy by successfully using the method of least squares to predict the location of the asteroid Ceres in 1801. He described his methods at length in Theoria motus corporum coelestium (1809).
In 1803 Gauss turned down an offered professorship in St. Petersburg, becoming instead a professor of astronomy at the University of Göttingen in 1807.
In 1820 Gauss made important inventions and discoveries in geodesy, the study of the shape and size of the earth, and in statistics, in which he developed the idea of the bell curve and normal distribution. In the 1830s he developed theories of non-Euclidean geometry and mathematical techniques for studying the physics of fluids.