Around 825 A.D. in Baghdad, Mohammed ibn-Musa al-Khwarizimi wrote a book called “Kitab al-jabr wa al-muqabalah”, which means “The science of restoration and reduction” and stood as the major algebraic work of the period. The word “algebra” comes from this title (“al-jabr”), since this was the first textbook used in Europe for this subject. The word “algorithm” is a distortion of al-Khwarizmi’s name.