Ptolemy, the 2nd-century mathematician, is remembered most for his astronomy. He composed the Almagest, a thirteen-book treatise comprised of astronomical models and tables that explain the movements of the stars and planets and predict where any celestial body will be on any given date. The Almagest was so influential that it eclipsed the astronomical texts that preceded it and became authoritative. In medieval Islam and Renaissance Europe, mathematicians studied it as the premier text in astronomy.
Although astronomy was first in importance for Ptolemy, it was just one of the mathematical sciences he studied. He also composed texts on harmonics and geography, for instance, and he approached these fields in a mathematical way. He additionally studied what were then considered physical sciences, including element theory, cosmology, and astrology, but most of his contributions were in the mathematical sciences.
Why was Ptolemy so dedicated to the study of the mathematical sciences? Today many of us take for granted that mathematics and the mathematical sciences are worthy of study, but the high-level study of mathematics was rare in antiquity. At any given time in the ancient Mediterranean, at most a few dozen individuals pursued it. Moreover, we have no evidence of mathematical schools at least until the 4th century CE. Much more common was the study of philosophy, especially in the traditions established by Plato and Aristotle. Advanced mathematics, then, was not an obvious choice, and it is reasonable to ask why anyone would devote his or her life to its study.
I argue in my book, Ptolemy’s Philosophy: Mathematics as a Way of Life, that the answer to why Ptolemy devoted his life to the mathematical sciences lies in his philosophy . Scattered among his more technical discussions in the mathematical and physical sciences are references to a fully developed and unique philosophical system. He engages with the most fundamental areas of philosophy—metaphysics, epistemology, and ethics—and he even makes claims that would have been highly controversial at the time.
What most motivates Ptolemy’s study of mathematics is his ethics, his theory of what it means to be excellent and live the best life possible. He adapts a type of ethical commitment endorsed by Plato, where the principal goal of life is to be as much as possible like the gods. Even though Plato and Ptolemy were Greek, the idea is not to be like any of the Olympian gods we are familiar with from Greek mythology. Instead, the goal is to emulate the divine, where the divine is anything that is eternal. For Ptolemy, the divine entities we specifically are meant to emulate reside in the heavens. In ancient Greek cosmology, a spherical Earth lies at the center of the cosmos and is surrounded by a series of spheres, on which are situated the stars and planets. The cosmos, from the Moon outwards to the sphere of fixed stars, is the heavens.
With regard to virtuous conduct in actions and character, [mathematics], above all, could make clearsighted men; from the constancy, good order, commensurability, and calm that are contemplated in the case of the divine, it, on the one hand, makes its followers lovers of this divine beauty, and, on the other hand, accustoms and, as it were, reforms their natures to a similar state of the soul .
The theoretical science of [harmonia] is a form of mathematics, the [form] concerned with the ratios of differences between things that are heard, this [form] itself contributing to the good order that arises out of the theory and understanding to people habituated in it .
 Feke, Jacqueline. (2018) Ptolemy’s Philosophy: Mathematics as a Way of Life. Princeton University Press.
 Ptolemy, Almagest 1.1, H7. Translation by the author.
 Ptolemy, Harmonics 3.4, D94-5. Translation by the author.