CivStory

Al-Khwarizmi: Algebra, Algorithm and a Scholar from Khwarazm

Who was al-Khwarizmi? How a scholar of Khwarazmian origin working in Abbasid Baghdad gave the world algebra, and the word algorithm.

Open the interactive map

Who was al-Khwarizmi?

Muhammad ibn Musa al-Khwarizmi (c. 780 – c. 850) was a mathematician, astronomer and geographer who worked in Baghdad under the Abbasid caliphs. Two everyday words preserve his legacy. Algebra comes from al-jabr in the title of his treatise on equations, and algorithm comes from Algoritmi, the Latin form of his own name, attached to his book on Indian numerals. Few scholars have left so direct a mark on the vocabulary of modern science.

His name means the man from Khwarazm, the ancient Iranian region of Chorasmia on the lower Amu Darya, south of the Aral Sea, in what is now Uzbekistan and Turkmenistan. Yet almost nothing about his personal life is certain. What survives are his books, scattered references in later Arabic sources, and Latin translations that carried his methods into medieval Europe.

From Khwarazm to Baghdad: origins and career

Khwarazm had its own Eastern Iranian language, Khwarazmian, and a strong Zoroastrian heritage before and for some time after the Arab conquests; the later polymath al-Biruni came from the same region. Whether al-Khwarizmi himself was born there is debated. The historian al-Tabari also calls a Muhammad ibn Musa al-Khwarizmi al-Qutrubbulli, after a district near Baghdad, and al-Majusi, the Zoroastrian. Some modern historians concluded that his family came from Khwarazm and that he or his ancestors had been Zoroastrians; the historian of mathematics Roshdi Rashed argues instead that a missing word in the manuscript turned two different people into one. The safest statement is that his family origin was Khwarazmian and his career was Baghdadi.

That career unfolded in a city founded only in 762 and already one of the largest in the world. The caliph al-Ma'mun, who had governed from Merv in Khurasan before taking Baghdad in 819, sponsored translations, astronomical observations and scholarly debate. The tenth-century bibliographer Ibn al-Nadim says al-Khwarizmi was attached to the treasury or library of the Bayt al-Hikma, the House of Wisdom. Modern research suggests this was a royal library within a wider network of patrons and scholars rather than a single university, so his work belongs to that broader Baghdad milieu.

Al-Khwarizmi dedicated both his algebra and an astronomical work to al-Ma'mun, so his main output dates to the 820s and 830s. Al-Tabari also reports that in 847 the caliph al-Wathiq, when ill, consulted a group of astrologers including al-Khwarizmi, who predicted a long life; the caliph died days later. If the report refers to our scholar, he was still active at court nearly three decades after his algebra.

The algebra book: what al-jabr and al-muqabala mean

His most famous work is The Compendious Book on Calculation by Restoration and Balancing (al-Kitab al-mukhtasar fi hisab al-jabr wa al-muqabala). Al-jabr, restoration, means removing a subtracted quantity from one side of an equation by adding it to both sides; al-muqabala, balancing, means cancelling equal terms that appear on both sides. Together they are the basic moves still taught in school algebra.

Al-Khwarizmi reduced every problem he considered to one of six standard forms built from squares, roots and plain numbers, and gave a rule for solving each. His best-known example asks for a square which, together with ten of its roots, equals thirty-nine; in modern notation x² + 10x = 39, and the positive answer is 3. He justified his rules with geometric diagrams that literally complete a square. Everything was written in words: there were no symbols, and only positive solutions were accepted.

The book was deliberately practical. In its preface he says he wanted to teach what people constantly need in inheritance, legacies, lawsuits, trade, land measurement and canal digging. Its second half applies the methods to Islamic inheritance law, which required dividing estates among many heirs in fixed proportions.

Was al-Khwarizmi the father of algebra?

The title is popular but needs care. Babylonian scribes solved quadratic problems more than two thousand years earlier, the Greek mathematician Diophantus worked on equations in his Arithmetica, and the Indian astronomer Brahmagupta stated general rules for quadratics in the seventh century. A contemporary in Baghdad, Abd al-Hamid ibn Turk, wrote a similar treatise, of which a fragment survives.

What made al-Khwarizmi's book foundational was its organisation. Rather than offering clever solutions to individual puzzles, it treated equations as a subject in their own right, classified their types exhaustively, gave general procedures and proofs, and presented them as a tool anyone could learn. Medieval writers in Arabic, from Ibn Khaldun to Katib Celebi, credited him as the first to write on the discipline. Later mathematicians built on his framework, among them Abu Kamil in Egypt, al-Karaji in Baghdad, and Omar Khayyam, who classified and solved cubic equations geometrically.

From Algoritmi to algorithm: Indian numerals reach Europe

Al-Khwarizmi also wrote a book explaining the Indian decimal place-value system, with nine digits and a sign for zero, and how to add, subtract, multiply, divide and find square roots with it. The Arabic original is lost. It survives in Latin versions from the twelfth century, one of which opens with the words Dixit Algorizmi, thus spoke al-Khwarizmi.

Through such texts, European writers came to call the new method of calculating with these numerals algorism, and the word, later reshaped into algorithm, came to mean any precise step-by-step procedure. The numerals themselves, today called Hindu-Arabic numerals, travelled from India through the Islamic world to Europe; al-Khwarizmi was a key transmitter and teacher of the system, not its inventor. His algebra was translated into Latin by Robert of Chester in 1145 and again by Gerard of Cremona, and these traditions fed into works such as Fibonacci's Liber Abaci.

Astronomy, geography and legacy

Al-Khwarizmi's astronomical tables, the Zij al-Sindhind, drew on Indian methods along with Persian and Greek elements. They survive mainly in a Latin translation made by Adelard of Bath in 1126 from a later Andalusian revision. His Kitab Surat al-Ard, The Image of the Earth, revised Ptolemy's Geography and listed coordinates for more than two thousand places, improving, for example, the length of the Mediterranean. He also wrote on the astrolabe, sundials and the Jewish calendar.

Modern memory of al-Khwarizmi crosses borders. Iran names Kharazmi University and its leading national research and innovation award after him; Uzbekistan honours him with a statue in Khiva, in historic Khwarazm. Calling him an Iranian scholar is justified by his Khwarazmian origin, provided we remember that he wrote in Arabic within a multilingual Abbasid network. His achievement belongs to that shared world, and it lives on every time a student balances an equation or a computer runs an algorithm.

Frequently asked questions

What did al-Khwarizmi invent?

He did not invent equations or the decimal numerals, but he wrote the first known book that treated algebra as a systematic discipline, with standard forms, general methods and geometric proofs. He also wrote an influential guide to Indian numerals, astronomical tables and a revised world geography.

Where does the word algorithm come from?

It comes from Algoritmi, the Latin rendering of al-Khwarizmi's name in twelfth-century translations of his book on Indian numerals. Calculating with those numerals became known as algorism, which later became algorithm.

Was al-Khwarizmi Persian?

His name and the earliest biographical note link his family to Khwarazm, an Iranian-speaking region of Central Asia, so he is widely regarded as of Iranian origin. Whether he was born there or near Baghdad is debated, and he wrote in Arabic as a scholar of the Abbasid court.

What does al-jabr mean?

Al-jabr means restoration or completion: moving a subtracted term to the other side of an equation so that all terms are positive. It is paired with al-muqabala, balancing, which cancels equal terms on both sides.

Key events on the map

Guided storylines

Sources: