AI & Machine Learning

Algorithm

An algorithm is simply a set of step-by-step instructions that tells a computer how to complete a task.

Think of it like a recipe — it has specific steps in a specific order that lead to a result. Algorithms are behind almost everything you do online, from how search engines decide which results to show you to how social media picks what appears in your feed.

Algorithm, explained at three levels

At home

An algorithm is just a set of instructions, like a recipe for baking a cake. You follow the steps in order and you get a result. When you search for something online, an algorithm decides which results to show you first based on factors like relevance and popularity. The algorithms behind your social media feed decide which posts you see based on what you have liked, shared, and spent time looking at before.

At work

In a business context, algorithms are the rules that software follows to complete tasks and make decisions. When your company's payroll system calculates everyone's pay, deductions, and taxes, it follows an algorithm. Customer-facing algorithms include the ones that sort search results on your website or determine which marketing emails to send to which customers. Understanding that algorithms follow rules helps you ask better questions when software behaves unexpectedly.

Real-world examples

At home

When David opens a navigation app and asks for directions to a restaurant, the app's algorithm evaluates thousands of possible routes, considers current traffic conditions, and picks the fastest path — all in about one second.

At work

Priya works in HR and uses a scheduling algorithm that automatically creates shift schedules for 200 employees. The algorithm considers each person's availability, skills, labor laws, and fairness in weekend assignments to produce an optimized schedule in minutes instead of the days it used to take manually.

Common confusions

  • It's a popular misconception that algorithms are mysterious or secretive. An algorithm is just a step-by-step procedure, like a recipe, that tells a computer what to do.
  • There's a widespread belief that algorithms are always neutral. Algorithms reflect the choices and priorities of the people who designed them, which can introduce biases.
  • A frequent misconception is that 'the algorithm' on social media is one single thing. Platforms use many different algorithms working together to decide what content to show.

For analysts

When someone says 'the algorithm decided,' what they really mean is that a set of rules written by people produced that result. If a tool your team uses is giving unexpected results, it helps to understand what factors the algorithm weighs most heavily. Ask your vendor or developer what inputs drive the output — once you know the recipe, you can adjust the ingredients.

History & origin

The word algorithm comes from the name of a ninth-century Persian mathematician, al-Khwarizmi, who wrote influential texts on mathematical procedures. In the twentieth century, computer scientists like Alan Turing and Donald Knuth formalized the concept for computing. Today, algorithms are the invisible engines behind nearly every digital service, from navigation apps calculating the fastest route to social media platforms deciding what content to show each user.