Al-Khwarizmi's Debt: How 'Algorithm' Got Its Name

The Persian mathematician who acknowledged learning from India

Learn how Al-Khwarizmi's treatise on 'Hindu computation' spread Indian numerals to the Islamic world and gave the world the words 'algorithm' and 'algebra.'

The Man Whose Name Became a Method

In the early 820s CE, a scholar named Muhammad ibn Musa al-Khwarizmi arrived at the Bayt al-Hikma, the House of Wisdom, in Baghdad. The building stood on the west bank of the Tigris, its shelves holding manuscripts in Arabic, Greek, Persian, and Syriac. Among the recent acquisitions was an Arabic translation of Brahmagupta's Brahmasphutasiddhanta, a Sanskrit astronomical treatise from 628 CE, carried to Baghdad in the 770s CE and known there as the Sindhind. Al-Khwarizmi read it carefully. He had come from Khwarezm, south of the Aral Sea, to work under Caliph al-Ma'mun. His task was to make mathematics usable in Arabic. What Brahmagupta had written down nearly two centuries earlier was the most powerful arithmetic system any civilization had produced. Al-Khwarizmi decided to teach it.

Al-Khwarizmi at the House of Wisdom in Baghdad teaching Indian arithmetic

The two books he wrote gave the modern world the words algorithm and algebra. Both carry inside them this man's quiet insistence that the method was not his own. He had learned it from the Indians. This is the story of that honesty and what it cost him in attribution.

820 CE: The House of Wisdom

By the time al-Khwarizmi arrived in Baghdad, the city was sixty years old and already the intellectual capital of the Islamic world. Caliph al-Ma'mun, who came to the Abbasid throne in 813 CE, expanded his father Harun al-Rashid's library into a formal institution known as the Bayt al-Hikma, the House of Wisdom. Scholars there were translating Greek, Persian, Syriac, and Sanskrit texts into Arabic at a pace unmatched anywhere in the medieval world. Among the Sanskrit manuscripts in the Bayt al-Hikma's holdings was the Sindhind, the Arabic name for Brahmagupta's Brahmasphutasiddhanta, which had arrived with Kankah's 773 CE delegation and been translated a generation earlier.

Al-Khwarizmi was one of al-Ma'mun's scholars. He was born in Khwarezm, a region south of the Aral Sea in what is now Uzbekistan, and he carried the name of his homeland with him as his nisba, his locational surname. Under al-Ma'mun's patronage he produced four major works. The two that matter most for this lesson are his book on Indian arithmetic and his book on equations.

Two Books, Two Words

Al-Khwarizmi's first book was titled Kitab al-hisab al-hindi, which translates directly as 'Book on Calculation in the Indian Manner.' Its opening pages announced that everything inside it was the reckoning of the Hindus. The book explained, for the first time in any non-Indian language, how to write any number using only nine figures and a circle for nothing, how to add and subtract and multiply and divide using the place-value grammar of Aryabhata and Brahmagupta, and how to work with the tricky little symbol that Sanskrit texts called shunya. It was a textbook, not a research paper. Its purpose was to teach, and the students it taught were Arab scribes, accountants, astronomers, and merchants who had been struggling along with an inherited Greek letter-numeral system. For them the Indian decimal system was an immediate and obvious upgrade.

His second book was titled Kitab al-jabr wa-l-muqabala, the Book of Restoration and Balancing. This one was his own synthesis of methods he had drawn from Brahmagupta and Aryabhata, and it set out systematic procedures for solving linear and quadratic equations. Al-jabr was the technical term for moving a negative quantity to the other side of an equation by adding its positive. Al-muqabala was the term for subtracting equal quantities from both sides. These two operations are still what every algebra student learns in their first week of the subject.

The Latin Bottleneck

Both books were in Arabic, and for three hundred years they stayed that way. By the late 11th century the Latin west was beginning to notice that the Islamic world had mathematical tools it did not, and Christian scholars started traveling south to Muslim Spain and Sicily to learn Arabic and bring texts back.

Adelard of Bath translating al-Khwarizmi

In 1126 CE, an English monk named Adelard of Bath completed a Latin translation of al-Khwarizmi's hindi arithmetic. He gave his translation the title Dixit Algorizmi, 'al-Khwarizmi said,' and every chapter opened with that phrase. For the first time, a Latin Christian reader could pick up a book and read, in his own language, the rules of Indian decimal arithmetic. The catch was that Adelard's readers had no idea who Algorizmi was. They did not know it was the name of a man. They assumed it was the name of the method itself.

About twenty years later, in 1145 CE, Robert of Chester translated al-Khwarizmi's second book into Latin. Its Arabic title Kitab al-jabr wa-l-muqabala became Liber algebrae et almucabola. Europeans shortened this to Liber algebrae and then simply to algebra. A second English word had been minted, and this one too traveled through Latin mouths without anyone pausing to ask what al-jabr meant or who had first systematically used the method.

How a Persian Name Became a Method

The word algorismi passed into Latin scholarly vocabulary as a common noun meaning 'the Indian method of calculation.' Over the next century it was shortened to algorism. A person who was good at calculating in the Indian manner was called an algorist. By the 13th century Latin textbooks were routinely distinguishing algorists, who used Indian numerals and paper, from abacists, who used counters and boards. The algorists were steadily winning.

Somewhere in the transition from medieval Latin into modern European languages, algorism acquired a 'th' sound under the influence of the Greek word arithmos, meaning number. Algorism became algorithm. By the time English was borrowing the word in the 17th century, the Persian name at its root had been completely buried. The word now meant, and still means, a systematic step-by-step procedure for solving a problem. Every Google search, every mobile app, every spell-check, every autocomplete runs on a word that was once Muhammad ibn Musa al-Khwarizmi's personal name.

What Al-Khwarizmi Chose to Name

The most striking thing about al-Khwarizmi's two books is not that they were clear, or useful, or exported westward so powerfully. It is that their author labeled his sources. He opened his arithmetic book by calling the method Indian. He wrote under a patron who was paying him to produce original work, in a political environment where claiming foreign knowledge as his own would have cost him nothing professionally, and he still named his sources.

Europe, receiving his books through Latin translators, did not preserve that grammar. Al-Khwarizmi's name became a word for method. Brahmagupta and Aryabhata became footnotes. The modus Indorum became modus algoristi, and eventually just the algorithm, and the chain of attribution ran quietly into the ground.

The word algorithm is on every screen in the world right now, running inside every search result, every map, every feed. It is the most-spoken technical word of the 21st century. It began as an Arabic rendering of a Persian town's name, attached to a book that a humble teacher opened with the phrase 'the reckoning of the Hindus.' The method was Indian. The teacher was honest. The word has outlived them both.

In the House of Wisdom on the Tigris, al-Khwarizmi had already finished writing. He had named his sources. The word algorithm is on every screen in the world right now. His name is still inside it, whether the screen knows it or not.

Key figures

Muḥammad ibn Mūsā al-Khwārizmī

c. 780 to 850 CE, Khwarezm and Baghdad

Caliph al-Ma'mūn

786 to 833 CE, reigned 813 to 833 CE, Baghdad

Robert of Chester

c. 1110 to 1160 CE, England and al-Andalus

Case studies

820 CE: Al-Khwārizmī at the Bayt al-Ḥikma

In the late 810s CE, a young Persian scholar from Khwarezm arrived at the court of Caliph al-Ma'mūn in Baghdad. His name was Muḥammad ibn Mūsā, and he had been invited to join the Bayt al-Ḥikma, the House of Wisdom, the most active translation and research institution in the medieval world. Al-Ma'mūn had inherited his father Harun al-Rashid's library and expanded it into a formal academy with paid scholars, Indian astronomers, Greek philologists, and Syriac translators all working in parallel. Among the Sanskrit manuscripts in the Bayt al-Ḥikma's holdings was a copy of the Sindhind, the Arabic name for Brahmagupta's Brāhmasphuṭasiddhānta, which had arrived with Kankah's 773 CE delegation and been translated into Arabic a generation earlier. Al-Khwārizmī was assigned to produce a practical textbook of Indian arithmetic that Arab scribes and accountants could use. Sometime around 820 CE he completed his Kitāb al-ḥisāb al-hindī, the Book on Calculation in the Indian Manner, which opened with an explicit acknowledgment that the method was the reckoning of the Hindus.

The paramparā of Indian mathematical transmission had a formal grammar: every teacher was expected to name the teachers who had taught him. Brahmagupta had named Āryabhaṭa in the opening of his own treatise. Āryabhaṭa had named his lineage in the Gītikāpāda of the Āryabhaṭīya. Al-Khwārizmī, working in Arabic far from any Sanskrit court, nevertheless preserved this grammar. He opened his book with the statement that the method was Indian, and wherever a rule could be traced to a specific Indian text he named it. This was not flattery, and it was not a political gesture toward a visiting delegation. It was a direct translation of the paramparā ethic into a new linguistic medium. The Sanskrit convention had survived the journey across a civilizational boundary precisely because its receiver was a scholar who took transmission seriously.

Al-Khwārizmī's Kitāb al-ḥisāb al-hindī became the single most influential arithmetic textbook in the Islamic world. For the next three centuries, Arab children learned the Indian decimal system from books that were either copies of al-Khwārizmī or derived from him. When Latin Europe began translating Arabic science in the 12th century, al-Khwārizmī's book was among the very first texts chosen, precisely because it was the canonical teaching edition. Every use of the word algorithm in the modern world is a downstream consequence of this single book, and every time a software engineer writes a conditional statement, the ghost of al-Khwārizmī's 820 CE preface is in the code.

The most consequential books of a civilization are often not the first research paper but the first good textbook. Al-Khwārizmī was not the inventor of the decimal system. He was its first non-Indian teacher. The role of the first honest transmitter, it turns out, can earn a permanent place in the vocabulary of every subsequent civilization that learns the method.

The original Arabic manuscript of al-Khwārizmī's Kitāb al-ḥisāb al-hindī has been lost. What survives are 12th-century Latin translations plus Arabic fragments quoted in later works. Every modern edition of the book is reconstructed from these secondary sources, meaning that the single most consequential arithmetic textbook of the Islamic world survives today only because Latin Europe translated it before the Arabic original was destroyed.

1126 CE: Adelard of Bath and the Dixit Algorizmi Translation

Adelard of Bath was an English monk and natural philosopher who had done something unusual for an Englishman of his era. He had spent years traveling through Sicily, Antioch, and possibly Spain, learning Arabic specifically so he could read the mathematical and astronomical books that Latin Europe did not yet have. Sometime around 1126 CE, back at Bath Abbey, he completed a Latin translation of al-Khwārizmī's Kitāb al-ḥisāb al-hindī. He titled his translation Dixit Algorizmi, meaning 'al-Khwārizmī said,' and every chapter opened with that phrase. His readers were Benedictine monks, cathedral-school students, and the first generation of Latin scholars who wanted to learn the Indian decimal system. They had never heard of Muḥammad ibn Mūsā al-Khwārizmī. As far as they were concerned, Algorizmi was simply the mysterious name of the method itself.

The Indian paramparā tradition holds that knowledge transmitted without attribution loses part of its prāṇa, its life force. Al-Khwārizmī had preserved the attribution by naming his source as Indian. Adelard's Latin title then preserved al-Khwārizmī's name in the most literal way possible, quoting him at the head of every chapter. What broke was not Adelard's honesty but the cultural memory of his Latin readers. They simply did not have the context to recognize Algorizmi as a person, let alone a Persian scholar from Khwarezm who had in turn been quoting Brahmagupta from Bhillamala. The chain of names was physically intact on the page. Only the last link had lost its anchor, because the community that received it did not know what the anchor pointed at.

Dixit Algorizmi became the foundational text for the Latin tradition of algorism, the systematic use of Indian numerals in computation. Over the next century, the word algorismi shifted meaning from a person's name to a generic method. By the 13th century, textbooks were classifying students as algorists (those who used the Indian method) or abacists (those who used the older counter-board method). The algorists, armed with Adelard's book and its descendants, were steadily winning. By the 16th century, the word had worn down into algorism and would eventually become algorithm, carrying a scholar's name quietly into the heart of modern computing.

Translation preserves the text but not always the story behind it. A faithful translator can successfully carry a method across a language barrier while the name and biography behind that method slowly dissolve. Adelard did his job exactly right. The loss of al-Khwārizmī as a person was not Adelard's fault but the fault of a receiving culture that did not have the context to see past the word on the page. When you borrow a method, it is always worth asking not just what the book says but who the author was and who taught the author before him.

Adelard's 1126 CE translation is one of only a handful of surviving early Latin versions of al-Khwārizmī's Kitāb al-ḥisāb al-hindī. A near-complete manuscript is preserved today in the Cambridge University Library and additional fragments survive in other European collections. Together they are among the earliest surviving documents of the Indian decimal system's arrival in the Latin west.

1968 CE: Donald Knuth Formalizes 'Algorithm' and Names Al-Khwārizmī

In 1968 CE, Donald Knuth, a young professor at Stanford University, published the first volume of his multi-volume series The Art of Computer Programming. In it, he set out to give a formal, mathematical definition of what an algorithm actually is. Knuth specified five required properties: an algorithm must be finite (it must terminate in a bounded number of steps), definite (each step precisely specified), have clearly specified inputs and outputs, and be effective (each step actually performable). This definition became the foundational framing of the entire field of computer science. In the opening pages of his book, Knuth paused to explain where the word algorithm had come from. He traced the word through its Latin intermediaries back to Muḥammad ibn Mūsā al-Khwārizmī, the 9th-century Persian scholar who had written the Kitāb al-ḥisāb al-hindī. He further noted that al-Khwārizmī himself had credited the Indian origin of the method.

Knuth's opening pages reinstated a grammar of attribution that had been missing from the English word algorithm for seven hundred years. By naming al-Khwārizmī explicitly, and by noting that al-Khwārizmī had in turn named the Indians, Knuth retroactively stitched the broken chain of transmission back together. The Indian paramparā of naming sources, which had survived the journey from Bhillamala to Baghdad in the 8th century and then been obscured during the Latin transmission in the 12th century, was reconstructed in a Stanford office in the 20th century by a scholar who simply wanted to know where his field's name had come from. This is the rare case of a broken attribution being patiently restored in reverse, nearly a millennium after the break.

The Art of Computer Programming has sold more than a million copies and is now one of the most widely cited works in computer science. Generations of computer scientists have grown up knowing that the word algorithm is not an abstract Greek or Latin coinage but the name of a specific 9th-century Persian scholar who learned his mathematics from Indian texts. Knuth received the ACM Turing Award in 1974, in part for this work. UNESCO celebrated the 1200th anniversary of al-Khwārizmī's birth in 1983. An annual al-Khwārizmī International Award is now given by Iran, and modern Uzbekistan honors him as one of its greatest sons. A paragraph of careful etymology in one American textbook set off a chain of public recognitions that is still unfolding.

Attribution lost to time can sometimes be recovered when one scrupulous scholar decides to trace a word back to its root. One paragraph of careful etymology in a 1968 textbook brought al-Khwārizmī's name back into the working vocabulary of a field he could not have imagined, and brought Indian mathematics, through him, back into the picture. If you inherit a word, a method, or a tool whose origin has been forgotten, you can perform the same recovery: trace the name, follow it back as far as it goes, and put the original teacher back into the sentence.

The field's name for its central concept is a 20th-century English spelling of a 12th-century Latin mistranslation of a 9th-century Arabic rendering of the nisba of a Persian scholar from Khwarezm who learned his mathematics from Sanskrit texts written in Bhillamala and Kusumapura. Every other word in that sentence belongs to a different civilization.

Historical context

9th century CE to 20th century CE, from al-Khwārizmī's tenure at Baghdad's House of Wisdom to the modern computer science formalization of the algorithm

While al-Khwārizmī was writing in Baghdad in 820 CE, Indian mathematical production continued unbroken under the Gurjara-Pratihāras in the north, the Rāshtrakūtas in the Deccan, and the Pālas in Bengal. A generation later, in 850 CE, Mahāvīra would compose the Gaṇitasārasaṅgraha at the Rāshtrakūta court in Manyakheta, extending Brahmagupta's work while al-Khwārizmī's Arabic translation was circulating thousands of miles to the west. Jain and Hindu mathematicians continued refining the traditions of Āryabhaṭa, Brahmagupta, and Bhāskara I across multiple royal courts, entirely unaware that their work was now being taught, in translation, at the highest academy of the Islamic world. The paramparā was functioning in two parallel languages across a single decade, and neither language knew about the other's copy.

Living traditions

The English word algorithm is a direct Latinization of the nisba of Muḥammad ibn Mūsā al-Khwārizmī, and the word algebra is a direct shortening of the Arabic title of his second book. Between the two, his vocabulary structures almost every sentence a software engineer writes today. Donald Knuth's The Art of Computer Programming (1968 onward) re-established the etymological chain by explicitly naming al-Khwārizmī as the source of the term, and through him the Indian mathematical tradition he credited. UNESCO celebrated the 1200th anniversary of al-Khwārizmī's birth in 1983. An annual al-Khwārizmī International Award is given in Iran to distinguished scientists. Uzbekistan (ancient Khwarezm) honors him as one of its greatest sons with a statue in Khiva. India, which originally produced the mathematics al-Khwārizmī transmitted, still holds priority of invention through Āryabhaṭa, Brahmagupta, and Mahāvīra. Four civilizations claim him, and each claim is in some sense correct.

Reflection

More in Dashamana: The Decimal Place Value System

All lessons in Dashamana: The Decimal Place Value System · Indian Mathematics: Ancient Genius, Modern Foundations course