Cities appeared around the world around 3000BC, and with that a basic problem of civilization. How to feed it? The earliest of governments had to grapple with the problem of taxes and land revenue. Ancient Babylonian tablets explain in an algorithmic form how to deal with this. For example, if a field is so long and is expected to yield so much grain, then what should be its width?

Today we would consider this to be an elementary problem in algebra. Let the width be x, then x*(length of the field) = area and area*(grain productivity) = grain yield and solve for x.

But this idea was unknown to the Babylonians and they had to rely on elaborate procedures to solve such problems. *Every type of problem would have its own procedure.*

The idea of a general system which could solve all such problems in a unified and abstract way took shape in Medieval Baghdad, the city of the Arabian Nights. The Abbasid Caliphs ruled Baghdad from 762 to 1258 AD. Under them, there was a cultural flowering that lasted right till the Mongol invasion.

*Extent of the Abbasid Caliuphate around 850 AD*

Caliph Haroun al-Rashid created the House of Wisdom, a cultural center in Baghdad that attracted scholars from across the Arabic speaking world including Muslims, Christians and Jews. Sciences of mathematics, astronomy, medicine, geography and chemistry grew.

The Arabs initially translated works of learning from Greece, Babylon and India and based on these made original contributions of their own. Among the ideas flowing in were the Geometry of Euclid and the decimal system of the Indians.

In 830 AD, the next Caliph, Al-Mamun encouraged a Persian scholar to bring out a book as a popular work on calculation. The book would have a number of examples to solve practical problems faced by people like surveying, trade and inheritance. The scholar appointed to this task was Muhammed Ibn Musa Al Khwarizmi. Al Khwarizmi had already written a book five years previously called ‘On the calculation with Hindu Numerals’ and was familiar with the mathematical ideas running through Baghdad at the time.

* Soviet postage stamp depicting Al Khwarizmi*

This book however is what posterity remembers him for. The Compendious Book on Calculation by Completion and Balancing is accepted as the first ever text book on algebra. It contained a detailed and systematic study of quadratic equations.

*A page from The Compendious Book on Calculation by Completion and Balancing*

If one considers this book today, several things stand out. For one, Islamic mathematicians of the period avoided 0s and negative numbers, so Al Khwarizmi divided quadratic equations into 6 types:

1. ax^2 = bx

2. ax^2 = c

3. bx = c

4. ax^2 +bx = c

5. ax^2 +c = bx

6. bx + c = ax^2

A modern reader would recognize 4, 5 and 6 as one and the same (ax^2 +bx + c = 0), but remember 0s were not allowed, also all 3 coefficients a, b and c had to be kept positive, thereby needing so many forms.

Another difference is that the notation of ‘x’ so common to us today had not been invented, so to represent the equation

(10-x)^2 = 81x,

Al Khwarizmi wrote:

“You divide ten into two parts: multiply the one by itself; it will be equal to the other taken eighty-one times.”

To solve a quadratic equation, one first had to reduce it to one of the 6 forms described by Al Khwarizmi and then repeatedly use 2 operations:

1. *Al-Gabr* (forcing/restoring): moving a negative quantity to the other side of the equal sign. e.g. x^2 = 40x – 4x^2 becomes 5x^2 = 40x

2. *Al-Muqabala* (balancing): Subtracting the same quantity from both sides. e.g. x^2 + 40x + 4x^2 becomes 5 = 40x + 3x^2

From the first of these steps, we get the modern word ‘algebra’. The Latin translation of Al Khwarizmi’s name (Algorithmi), gave us the modern word ‘algorithm’.

Al Khwarizmi also created trigonometric tables and made contributions to geography, astronomy, arithmetic and the Hebrew Calendar. He even wrote two books on the construction and use of astrolabes.

*Statue of Al Khwarizmi with an astrolabe*