The Almagest was written by Claudius Ptolemy, a Greco-Roman astronomer, mathematician, and geographer of the 2nd century AD.