Completing the Square

Drag the red points.

The quadratic equation above, that can be solved by using comparison of areas, is not a general quadratic equation. In order to interpret the numbers as lengths, they must not be negative. It is possible to make a similar geometric construction to solve \(x^2-bx=a\), yielding \((x-b/2)^2=a+(b/2)^2\).

As long as we use a geometrical interpretation of the problem, \(a\) must not be negative and the geometrical solution will not yield negative \(x\)-values. In order to get all roots in the general case, it is better to use an

Algebraic approach

\[ax^2+bx+c=0 \Leftrightarrow ax^2+bx=-c \Leftrightarrow x^2+\frac{b}{a}=-\frac{c}{a}\]

We can assume that \(a\neq 0\), otherwise it would be a linear equation.

In order to make the left-hand-side of the equation a square, add \(\left(\frac{b}{2a}\right)^2\) to both sides of the equation

\[x^2+\frac{b}{a}+\left(\frac{b}{2a}\right)^2=\left(\frac{b}{2a}\right)^2-\frac{c}{a} \Leftrightarrow \left(x+\frac{b}{2a}\right)^2=\left(\frac{b}{2a}\right)^2-\frac{c}{a}\]

Rearranging the right-hand-side, we get


If the right-hand-side is non-negative, we can solve the equation by using the square root. If the right-hand-side is negative, we can use complex numbers to find the roots.

The first person to find a method for solving quadratic functions was


who also made one of the greatest contributions to mankind ever!


You can use the method of completing the square to solve quadratic equations, and also to write quadratic functions using

Vertex Form

Move the graph!


Show that if x is a positive real number then

\[x+\frac{1}{x}\geq 2\]

by Malin Christersson under a Creative Commons Attribution-Noncommercial-Share Alike 2.5 Sweden License