NebulaNumerica

Completing the square

An expression like x squared plus 6 x is almost a square. Completing the square means writing it as a square plus or minus a number.

Had the expression been x squared plus 6 x plus 9, it would have been a square already: multiplied out, the quantity x plus 3, squared is exactly x squared plus 6 x plus 9. Our x squared plus 6 x lacks the 9. But adding 9 and taking it away again changes nothing, so

x squared plus 6 x equals x squared plus 6 x plus 9 minus 9

The first three terms make up the quantity x plus 3, squared, so

x squared plus 6 x equals the quantity x plus 3, squared minus 9

Why it works

x² 3x 3x 9 x 3 x 3

As a picture: x squared is a square x wide, and 6 x is two strips, each 3 wide and x long, laid along two sides of it. Together they almost make a square x plus 3 wide, but a small 3-by-3 corner is missing. So x squared plus 6 x is the big square, the quantity x plus 3, squared, minus the corner, 9.

To complete the square of x squared plus b x: halve b, square the bracket x plus that half, and take away the half squared.

When b is odd, the half is a fraction:

x squared plus 5 x equals the quantity x plus 5 over 2, squared minus 25 over 4

Solving with it

Completing the square turns an equation into one that taking the square root can solve:

x squared plus 6 x minus 7 equals 0
the quantity x plus 3, squared minus 9 minus 7 equals 0
the quantity x plus 3, squared equals 16

So x plus 3 is 4 or minus 4, which gives x equals 1 or x equals minus 7.

Completing the square also shows the lowest point of a graph: the quantity x plus 3, squared minus 16 is never smaller than minus 16, and it is minus 16 exactly when x equals minus 3. And with vectors, it finds the centre and radius of a sphere from its equation, as in Spheres.

Where the quadratic formula comes from

Doing the same with letters instead of numbers gives the quadratic formula. We follow the same steps as above, one at a time, starting from

a x squared plus b x plus c equals 0

1. Make the number in front of x² equal to 1. Divide every term by a:

x squared plus b over a x plus c over a equals 0

2. Move the constant term to the other side:

x squared plus b over a x equals minus c over a

3. Complete the square on the left. The number in front of x is b over a, and half of it is b over 2 a. So the left-hand side is the quantity x plus b over 2 a, squared minus b over 2 a squared, which is b squared over 4 a squared. Moving that over to the right as well:

the quantity x plus b over 2 a, squared equals b squared over 4 a squared minus c over a

4. Write the right-hand side as one fraction. Its bottom is 4 a squared, so c over a becomes 4 a c over 4 a squared:

the quantity x plus b over 2 a, squared equals the quantity b squared minus 4 a c, over 4 a squared

5. Take the square root of both sides. The root of the bottom 4 a squared is 2 a, and we mustn't forget the ±:

x plus b over 2 a equals plus or minus the square root of the quantity b squared minus 4 a c, over 2 a

6. Move b over 2 a over, and put the two fractions together, since they have the same bottom:

x equals the quantity minus b plus or minus the square root of the quantity b squared minus 4 a c,, over 2 a

That is the quadratic formula. It is nothing more than completing the square, done once and for all with letters, so that we never have to do it again with numbers.

Practise Quadratic equations

How was this article?

0 of 2000