The Compendious Book on Calculation by Completion and Balancing (Arabic: الكتاب المختصر في حساب الجبر والمقابلة‎ al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wal-muqābala) is a mathematical book written approximately 820 CE.
The book was written with the encouragement of Caliph al-Ma'mun as a popular work on calculation and is replete with examples and applications to a wide range of problems in trade, surveying and legal inheritance.
The term "algebra" is derived from the name of one of the basic operations with equations (al-jabr, meaning "restoration", referring to adding a number to both sides of the equation to consolidate or cancel terms) described in this book.
The book was translated in Latin as Liber algebrae et almucabala by Robert of Chester (Segovia, 1145) hence "algebra", and also by Gerard of Cremona.
A unique Arabic copy is kept at Oxford and was translated in 1831 by F. Rosen.
A Latin translation is kept in Cambridge.

It provided an exhaustive account of solving polynomial equations up to the second degree, and discussed the fundamental methods of "reduction" and "balancing", referring to the transposition of terms to the other side of an equation, that is, the cancellation of like terms on opposite sides of the equation.

Al-Khwārizmī's method of solving linear and quadratic equations worked by first reducing the equation to one of six standard forms (where b and c are positive integers)
squares equal roots (ax² = bx)
squares equal number (ax² = c)
roots equal number (bx = c)
squares and roots equal number (ax² + bx = c)
squares and number equal roots (ax² + c = bx)
roots and number equal squares (bx + c = ax²)
by dividing out the coefficient of the square and using the two operations al-jabr (Arabic: الجبر‎ "restoring" or "completion") and al-muqābala ("balancing").
Al-jabr is the process of removing negative units, roots and squares from the equation by adding the same quantity to each side.
For example, x² = 40x − 4x² is reduced to 5x² = 40x.
Al-muqābala is the process of bringing quantities of the same type to the same side of the equation.
For example, x² + 14 = x + 5 is reduced to x² + 9 = x.
The above discussion uses modern mathematical notation for the types of problems that the book discusses.
However, in al-Khwārizmī's day, most of this notation had not yet been invented, so he had to use ordinary text to present problems and their solutions.
For
example, for one problem he writes, (from an 1831 translation)
If some one says: "You divide ten into two parts: multiply the one by itself; it will be equal to the other taken eighty-one times."
Computation: You say, ten less a thing, multiplied by itself, is a hundred plus a square less twenty things, and this is equal to eighty-one things.
Separate the twenty things from a hundred and a square, and add them to eighty-one.
It will then be a hundred plus a square, which is equal to a hundred and one roots.
Halve the roots; the moiety is fifty and a half.
Multiply this by itself, it is two thousand five hundred and fifty and a quarter.
Subtract from this one hundred; the remainder is two thousand four hundred and fifty and a quarter.
Extract the root from this; it is forty-nine and a half.
Subtract this from the moiety of the roots, which is fifty and a half.
There remains one, and this is one of the two parts.

In modern notation this process, with x the "thing" (شيء‎ shayʾ) or "root", is given by the steps,
Let the roots of the equation be x = p and x = q. Then ,  and
So a root is given by
Several authors have also published texts under the name of Kitāb al-jabr wal-muqābala, including Abū Ḥanīfa Dīnawarī, Abū Kāmil Shujāʿ ibn Aslam, Abū Muḥammad al-‘Adlī, Abū Yūsuf al-Miṣṣīṣī, 'Abd al-Hamīd ibn Turk, Sind ibn ‘Alī, Sahl ibn Bišr, and Sharaf al-Dīn al-Ṭūsī.

J.J. O'Conner and E.F. Robertson wrote in the MacTutor History of Mathematics archive:
Perhaps one of the most significant advances made by Arabic mathematics began at this time with the work of al-Khwarizmi, namely the beginnings of algebra.
It is important to understand just how significant this new ide
The Compendious Book on Calculation by Completion and Balancing (Arabic: الكتاب المختصر في حساب الجبر والمقابلة‎ al-Kitāb al-mukhtaṣar fī ḥisāb al-jabr wal-muqābala) is a mathematical book written approximately 820 CE. The book was written with the encouragement of Caliph al-Ma'mun as a popular work on calculation and is replete with examples and applications to a wide range of problems in trade, surveying and legal inheritance. The term "algebra" is derived from the name of one of the basic operations with equations (al-jabr, meaning "restoration", referring to adding a number to both sides of the equation to consolidate or cancel terms) described in this book. The book was translated in Latin as Liber algebrae et almucabala by Robert of Chester (Segovia, 1145) hence "algebra", and also by Gerard of Cremona. A unique Arabic copy is kept at Oxford and was translated in 1831 by F. Rosen. A Latin translation is kept in Cambridge.
It provided an exhaustive account of solving polynomial equations up to the second degree, and discussed the fundamental methods of "reduction" and "balancing", referring to the transposition of terms to the other side of an equation, that is, the cancellation of like terms on opposite sides of the equation.
Al-Khwārizmī's method of solving linear and quadratic equations worked by first reducing the equation to one of six standard forms (where b and c are positive integers)
squares equal roots (ax² = bx)
squares equal number (ax² = c)
roots equal number (bx = c)
squares and roots equal number (ax² + bx = c)
squares and number equal roots (ax² + c = bx)
roots and number equal squares (bx + c = ax²)
by dividing out the coefficient of the square and using the two operations al-jabr (Arabic: الجبر‎ "restoring" or "completion") and al-muqābala ("balancing"). Al-jabr is the process of removing negative units, roots and squares from the equation by adding the same quantity to each side. For example, x² = 40x − 4x² is reduced to 5x² = 40x. Al-muqābala is the process of bringing quantities of the same type to the same side of the equation. For example, x² + 14 = x + 5 is reduced to x² + 9 = x.
The above discussion uses modern mathematical notation for the types of problems that the book discusses. However, in al-Khwārizmī's day, most of this notation had not yet been invented, so he had to use ordinary text to present problems and their solutions. For
example, for one problem he writes, (from an 1831 translation)
If some one says: "You divide ten into two parts: multiply the one by itself; it will be equal to the other taken eighty-one times." Computation: You say, ten less a thing, multiplied by itself, is a hundred plus a square less twenty things, and this is equal to eighty-one things. Separate the twenty things from a hundred and a square, and add them to eighty-one. It will then be a hundred plus a square, which is equal to a hundred and one roots. Halve the roots; the moiety is fifty and a half. Multiply this by itself, it is two thousand five hundred and fifty and a quarter. Subtract from this one hundred; the remainder is two thousand four hundred and fifty and a quarter. Extract the root from this; it is forty-nine and a half. Subtract this from the moiety of the roots, which is fifty and a half. There remains one, and this is one of the two parts.
In modern notation this process, with x the "thing" (شيء‎ shayʾ) or "root", is given by the steps,
Let the roots of the equation be x = p and x = q. Then ,  and
So a root is given by
Several authors have also published texts under the name of Kitāb al-jabr wal-muqābala, including Abū Ḥanīfa Dīnawarī, Abū Kāmil Shujāʿ ibn Aslam, Abū Muḥammad al-‘Adlī, Abū Yūsuf al-Miṣṣīṣī, 'Abd al-Hamīd ibn Turk, Sind ibn ‘Alī, Sahl ibn Bišr, and Sharaf al-Dīn al-Ṭūsī.
J.J. O'Conner and E.F. Robertson wrote in the MacTutor History of Mathematics archive:
Perhaps one of the most significant advances made by Arabic mathematics began at this time with the work of al-Khwarizmi, namely the beginnings of algebra. It is important to understand just how significant this new ide
Muhammad ibn Musa al-Khwarizmi