Muhammad ibn Musa al-Khwarizmi (c. 780–c. 850) was a mathematician and astronomer from Khwarazm, south of the Aral Sea, who worked in Baghdad under the caliph al-Ma’mun. His Book of Restoration and Balancing founded algebra as a subject and gave it its name, and the Latin form of his own name, Algoritmi, is the origin of the word “algorithm”.
| Born | c. 780, probably in Khwarazm (today divided between Uzbekistan and Turkmenistan) |
|---|---|
| Died | c. 850, Baghdad |
| Patron | The Abbasid caliph al-Ma’mun (r. 813–833) and his successors |
| Main works | Al-Kitab al-mukhtasar fi hisab al-jabr wa’l-muqabala (Algebra); a book on Indian numerals; Zij al-Sindhind (astronomical tables); Kitab surat al-ard (geography) |
| Language | Arabic |
| Legacy | The words “algebra” (from al-jabr) and “algorithm” (from his name) |
Why al-Khwarizmi belongs on this page
Al-Khwarizmi did not work at the court of an Iranian dynasty. He lived in Baghdad and served the Abbasid caliphs, and he wrote in Arabic, the language of science across the Islamic world. He sits in this section for two reasons. First, his working life falls exactly in the decades when the Iranian intermezzo began: al-Ma’mun had ruled from Merv in Khorasan before moving to Baghdad in 819, his general Tahir founded the Tahirid dynasty in 821, and al-Khwarizmi’s main books date from the 820s and 830s. Second, he was one of the first of a long line of scholars from the Iranian world, from Khwarazm and Khorasan to Rey and Fars, who made the mathematics of the medieval Islamic world; this page also follows that line. The Baghdad background is set out on Persian influence on the Abbasid caliphate.
A scholar from Khwarazm
Almost nothing is known of his life. His name, al-Khwarizmi, says that he or his family came from Khwarazm, the oasis on the lower Oxus whose people spoke an Iranian language, Khwarezmian. The historian al-Tabari calls him “Muhammad ibn Musa al-Khwarizmi al-Majusi al-Qutrubbulli”. “Al-Majusi” would suggest Zoroastrian ancestry, and “al-Qutrubbulli” points to Qutrubbul, a district near Baghdad; some scholars think he was born there to a family from Khwarazm. Roshdi Rashed, a leading historian of Arabic mathematics, argues that the text is corrupt and that a word “and” has dropped out, so that al-Tabari was naming two different people. The question is open.
The House of Wisdom
Al-Khwarizmi is usually described as a scholar of al-Ma’mun’s Bayt al-Hikma, the House of Wisdom. Medieval sources do link him with it, but historians such as Dimitri Gutas warn against imagining a university or research academy. The Bayt al-Hikma was above all a palace library, modelled on the royal libraries of the Sasanian kings, where books were kept, copied and sometimes translated. The great translation of Greek science into Arabic was paid for by many patrons across Baghdad, not by one institution. What is clear is that al-Ma’mun’s court gave mathematicians and astronomers support, instruments and books from Greek, Persian and Indian traditions.

Algebra: restoration and balancing
His most famous book, written in the 820s or 830s and dedicated to al-Ma’mun, was meant to be practical. Al-Khwarizmi says he wrote it to help people with what they constantly need in inheritance, legacies, partnerships, lawsuits, trade and the measuring of land. Its title names two operations. Al-jabr, “restoration”, means moving a subtracted quantity to the other side of an equation so that both sides are positive; al-muqabala, “balancing”, means cancelling equal terms on both sides.
The book sorts all equations of the first and second degree into six standard types and gives a rule for each, then proves the rules with geometric figures of squares and rectangles. Its best-known example is “a square and ten roots equal thirty-nine dirhams”, in modern notation x² + 10x = 39, which he solves by “completing the square” to find that the root is 3. There are no symbols at all: every equation, even every number, is written out in words. What was new was not any single technique, many of which Babylonian and Greek mathematicians had known, but the idea of algebra as a general method for solving whole classes of problems.
Numbers, stars and maps
- Indian numerals. A short book explained calculation with the nine Indian digits and zero in place-value notation. The Arabic original is lost. It survives in a Latin version whose first words are “Dixit Algorizmi”, “Algorizmi said”, and from these medieval Europeans formed “algorism” for decimal arithmetic, later “algorithm”.
- Astronomy. His Zij al-Sindhind, a set of astronomical tables based largely on Indian methods, survives in a Latin translation by Adelard of Bath of a later revision made in Muslim Spain.
- Geography. The Kitab surat al-ard, “Book of the Shape of the Earth”, revised Ptolemy’s Geography and listed coordinates for more than two thousand places.
- Smaller works on the astrolabe, sundials and the Jewish calendar are also attributed to him.
Into Europe
In 1145 the English scholar Robert of Chester translated the Algebra into Latin at Segovia, and Gerard of Cremona made another version a little later. Together with the Latin arithmetic, these books carried Indian numerals and algebra into Europe. Leonardo of Pisa (Fibonacci) drew on this tradition in his Liber abaci of 1202.
Persian mathematics after al-Khwarizmi
Al-Khwarizmi was the first of many. Over the next six centuries mathematicians from the Iranian world carried his subject much further:
- Al-Mahani (9th century), from Mahan near Kerman, worked on problems from Archimedes that lead to cubic equations.
- Abu’l-Wafa al-Buzjani (940–998), from Khorasan, worked in Buyid Baghdad and made major advances in trigonometry; see culture under the Buyids.
- Kushyar ibn Labban of Gilan wrote an influential introduction to Indian reckoning around 1000.
- Al-Biruni, another Khwarazmian, applied mathematics to astronomy and geography.
- Omar Khayyam (1048–1131) gave geometric solutions of cubic equations, the next great step in algebra after al-Khwarizmi.
- Nasir al-Din Tusi (1201–1274) made trigonometry an independent subject.
- Jamshid al-Kashi (d. 1429), at Samarqand, calculated π to sixteen decimal places.
The wider story is told on science in Iranian history. Today Iran names its main international science prize, the Khwarizmi International Award, after him, and Uzbekistan has raised statues of him in Urgench and Khiva, in old Khwarazm.
Persian words from this page
| خوارزمی | Khârazmi | al-Khwarizmi |
| خوارزم | Khârazm | Khwarazm |
| جبر | jabr | algebra |
| جبر و مقابله | jabr-o moqâbele | restoration and balancing |
| الگوریتم | algoritm | algorithm |
| ریاضیات | riyâziyât | mathematics |
| مأمون | Ma’mun | the caliph al-Ma’mun |
Sources and further reading
- Al-Khwarizmi, The Algebra of Mohammed ben Musa, ed. and trans. Frederic Rosen (London, 1831).
- Roshdi Rashed, Al-Khwarizmi: The Beginnings of Algebra (Saqi, 2009).
- Dimitri Gutas, Greek Thought, Arabic Culture: The Graeco-Arabic Translation Movement in Baghdad (Routledge, 1998).
- G. J. Toomer, “al-Khwārizmī, Abu Ja’far Muḥammad ibn Mūsā”, Dictionary of Scientific Biography, vol. 7 (1973).
- Encyclopaedia Iranica, article “Ḵᵛārazmī, Abu Ja’far Moḥammad b. Musā”.
- J. L. Berggren, Episodes in the Mathematics of Medieval Islam (Springer, 1986; 2nd ed. 2016).
Want to learn Persian? Get the free Starter Pack
Get the 14-page printable Starter Pack (all 32 letters, a 7-day reading plan, 100 core words and 20 survival phrases) and a short 5-email course. Free.
More in The Iranian Intermezzo (821–1055)
- The Tahirids of Khorasan
- The Saffarids and Ya’qub the Coppersmith
- Amr ibn Layth and the Saffarid–Samanid War
- The Zaydi Alavids of Tabaristan
- The Samanid Empire
- Ismail Samani
- The Samanid Persian Renaissance
- Rudaki, Father of Persian Poetry
- Bal’ami and Early Persian Prose
- The End of the Samanids
- The Ziyarids and Qabus ibn Voshmgir
- Gonbad-e Qabus Tower
- The Daylamites: Mountain Warriors of Gilan
- The Buyid Dynasty
- Adud al-Dawla
- Culture under the Buyids
- The Kakuyids of Isfahan
- Al-Khwarizmi and Persian Mathematics
- Muhammad ibn Zakariya al-Razi
- Ferdowsi and the Shahnameh
- Avicenna (Ibn Sina)
- Al-Biruni