Maurício Pinheiro
Why are algorithms called algorithms? The origin of the term traces back to a Persian polymath you may have never heard of. Here’s a brief, fascinating history…
Algorithms have become the invisible architects of our digital lives. They shape our social media feeds, craft our Netflix recommendations, and power the smart functions of Google Maps and artificial intelligence systems. Yet, amidst our daily interactions with algorithms, few pause to reflect on their origins or the visionary mind that conceived them.
An algorithm is a step-by-step set of instructions for solving a problem or completing a specific task, much like a recipe that guides you from ingredients to the finished dish. Meanwhile, code in a programming language is the way these instructions are written so that a computer can understand and execute them. Think of the algorithm as the plan or idea of what needs to be done, and the code as the translation of this plan into a language that the computer can “read” and “execute.”

Now, meet Muhammad ibn Mūsā al-Khwārizmī, a Persian scientist and polymath whose intellectual legacy spans over a millennium. Long before the internet and smartphone apps, al-Khwārizmī conceived the fundamental concept of the algorithm. The very term ‘algorithm’ finds its roots in the Latinized version of his name, ‘algorithmi,’ which in itself attests to his profound influence on mathematical thought.
Largely obscured by the mists of time, al-Khwārizmī lived during the Islamic Golden Age, from 780 to 850 AD. Revered as the ‘father of algebra’ and acclaimed by some as the ‘grandfather of computer science,’ his life story remains shrouded in mystery, with much of his original works lost over the centuries.
Born in the region of Khwarazm, south of the Aral Sea, in present-day Uzbekistan, al-Khwārizmī flourished under the Abbasid Caliphate, a beacon of scientific enlightenment in the medieval world. His contributions to mathematics, geography, astronomy, and trigonometry were profound, ranging from the refinement of world maps to innovation in astronomical calculations.
At the heart of the intellectual discourse of his time, al-Khwārizmī was a prominent figure in the House of Wisdom in Baghdad. This academic center served as a crucible of knowledge, where diverse strands of knowledge from around the world were translated into Arabic, fostering advancements in numerous disciplines, including mathematics—a field closely tied to Islamic scholarship.

Al-Khwārizmī’s masterpiece, however, resided in the field of algebra. Commissioned by Caliph al-Ma’mun, his treatise, Al-Jabr, laid the foundations for the systematic study of algebra. It was a seminal work, distilling centuries of mathematical thought into a comprehensive guide that transcended geographical and linguistic barriers.
In an era devoid of modern mathematical notation, Al-Khwārizmī employed prose and geometric diagrams to demystify algebraic concepts. His methods, illustrated by simple and elegant examples, paved the way for the development of algebraic reasoning—a cornerstone of mathematical thought.
Al-Jabr and Al-muqābala

Al-Khwārizmī’s book meticulously detailed methods for solving polynomial equations up to the second degree. Although we now use modern mathematical notation, Al-Khwārizmī had to explain these concepts through ordinary text, as notation had not yet been developed in his time.
The operations of al-jabr and al-muqābala are essential concepts in the work of Muhammad ibn Musa al-Khwarizmi, the renowned Persian mathematician of the 9th century known as the “father of algebra.”
Al-Jabr, meaning “Restoration” or “completion,” involves transposing terms from one side to the other of the equation, eliminating negative terms from the right side to isolate the unknown on one side of the equation, facilitating its resolution. For example: x^2−5x=−3 ⇒ x^2−5x+5x=−3+5x ⇒ x^2=−3+5x
On the other hand, al-muqābala, meaning “Reduction” or “balancing,” involves combining similar terms on both sides of the equation to simplify the expression. For example: 50+3x+x^2=29+10x ⇒ 21+x^2=7x
These operations, al-jabr and al-muqābala, form the basis for solving linear and quadratic equations.
But Al-Khwārizmī’s influence extended beyond the realms of mathematics. His introduction of Hindu-Arabic numerals to the Western world revolutionized mathematics, paving the way for modern computing technology. By advocating for decimal notation and computational algorithms, he laid the groundwork for the digital revolution that would unfold centuries later.
Indeed, Al-Khwārizmī’s legacy endures in our daily interactions with technology. Whenever we engage with our digital devices—whether browsing social networks, conducting online transactions, or streaming music—we owe a debt of gratitude to this ancient Persian polymath, whose insightful visions continue to shape our world.
The Euclidean Algorithm: A Timeless Mathematical Gem

The Euclidean algorithm, also known as the Euclidean algorithm, is an efficient method for calculating the greatest common divisor (GCD) of two integers. Its origin dates back to approximately 300 B.C., and it was described in Books VII and X of Euclid’s Elements.
This algorithm stands out as one of the oldest algorithmic mathematical tools still in use, recognized for its simplicity and effectiveness.
It is important to note that the Euclidean algorithm predates significantly the work of al-Khwārizmī.
The algorithm operates as follows:
- Let 𝑎 and 𝑏 be the two positive integers.
- If 𝑏 equals 0, then 𝑎 is the GCD. Stop.
- Set 𝑎 as the value of 𝑏.
- Set 𝑏 as the remainder of the division of 𝑎 by 𝑏.
- Go back to step 2.
For example, to find the GCD of 54 and 888:
888 = 54 × 16 + 24
54 = 24 × 2 + 6
24 = 6 × 4 + 0
Since the remainder is 0, the GCD is 6. Implementations of the algorithm can be expressed in pseudocode.
function gcd(a, b)
while b ≠ 0
t := b
b := a mod b
a := t
return a
This algorithm has various applications in mathematics and computer science, such as simplifying fractions, performing modular arithmetic, and cryptographic protocols. It is one of the oldest and most efficient algorithms in common use.
Is it possible to train a Neural Network to discover the Euclidean algorithm?
This article was partly based on the original article written by Debbie Passey, Digital Health Researcher at the University of Melbourne. The original version of her article was initially published on The Conversation under a Creative Commons license.

Copyright 2026 AI-Talks.org