The first treatise on algebra was written by Diophantus of Alexandria in the 3rd century AD. The term derives from the Arabic al-jabr or literally "the reunion of broken parts.'' As well as its mathematical meaning, the word also means the surgical treatment of fractures. It gained widespread use through the title of a book ilm al-jabr wa'l-mukabala - the science of restoring what is missing and equating like with like - written by the mathematician Abu Ja'far Muhammad (active c.800-847), who subsequently has become know as al-Khwarazmi, the man of Kwarazm (now Khiva in Uzbekistan). He introduced the writing down of calculations in place of using an abacus. Algorism (the Arabic or decimal system of writing numbers) and algorithm both derive from his name.

