At a glance
- Era
- The Early Abbasid Caliphate
- Region
- Levant & Iraq

Quick facts
- Domain
- Mathematics and computation
- Kind
- Method
- First attested
- between 813 and 833 CE (derived)
- Era
- Abbasid age
- Where
- Baghdad
- Described in
- al-Kitab al-mukhtasar fi Hisab al-Jabr wal-Muqabala (The Algebra of al-Khwarizmi) · The Muqaddima
- Attribution
- Improvement
Who made it
- al-Khwarizmi Inventor
The claim and its basis
Muhammad ibn Musa al-Khwarizmi was the first to write on al-jabr wal-muqabala, making it an independent science with its three kinds of term, its six types and their proofs.
The book itself survives. In it al-Khwarizmi sets out that the numbers needed in reckoning by al-jabr and al-muqabala are of three kinds: roots, squares and simple number; he then gives three simple types in which one kind equals another and three compound types, proves the solutions of the compound types with squares, and states that every problem worked by al-jabr and al-muqabala must lead to one of the six. Ibn Khaldun says the first to write in this art was Abu Abd Allah al-Khwarizmi, and after him Abu Kamil Shuja' ibn Aslam. But solving equations is older than him: the Cairo editors survey equations in Egypt and Babylon, geometric solutions among the Greeks, analytic solutions in Heron and Diophantus, and Brahmagupta's rule in India. What is new in al-Khwarizmi is the gathering of this into an ordered, independent science with its proofs, not the solving of equations from nothing.
Sources: al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) · Muqaddimat Ibn Khaldun · CEBİR — TDV İslâm Ansiklopedisi (İhsan Fazlıoğlu) · Wikimedia Commons (file pages, CC BY-SA and CC BY licences)
Before it
- First-degree equations in the Egyptian Ahmes (Rhind) papyrus
- Babylonian tables of squares and cubes
- Greek geometric and analytic solutions: Euclid, Heron and Diophantus
- Indian rules for solving equations: Aryabhata, Brahmagupta and Mahavira
Built on it
- Commentaries on al-Khwarizmi's book by Sinan ibn al-Fath, Abd Allah ibn al-Hasan al-Saydanani and Abu al-Wafa' al-Buzjani
- Abu Kamil Shuja' ibn Aslam's Kitab al-Jabr wal-Muqabala
- Al-Karaji's algebra in al-Fakhri and al-Samaw'al's in al-Bahir
- Umar al-Khayyam's classification of cubic equations
- The Andalusian commentaries, among them al-Qurashi's
- Robert of Chester's Latin translation and the word 'algebra'
How it works
Summary
Algebra, al-jabr wal-muqabala, is the art of finding an unknown number from known ones through an equation. Muhammad ibn Musa al-Khwarizmi set it out in Baghdad under the caliph al-Ma'mun in a concise book, al-Kitab al-mukhtasar fi hisab al-jabr wal-muqabala, for people's needs in inheritance, bequests, trade and land measurement 1. He reduced every problem to three kinds of term and six types of equation, each with a rule and a geometric proof 2. Ibn Khaldun names him the first to write in this art 3, and the science still carries the name of his book in the world's languages 4.
What it is
Ibn Khaldun counts algebra among the branches of the science of number: a craft by which the unknown is drawn out of the known when there is a relation between them that requires it. Its terms are number, the "thing" (the root) and "wealth" (the square), and the equations between them end in six problems 3.
Al-Khwarizmi begins in the same way. The numbers needed in reckoning by al-jabr and al-muqabala, he says, are of three kinds: roots, squares and simple number that belongs to neither 5. Two operations give the art its name. Al-jabr, "restoring", removes a subtracted quantity from one side by adding it to both; al-muqabala, "balancing", cancels like terms that appear on both sides. To these TDV adds radd, dividing by the coefficient of the square, and ikmal, completing it to a whole square 6. In al-Khwarizmi's worked problems the restoring step appears again and again: a quantity "less ten things" is restored and the ten things are added to the other side 7.
The world before it
People had solved equations long before al-Khwarizmi. The Cairo editors of his book open with that history. The Egyptian Ahmes papyrus of about 1700 BCE, the oldest surviving school book, already has a first-degree equation in one unknown with a special sign for the unknown 8. The Babylonians made tables of squares and cubes, and Euclid has problems that amount to geometric solutions of quadratic equations 9. Heron of Alexandria gives the first analytic solution one can be sure of 10, and Diophantus knew how to solve quadratics with positive coefficients but did not arrange their types in order as al-Khwarizmi did 11.
In India, Aryabhata must have known the solution of quadratics, Brahmagupta in the seventh century gave a rule in words for solving them, and Mahavira, al-Khwarizmi's contemporary, also gave rules 12. TDV adds that the methods of double false position and of working backwards, and some types of word problem, entered Islamic algebra from Indian books, and that Qusta ibn Luqa translated Diophantus's Arithmetica into Arabic under the title Sina'at al-jabr, "the art of algebra" 6.
The story
In the early ninth century al-Ma'mun gathered scholars in Baghdad. The Cairo editors quote Ibn al-Nadim's Fihrist: al-Khwarizmi devoted himself to al-Ma'mun's treasury of wisdom, was one of the astronomers, and made the two astronomical tables known as the Sindhind 13.
In his preface al-Khwarizmi praises God and asks blessings on the Prophet ﷺ Muhammad, then says what moved him to write. The imam al-Ma'mun, commander of the faithful, loved learning, kept the learned close and helped them make clear what had been obscure, and this encouraged him to compose a concise book on reckoning by al-jabr and al-muqabala 14. He limited it to what is subtle and noble in reckoning and what people need constantly: inheritance, bequests, the division of estates, judgements, trade and all their dealings with one another, land measurement, digging canals, engineering, and other matters 5. The book has no year, but al-Ma'mun reigned from 813 to 833 CE 13, so it was written in those years.
A copy survives in the Bodleian Library at Oxford, written in Cairo in Muharram 743 AH. Frederic Rosen published it with an English translation in London in 1831, and the Cairo edition of 1939 was prepared from that manuscript 15.
The maker(s)
Abu Abd Allah (or Abu Ja'far) Muhammad ibn Musa al-Khwarizmi was an astronomer and mathematician at al-Ma'mun's court in Baghdad. The Cairo editors describe him as learned in arithmetic, geography and astronomy, and as rightly regarded as the founder of algebra 16. In the preface to his algebra he writes as a Muslim: he praises God, asks blessings on the Prophet and on the prophets before him, and calls al-Ma'mun the imam and commander of the faithful 14.
How it works
Al-Khwarizmi first gives three simple types, in which one kind of term equals another: squares equal roots, squares equal a number, and roots equal a number. He then gives three compound types: squares and roots equal a number, squares and a number equal roots, and roots and a number equal squares 17.
His best-known example is "a square and ten roots equal thirty-nine dirhams". The rule: halve the roots, which gives five; multiply it by itself, twenty-five; add this to thirty-nine, sixty-four; take its root, eight; and subtract half the roots, five, which leaves three. That is the root, and the square is nine 18. He then proves the rule with a drawing. A square stands for the unknown square, and rectangles on its sides stand for the ten roots; the corner left to complete the large square is five by five, or twenty-five, and the whole square is sixty-four with a side of eight 19.
He also notes the case with no solution: when the square of half the roots is smaller than the number joined to the square, "the problem is impossible". The editors add that the name lasted among mathematicians until the study of imaginary quantities began at the end of the eighteenth century 20. His algebra was wholly in words, with no symbols, and it accepted only positive roots 6. He ends the theory with the rule of the whole book: every problem worked by al-jabr and al-muqabala must lead to one of the six types 21.
The spread
The book was studied, commented on and extended across the Islamic world. The Fihrist names at least three men who wrote commentaries on it 22. Ibn Khaldun says that many Andalusians wrote fine commentaries on it, the best of them al-Qurashi's 23. Robert of Chester translated it into Latin, and L. C. Karpinski published an English version of that Latin translation in 1915 15.
What it was built on
Al-Khwarizmi's algebra drew on a long history of equation-solving: first-degree equations in the Ahmes papyrus, Babylonian tables, Greek geometric and analytic solutions, and Indian rules in words 24. TDV also notes the Indian influence on its methods and word problems 6. What he added was order: three kinds of term, six types, a rule for each, and a proof for each.
What was built on it
Abu Kamil Shuja' ibn Aslam, about 925 CE, names al-Khwarizmi plainly as one of his sources 16. Ibn Khaldun puts him next after al-Khwarizmi 3, and TDV says he grounded algebra in Euclidean geometry, worked with irrational numbers and solved geometric problems by algebra. Al-Karaji then made algebra arithmetical, freeing it from geometry, and worked on the expansion of (x + 1) to the power n. His follower al-Samaw'al al-Maghribi wrote numbers and quantities with letters in an abstract style. Umar al-Khayyam did for third-degree equations what al-Khwarizmi had done for the first and second degrees: he sorted them into thirteen types and solved them with conic sections 6. The Cairo editors add that al-Khayyam quotes Ibn Musa as a known authority without needing to name him 16. Ibn Khaldun had heard that a mathematician of the East took the equations past the six types to more than twenty, with geometric proofs 25.
Impact on daily life
How it changed history
Solving number problems became a science, with its own kinds of term, its chapters and its proofs: every problem is brought by al-jabr and al-muqabala to one of the six types 21. The Cairo editors write that his equations, such as "a square and ten roots equal thirty-nine", were repeated in every algebra book from his time to the start of the modern age, and that some are still found in algebra books today 16.
Who invented it?
The museum records al-Khwarizmi's work as an improvement. He did not invent the solving of equations, which is older than him, but he was the first known writer to make it an independent science.
Sunni view (Ibn Khaldun). Ibn Khaldun says the first to write in this art was Abu Abd Allah al-Khwarizmi, and after him Abu Kamil Shuja' ibn Aslam. He calls al-Khwarizmi's book on the six problems one of the best written on the subject, and says many Andalusians wrote commentaries on it 23.
Academic view (TDV). TDV reports the general agreement of historians that algebra became an independent science with al-Khwarizmi, and that later mathematicians such as Sinan ibn al-Fath acknowledged him as first. The one dissenter in his own era was Abu Barza, who claimed the honour for his grandfather Abd al-Hamid ibn Wasi' ibn Turk; Abu Kamil firmly rebutted him. TDV also sets out why some modern historians doubt that the book was the first: it calls itself a summary, al-Khwarizmi does not claim to be first, its terms are already mature, and there was a book by Ibn Turk and a lost book by Sanad ibn Ali on the subject 6.
Both views agree that his book is the oldest surviving work to set out algebra as a science of its own.
Today
Algebra is today a basic branch of mathematics taught in schools, and it writes equations in symbols. Al-Khwarizmi's algebra was wholly in words and accepted only positive roots; al-Samaw'al later began to write numbers and quantities with letters 6. The name of the science in all the world's languages comes from the word al-jabr that al-Khwarizmi used as the title of his book, and from his own name come the Latin "algorismus" and the English word "algorithm" 4.
Surviving examples
In culture
The names of al-Khwarizmi and of his book passed into the languages of the world. Among Muslims, Ibn Khaldun names him the first to write on algebra, and Zakariyya al-Qazwini says he was the first to bring algebra to the Muslims. In English his name became "algorithm", a set way of solving problems, and Chaucer used "augrim" for zero; until the early eighteenth century the numerals were called "algorismus" in Latin, and the Spanish word for a digit is "guarismo". His book's title became "algebra" 4.
For young readers
About twelve hundred years ago a scholar in Baghdad named al-Khwarizmi wrote a book teaching people how to find a number they did not know, so they could share out inheritances, measure land and work out trade. He sorted the problems into six kinds and explained each with drawings of squares. From his book's name, al-Jabr, comes the word algebra that pupils learn all over the world 28 4.
References
- Muhammad ibn Musa al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Ali Mustafa Mosharafa and Muhammad Mursi Ahmad, Cairo 1939: editors' introduction, scan pp. 13–26; author's preface and text, scan pp. 29–43, 51–53. 29
- Abd al-Rahman ibn Khaldun, al-Muqaddima, pp. 495–496, section "al-Jabr wal-muqabala". 23
- İhsan Fazlıoğlu, "CEBİR", TDV Encyclopedia of Islam, vol. 7 (1993), pp. 195–201, online edition. 6
- Wikimedia Commons, "Bodleian MS. Huntington 214 roll332 frame36.jpg", public domain, Bodleian Libraries. 27
Connections
- Invented by
- al-Khwarizmi
- Described by
- al-Kitab al-mukhtasar fi Hisab al-Jabr wal-Muqabala (The Algebra of al-Khwarizmi)· The Muqaddima
People and things also explored
Abd Allah al-Ma'mun ibn Harun al-Rashid· Abu Kamil Shuja ibn Aslam· Ali Mustafa Mosharafa· The six types of equation (al-Khwarizmi)· Algebra (al-jabr)· Circular reckoning (hisab al-dawr)· Mensuration (ilm al-misaha)· Wasiyya (bequest, fiqh)
Sources
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 29–30
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 30–43
- Muqaddimat Ibn Khaldun , p. 495
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 25
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 30
- CEBİR — TDV İslâm Ansiklopedisi (İhsan Fazlıoğlu) , pp. 195–201
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 51–53
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 14
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 16
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 16–17
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 17–19
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 19–20
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 22
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 29
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 26
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 24
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 31–32
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 32–33
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 35–37
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 35
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 43
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 23
- Muqaddimat Ibn Khaldun , pp. 495–496
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 13–21
- Muqaddimat Ibn Khaldun , p. 496
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 83
- Wikimedia Commons (file pages, CC BY-SA and CC BY licences)
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 29–32
- al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 13–53
Cite this page
islam.museum contributors. “Algebra (al-jabr wal-muqabala as a discipline in al-Khwarizmi's work)”. islam.museum, https://islam.museum/en/invention/algebra/. CC BY-SA 4.0. Last updated 2026-11-05.
Improve this page on GitHub · Report an error · Help complete it · JSON