Where it sits
Any ordered set of steps is an algorithm — from tying a shoelace to a search engine. Complexity varies wildly; the core idea doesn't.
How it unfolds
Input
The algorithm takes in one or more inputs — data, a question, a starting state.
Steps
It runs a defined sequence of operations, in order, each one clear and repeatable.
Decisions
Along the way it may branch — 'if this, do that; otherwise, do the other' — to handle different cases.
Output
It returns a result: a sorted list, a decision, a prediction, a recommended video. Same input, same output, every time.
Tell it apart
| Aspect | Algorithm | Program |
|---|---|---|
| Is | The method / logic | The written code |
| Depends on | No language | A programming language |
| Exists as | An idea / steps | A runnable file |
| Analogy | The recipe | The recipe, typed up |
An algorithm is the logic — the ordered steps to solve a problem, independent of any language. A program is that logic written out in code a specific computer can actually run. One is the recipe; the other is the recipe typed up for a particular kitchen.
What it doesn't mean
Any clear step-by-step procedure is close to one — though Knuth uses the cooking recipe as his counter-example, since 'a dash of salt' is not definite enough to qualify. Most algorithms have nothing to do with AI.
They reflect the data they learn from and the choices of their makers, so they can carry and even amplify human bias.
What it really means
An algorithm is a recipe with the romance — and the vagueness — removed: a set of clear steps, in order, that turns something you have (ingredients, data, a question) into something you want (a cake, a decision, a sorted list). The magic word hides a mundane idea — if you can write down how to do a thing so precisely that anyone, or any machine, could follow it and get the same result, you've written an algorithm.
What makes them feel modern is scale. A person follows a recipe a few times a day; a computer can run an algorithm's steps millions of times a second, which is how a few lines of logic end up deciding what videos you see, which posts rise, and whether a loan is approved. The steps themselves are often simple. It's the speed and reach that turn them into something close to power.
Which is also why "it's just the algorithm" is never quite the whole truth. Algorithms aren't neutral forces of nature; they're written by people, trained on data people chose, tuned toward goals people set. Understanding the word matters precisely because so much of modern life is now sorted, ranked, and recommended by these quiet recipes — and recipes, of course, reflect whoever wrote them.
Where it comes from
9th-c. Persian mathematician
His name became 'algorism', then 'algorithm' — a procedure named after the man who formalised such methods.
- 9th c.
Al-Khwārizmī writes his treatise on calculation with Hindu-Arabic numerals — three centuries before his name attaches to the method itself.
- 12th c.
Latin translations render his name Algoritmi, and European readers take it for the name of the method.
- 1936
Alan Turing's 'On Computable Numbers' and Alonzo Church's lambda-calculus paper give the informal idea of an algorithm its first formal definitions — soon proved to pick out exactly the same class of computable functions.
- Today
They quietly run search, feeds, recommendations, and AI.
In real life
- Long division as taught at school is an algorithm: a fixed sequence of steps that reaches the right answer whoever follows it.
- Euclid's method for finding the greatest common divisor of two numbers, set out more than two thousand years ago, is one of the oldest algorithms still in everyday use.
- The everyday sense: 'Why is my feed suddenly all cat videos?' 'The algorithm noticed you watched three of them.'
Questions
Q01What is an algorithm in simple terms?
An algorithm is a step-by-step set of instructions for solving a problem or completing a task — like a recipe. Give it the same inputs and it follows the same steps to reach the same predictable result. Computers use algorithms to turn data into decisions.
Q02What is an everyday example of an algorithm?
The steps to tie your shoelaces, the method you were taught for long division, or the process of looking up a word in a dictionary. Each is a clear, ordered set of steps that anyone can follow to get the same result — which is exactly what an algorithm is. A cooking recipe is the classic near-miss: Knuth uses it as his counter-example, since 'a dash of salt' is not definite enough to qualify.
Q03Do algorithms have to involve computers?
No. The concept is older than computers — it's just a defined procedure. Computers made algorithms powerful because they can run millions of steps instantly, but a knitting pattern or long-division method is an algorithm too.
Q04Can algorithms be biased?
Yes. An algorithm is only as neutral as its data and its designers' choices. If it learns from biased data, it can reproduce or amplify that bias — which is why the fairness of algorithms in hiring, lending, and feeds is so heavily debated.