Muḥammad ibn Mūsā al-Khwārizmī (c. 780 – c. 850), formerly Latinized as Algoritmi, was a scholar who produced works in mathematics, astronomy, and geography under the patronage of the Caliph Al-Ma'mun of the Abbasid Caliphate. Around 820 AD he was appointed as the astronomer and head of the library of the House of Wisdom in Baghdad. Al-Khwarizmi's popularizing treatise on algebra (The Compendious Book on Calculation by Completion and Balancing, ca. 813-833 CE) presented the first systematic solution of linear and quadratic equations.