FYI-123 · Tech · Filed Oct 26, 2026
What Is an Algorithm? The Word Began as a Man's Name
An algorithm is a finite set of exact steps that solves a problem. The word began as the Latin spelling of al-Khwarizmi, a ninth-century Baghdad scholar.
Eight leaves of parchment in Cambridge University Library begin “Dixit algorizmi,” Latin for “Algorizmi said,” and inside the opening D an animal’s head sprouts foliage and flowers. The leaves hold the first half of an arithmetic book in a 13th-century copy, and the library’s description says the Latin text survives in only one other manuscript, in New York, while the Arabic original is lost.
Algorizmi was al-Khwarizmi, a scholar in ninth-century Baghdad. In the later Middle Ages, when the volume belonged to the abbey of Bury St Edmunds, a list of its contents called these pages “Ars algorismi,” the art of algorism. A man’s name, as Latin scribes spelled it, had become the name of a skill, and a later respelling turned it into algorithm.
What is an algorithm?
An algorithm is a finite list of exact, step-by-step instructions for solving a problem or completing a task. Long division, the moves that solve a Rubik’s Cube and the code that ranks a social media feed are all algorithms. Computers run them, but the idea needs no computer.
The Dictionary of Algorithms and Data Structures at the US National Institute of Standards and Technology keeps its definition short: a computable set of steps for achieving a desired result. Merriam-Webster notes that the word fits the steps for making a pizza as well as it fits computer data analysis.
The column addition taught in school is an algorithm too, and it is close to what the word first meant.
A recipe fails Donald Knuth’s test of definiteness
The computer scientist Donald Knuth sets a stricter bar in The Art of Computer Programming, where he writes that besides being “a finite set of rules that gives a sequence of operations for solving a specific type of problem, an algorithm has five important features.”
| Feature | What Knuth asks for |
|---|---|
| Finiteness | It “must always terminate after a finite number of steps” |
| Definiteness | ”Each step of an algorithm must be precisely defined” |
| Input | It has “zero or more inputs” |
| Output | It has “one or more outputs,” with “a specified relation to the inputs” |
| Effectiveness | Its operations are basic enough to be done, in principle, “exactly and in a finite length of time by someone using pencil and paper” |
Knuth tested the kitchen comparison himself. A recipe, he allowed, has finiteness, input “(eggs, flour, etc.)” and output “(TV dinner, etc.),” but “it notoriously lacks definiteness,” he wrote, and his example of an indefinite instruction is “Add a dash of salt.” Instructions like “toss lightly until mixture is crumbly” are fine for a trained chef, he goes on, “but an algorithm must be specified to such a degree that even a computer can follow the directions.”
The name belonged to a scholar at Baghdad’s House of Wisdom
Al-Khwarizmi was born about 780 and died about 850, according to the MacTutor History of Mathematics archive at the University of St Andrews, which counts him and his colleagues the Banu Musa among the scholars at the House of Wisdom in Baghdad. His name means “the Khwarizmian,” the American Heritage Dictionary explains, after Khwarizm, a region near the Aral Sea in south-central Asia.
Whether he was born there is less certain. MacTutor gives his birthplace only as “possibly Baghdad” and reports a dispute over al-Qutrubbulli, an epithet that appears beside his name in the historian al-Tabari. The scholar G J Toomer read it as a sign that he came from a district near Baghdad and that perhaps only his ancestors came from Khwarizm, while R Rashed argues that an early copy dropped the letter wa, so the words really name two men, al-Khwarizmi and al-Majusi al-Qutrubbulli.
Two of his books left words in English. His treatise on equations, Hisab al-jabr w’al-muqabala, “gives us the word algebra,” MacTutor says. His book of arithmetic rules dates from about 825, by the reckoning of the NIST dictionary. MacTutor describes it as a treatise on Hindu-Arabic numerals and notes that only a Latin translation survives, much changed from the Arabic original, whose very title is unknown.
The numerals were Indian before they were Arabic: the American Heritage Dictionary’s word history says the digits and the methods for using them were developed in ancient India, and that Europeans learned them from Arabic texts by mathematicians across the Muslim world. Algorism reached English from Arabic by way of Medieval Latin and Old French, and Merriam-Webster gives the Latin form as algorismus.
Algorism meant working sums with the new numerals
A New English Dictionary on Historical Principles, the work that became the Oxford English Dictionary, defined algorism in its first volume of 1888 as “The Arabic, or decimal system of numeration; hence, arithmetic.” During the Middle Ages, Knuth writes in The Art of Computer Programming, “abacists computed on the abacus and algorists computed by algorism.”
English had two forms of the word, the 1888 dictionary explains: a popular augrim and a learned algorism. Chaucer used the popular one in the Miller’s Tale, where the Oxford student Nicholas keeps an astronomy book, an astrolabe and a set of counting stones on the shelves at the head of his bed, and the line in Walter Skeat’s edition reads “His augrim-stones layen faire a-part.” Skeat’s glossary explains augrim-stones as “stones or counters for calculating.”
A cipher in algorism was the figure zero, and by extension “a ‘mere cipher,’ a dummy,” the 1888 dictionary says, quoting a line of 1399 on the cipher that “noteth a place, and no thing availith”: it holds a place and is worth nothing.
A Greek word bent algorism into algorithm
The th in algorithm came from a learned mix-up. The American Heritage Dictionary calls algorithm a variant spelling of algorism, probably shaped by the word arithmetic or its Greek source, arithmos, which means number.
The 1888 dictionary was blunter: the learned form, it said, “passed through many pseudo-etymological perversions, including a recent algorithm in which it is learnedly confused with” the Greek word. Its whole entry for the new spelling is one line:
“Algorithm, erron. refashioning of ALGORISM.” - A New English Dictionary on Historical Principles, volume 1, 1888
The dictionary’s list of abbreviations expands erron. as erroneous. The new spelling still meant the numerals, too: among the dictionary’s quotations is one from the Royal Society’s Philosophical Transactions of 1699, “The Algorithm or Numeral Figures now in use.”
Merriam-Webster dates the word’s first known use for a step-by-step procedure to 1811, and the American Heritage Dictionary says that as computing machines developed in the twentieth century, algorithm was adopted as a convenient word for a recursive mathematical procedure, “the computer’s stock-in-trade.” Even so, in 1957, Webster’s New World Dictionary had no entry for algorithm, only “the older form ‘algorism’ with its ancient meaning,” Knuth notes in The Art of Computer Programming.
Euclid’s method is far older than the name
Euclid, who taught at Alexandria and lived from about 325 to about 265 BC by MacTutor’s estimate, set out a procedure in Book VII of the Elements for finding the greatest common measure of two numbers: the smaller is “continually subtracted” from the larger until what is left measures the one before it. David Joyce’s online edition at Clark University works it for 3009 and 884:
- Subtract 884 from 3009 three times, leaving 357.
- Subtract 357 from 884 twice, leaving 170.
- Subtract 170 from 357 twice, leaving 17.
- Stop, because 17 divides 170 exactly: 17 is the greatest common divisor.
Each step is exact, the input is two numbers, the output is one, and the remainders shrink until the work has to end. In the second volume of his book, Knuth proposes calling Euclid’s method “the granddaddy of all algorithms, because it is the oldest nontrivial algorithm that has survived to the present day.”
Your feed runs on many algorithms
On social media, “the algorithm” usually means the system that ranks posts, and Instagram says the singular is wrong. Its explainer on how ranking works, published in 2023, says the app “doesn’t have a singular algorithm that oversees what people do and don’t see” and uses “a variety of algorithms, classifiers, and processes, each with its own purpose.”
Feed, Stories, Explore, Reels and Search each use their own algorithm, the explainer says. For Feed, it names the most important signals as your activity, information about the post, information about the person who posted it, and your history of interacting with that person.
Anyone who blames “the algorithm” is naming a scholar of ninth-century Baghdad, in the form Latin scribes gave his name, respelled after a Greek word it never came from. Strictly FYI.
Questions readers ask
What does algorithm mean on social media?
On social media, the algorithm means the ranking systems that choose which posts each person sees and in what order, using signals such as that person's activity and history of interacting with an account. Instagram has said it does not have a singular algorithm but uses a variety of algorithms, classifiers and processes, with its own for each part of the app, such as Feed, Stories, Explore and Reels.
Who invented the algorithm?
No one person did. The word comes from al-Khwarizmi, a scholar in ninth-century Baghdad whose book on Hindu-Arabic numerals reached Europe in Latin, but step-by-step methods are far older: Euclid's procedure for the greatest common divisor of two numbers appears in his Elements.
Is a recipe an algorithm?
Loosely, yes: Merriam-Webster says the word applies as well to the steps for making a pizza as to computer data analysis. By Donald Knuth's stricter definition, a recipe has finiteness, input and output but lacks definiteness, because an instruction such as 'Add a dash of salt' is not exact enough for a computer to follow.
Drafted with AI assistance, then checked against the sources linked above. How we work explains the process.
Spotted an error? Write to us. Fixes are listed in the corrections log.
The standing notice
Liked this? Get new entries by email.
Confirm once from your inbox. Every email has an unsubscribe link.
FYI-123 · https://www.strictly.fyi/blog/what-is-an-algorithm/