The invention of completing the square

Share on facebook
Share on google
Share on twitter
Share on linkedin
Table of Contents

Completing the square is a mathematical method used to solve quadratic equations. Quadratic equations are those in the following form: ax² + bx + c = d

In this method, a quadratic equation (as above) is usually written as the sum of a perfect square and constant (as below), making it easier to solve: (x + f)² + g = h

The process of finding f and g is given by this method, thus allowing one to find the value of x. Note that x² is considered a square hence x is considered a root[1].


The Persian polymath Muhammad Ibn Musa Al-Khwarizmi invented[2] the completing the square method around 820. In his publication (circa 820), he demonstrates this method in solving a problem titled, “A square and ten roots are equal to thirty-nine Dirhams”. In the form of a mathematical equation, this is: x² + 10x = 39

It can be taken that a = 1, b = 10, c = 0, d = 39, as per the definition. This must be treated geometrically, as below. It is implied that a is factored out (since a = 1 here, there is no observable change):

The scaled root must then be split (reminder, x is considered a root) into two and arranged as the “L” of a square:

The incomplete square is completed below:

This geometric piece can be translated into a mathematical equation after factoring in a (but a = 1, so no observable change):

(x + 5)² – 25 = 39

(x + 5)² = 39 + 25 = 64

x + 5 = 8

Hence, the values of the root and square are obtained:

x = 3, x² = 9

So, it is shown geometrically that f = b/2 and g = c – (b/2)². Or f = b/2a and g = c – b²/4a to account that a will not always be equal to 1.


Here is a statue[3] of Al-Khwarizmi:

circa 780 - circa 850