On this page
Every time you "move a term to the other side", you are using an idea that was written down in Baghdad about twelve centuries ago. Al-Khwarizmi did not use x, y or even symbols for numbers. He wrote everything in words, and still gave methods that work. This post explains what he did, works through his most famous equation in his own steps and as a picture, and ends with what you can borrow from his way of working.
Who was al-Khwarizmi?
Little is known for certain about his life. The MacTutor biography gives his dates as about 780 to about 850 and warns that scholars disagree even about where his family came from. What is clear is that he and his colleagues worked at the House of Wisdom in Baghdad, founded by the Caliph al-Ma'mun, where Greek scientific works were translated and studied. He dedicated his treatise on algebra and his treatise on astronomy to al-Ma'mun.
Where do the words algebra and algorithm come from?
His algebra book is titled Hisab al-jabr w'al-muqabala, which MacTutor translates as "Complete book on calculation by completion and balancing". The word "al-jabr" in the title became "algebra".
He also wrote on the Hindu-Arabic numerals that came to Baghdad from India. The Arabic original is lost, but a Latin version, Algoritmi de numero Indorum, survives. From "Algoritmi", the Latin form of his name, comes the word algorithm. MacTutor quotes historian G. J. Toomer that al-Khwarizmi's work was the first to expound the decimal place-value system systematically.
What do al-jabr and al-muqabala mean?
He reduced every linear or quadratic equation to one of six standard forms, using two operations:
Al-jabr (completion): remove a subtracted term by adding it to both sides. His example: x² = 40x − 4x² becomes 5x² = 40x.
Al-muqabala (balancing): cancel like terms that appear on both sides. 50 + 3x + x² = 29 + 10x becomes 21 + x² = 7x.
Today we call these "add the same thing to both sides" and "collect like terms".
How did he solve x² + 10x = 39?
In Frederic Rosen's 1831 English translation, The Algebra of Mohammed ben Musa, the problem is "one square, and ten roots of the same, amount to thirty-nine dirhems". His rule: "you halve the number of the roots, which in the present instance yields five. This you multiply by itself; the product is twenty-five. Add this to thirty-nine; the sum is sixty-four. Now take the root of this, which is eight, and subtract from it half the number of the roots, which is five; the remainder is three."
In symbols:
Half of 10 is 5. Square it: 25.
Add to 39: 25 + 39 = 64.
√64 = 8.
8 − 5 = 3. So x = 3, and the square is 9.
Check: 9 + 10 × 3 = 39.
The picture behind it. MacTutor describes his geometric proof. Draw a square of side x (area x²). Add four rectangles, each x by 10/4, one on each side, so the total area is x² + 10x = 39. The corners are missing four small squares, each (5/2) × (5/2) = 25/4, total 25. Fill them in, and the big square has area 39 + 25 = 64, so its side is 8. That side is 5/2 + x + 5/2 = x + 5, so x = 3.
This is completing the square. Written today: x² + 10x + 25 = 64, so (x + 5)² = 64, and x + 5 = ±8, giving x = 3 or x = −13. Al-Khwarizmi gave only 3, because a length or an amount of money could not be negative. Check −13: 169 − 130 = 39, so it is a root too.
A case with two positive roots. For "a square and twenty-one in numbers are equal to ten roots", x² + 21 = 10x, Rosen's translation halves 10 to get 5, squares it to 25, subtracts 21 to get 4, takes the root 2, and gives 5 − 2 = 3 "or" 5 + 2 = 7. Both work: 9 + 21 = 30 and 49 + 21 = 70 = 10 × 7.
How does this connect to Class 10?
The NCERT Class 10 chapter on quadratic equations mentions in its introduction that Sridharacharya derived what we call the quadratic formula by completing the square, and that Al-Khwarizmi studied quadratic equations of different types. You can practise the modern methods in our post on quadratic equations in Class 10.
What can a student learn from al-Khwarizmi?
Write a method as steps. His rules read like a recipe, which is exactly what an algorithm is.
Prove with a picture. The square-and-rectangles drawing shows why the rule works, not just that it works.
Sort problems into types. His six standard forms meant he only needed six methods.
Check your answer. Substituting x = 3 back takes ten seconds and catches most slips.
If completing the square still feels mechanical, the Fermi Concept Library covers every concept in mathematics with its own lesson, so you can see the algebra and the geometry side by side.
Try it now: solve x² + 6x = 16 with al-Khwarizmi's words, then draw his square to check your answer.



