The word algorithm appears more and more often in our daily conversations. We talk about the algorithm of Google, Instagram or Netflix, it is daily echoed in news related to technology and society, documentaries and films about algorithms have been produced, the importance they have in our lives and the control level they can exercise over our decisions are questioned… But do we really know what an algorithm is? Since when do they exist and how do they affect us?

An algorithm is a set of rules or instructions that serve to solve a problem in a finite number of steps. This means that we live surrounded by algorithms, beyond computers and screens, as there are many activities we do daily and are also a set of steps allowing us to perform tasks such as cooking and follow a recipe or putting a washing machine and choosing a program following its instructions. However, when we think about algorithms we usually relate it only to programming and especially to mathematics, a field in which they have been present since antiquity, before they began to be called “algorithms”.

Egyptians and Babylonians already used algorithms to solve mathematical operations such as square roots or multiplications, although they were not really aware of that because there was no theory about algorithms. The term comes from the Latin translation of Al-Khwārizmī, the name of an Arab mathematician and astronomer who wrote various books on the Indian number system and on algebra. In the 18th century the term began to be used as we know it today and the mathematician Ada Lovelace was the first person to write a computer algorithm in 1842, which is why she is considered the first computer programmer.

There are different types of algorithms, but they all have three parts: the input, which is the information we give to the algorithm; the process of this information, which are the calculations needed to obtain a final solution, and the output or result of the operation. Algorithmic machines, like computers, can read algorithms that have been encoded in a language they can understand. Using programming languages, we can code algorithms into the corresponding computer or machine so that it can decrypt those algorithms (those instructions) and perform the different tasks for which it has been created.

The algorithms of Google, Netflix or Instagram, which we have mentioned as examples in the first paragraph, are able to collect a lot of information about users, process it by performing many predetermined operations and finally use it for different tasks (get a result from the information collected), either showing results for a search or recommending specific content to a user.