Algebra (al-jabr wal-muqabala as a discipline in al-Khwarizmi's work)

علم الجبر والمقابلة (الجبر علماً مستقلاً عند الخوارزمي)

The art of finding an unknown number from known ones through an equation between three kinds of term (number, root or 'thing', and square or 'wealth'), reduced by al-jabr and al-muqabala to six types, each with a rule of solution and a geometric proof. Muhammad ibn Musa al-Khwarizmi wrote a concise book on it under the caliph al-Ma'mun for people's needs in inheritance, bequests, trade and land measurement; Ibn Khaldun names him the first to write in this art, and the world's word 'algebra' comes from his title.

Depth

At a glance

Era
The Early Abbasid Caliphate
Region
Levant & Iraq
A manuscript open at two pages of light brown paper, written in close lines of black naskh script, with small slanting notes in the margin of the right-hand page. At the foot of each page is a drawing in red ink: a large square divided by lines into smaller squares and rectangles, with Arabic letters at their corners.
Image: two pages of al-Khwarizmi's al-Jabr wal-Muqabala (Bodleian, MS Huntington 214). Bodleian Libraries, University of Oxford, MS. Huntington 214; public domain via Wikimedia Commons: https://commons.wikimedia.org/wiki/File:Bodleian_MS._Huntington_214_roll332_frame36.jpg

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

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

what al-Khwarizmi's algebra was built on and what was built on it

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

The book was written for daily needs. Al-Khwarizmi says it was meant for inheritance, bequests, the division of estates, trade, land measurement and digging canals 5. A long Book of Bequests in the same work, beginning at scan p. 83, applies its rules to shares of estates and bequests 26.

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

The book survives in a manuscript in the Bodleian Library at Oxford, copied in Cairo in Muharram 743 AH 15. The image on this page shows two pages of a Bodleian manuscript of the book, with its proofs drawn as squares in red ink 27.

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

Explore the 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

  1. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 29–30
  2. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 30–43
  3. Muqaddimat Ibn Khaldun , p. 495
  4. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 25
  5. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 30
  6. CEBİR — TDV İslâm Ansiklopedisi (İhsan Fazlıoğlu) , pp. 195–201
  7. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 51–53
  8. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 14
  9. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 16
  10. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 16–17
  11. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 17–19
  12. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 19–20
  13. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 22
  14. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 29
  15. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 26
  16. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 24
  17. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 31–32
  18. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 32–33
  19. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 35–37
  20. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 35
  21. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 43
  22. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 23
  23. Muqaddimat Ibn Khaldun , pp. 495–496
  24. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 13–21
  25. Muqaddimat Ibn Khaldun , p. 496
  26. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , p. 83
  27. Wikimedia Commons (file pages, CC BY-SA and CC BY licences)
  28. al-Khwarizmi, Kitab al-Jabr wal-Muqabala, ed. Mosharafa and Ahmad (Cairo, 1939) , pp. 29–32
  29. 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

Wing

Ideas

Beliefs, concepts, sciences and schools, explained in plain words.
Related

Abd Allah al-Ma'mun ibn Harun al-Rashid

Abbasid caliph, given the oath of allegiance at Baghdad after the deposition of his brother al-Amin in 196 AH; he died in 218 AH. Al-Tabari also records the mihna over the Qur'an in his reign. According to al-Suyuti, he was born on the night of Saturday, fourteen days before the end of Rabi' I 170, the night his paternal uncle al-Hadi died and his father's accession was made; there was no other night in all time in which one caliph died, another rose, and a child was born, except this one. Also according to al-Suyuti, in 204 he set out and entered Baghdad in Safar, where the Abbasids asked him to return to black, the Abbasid colour, and he agreed; in 218 people were tested on the doctrine that the Qur'an was created. He alone, after Uthman ibn Affan, is said to have memorised the Qur'an among the caliphs, and his seal bore the inscription 'Abd Allah ibn Ubayd Allah'. A woman asked him about the division of an inheritance of 600 dinars; he reckoned it out: two daughters take two-thirds, a mother a sixth, a wife an eighth, and twelve brothers received two dinars each while she received one dinar, and it came out as he had said. Also according to al-Suyuti, a Kharijite came to him and asked what had moved him to oppose them; he answered with a verse of God's Book, and when asked whether he knew it was revealed he said yes, and when asked for proof he gave the consensus of the community. The Kharijite replied: 'As you accepted their consensus on the revelation, accept their consensus on the interpretation.' The Kharijite said, 'You have spoken truly,' and addressed him as Commander of the Faithful. The first hadith he transmitted from a pulpit set up for him was, through Hushaym, Abu al-Jahm, al-Zuhri, Abu Salama and Abu Hurayra: 'Imru' al-Qays, banner-bearer of the poets, to the Fire'. According to al-Mas'udi, at the start of his career, while al-Fadl ibn Sahl dominated him, al-Ma'mun engaged in judging by the stars, followed the ways of the Sasanian kings such as Ardashir ibn Babak, and laboured at reading ancient books. When he came to Iraq he gave this up, professed divine unity and the promise and the threat, sat with the theologians, and favoured the disputatious ones such as Abu al-Hudhayl al-Allaf and Ibrahim ibn Sayyar al-Nazzam. He kept jurists and men of letters attending his council and paid them stipends, so that each party wrote books defending its school. He was the most forgiving of people, the most patient, and the most generous with money. Also according to al-Mas'udi, al-Rashid said of him: 'I recognise in Abd Allah the firmness of al-Mansur, the piety of al-Mahdi, and the dignity of al-Hadi.' After al-Asma'i had recited to them, a prophecy was made concerning the two of them, that their word would be scattered, blood would be shed and the veils of women torn. Al-Rashid gave him war and the son of his own mother peace, and said: 'We fear your son for Abd Allah, and we do not fear Abd Allah for him'. His mother was from Badhghis, named Marajil. Al-Fadl ibn Sahl dominated him and pressed him over a slave-girl he wished to buy, and he killed him, though some claimed that someone had been secretly sent against him to kill him. He showed Shi'i leanings and lampooned his paternal uncle Ibrahim ibn al-Mahdi, nicknamed Ibn Shakla, in verse; Ibrahim answered him in verse. He used to say that everything could be forgiven except disparaging the kingship, disclosing secrets and violating the sanctity of women, and that the masters of people in this world are the generous and in the next the prophets. He addressed the estates of his family, citing a verse of the Qur'an. He died at al-Budandun, near Ayn al-Qushayra, in 218 AH, aged 49, and was buried at Tarsus. More remarkable still was the man who broke wind during his address: al-Ma'mun said of him, 'I have never seen a man steadier of heart,' and gave him fifty thousand dirhams. He said to Abu al-Atahiya: 'The nature of the soul is boredom and the love of novelty'. Al-Suli related from Ya'qub ibn Ja'far, as in al-Mas'udi, the reason for his wearing green and then black: the Hashimites gathered before Zaynab bint Sulayman ibn Ali, the most senior of the Abbasid line in descent, and she spoke to him. He answered her: 'O aunt of the Messenger of God, when he died Abu Bakr succeeded, then Umar, who did not go beyond the practice of those before him; then Uthman, who turned to the Umayyads; then the matter came to Ali ibn Abi Talib, who appointed Abd Allah ibn al-Abbas to Basra, Ubayd Allah ibn al-Abbas to Yemen, and Qutham to Bahrain, and he left none of them without an office. So this debt stayed upon us until his offspring sufficed us.' Then he returned to wearing black. He also had a poem fitting the theme, including the line: 'Am I to be blamed for giving thanks to the legatee, Abu al-Hasan?'.