Skip to main content

## SectionA.1Completing the Square

An important algebraic technique is known as completing the square. For example, when trying to identify the shape of the curve satisfying

$$x^2 - 6x + y^2 = 16\tag{A.1.1}$$

we can start by noticing the terms $$x^2+y^2\text{,}$$ which suggests that this implicit equation might describe a circle. The equation for a circle involves the sum of squares, so we need to find a way to convert the terms $$x^2-6x$$ into a perfect square. That is, we'd like to replace these terms by something of the form $$(x-h)^2\text{.}$$ Expanding, we have

$$(x-h)^2 = x^2 - 2hx + h^2\tag{A.1.2}$$

so it is clear that we should set $$h=3\text{.}$$ What about the missing term $$h^2=9\text{?}$$ Take it from the constant term $$16\text{!}$$ Explicitly, since

$$(x-3)^2 = x^2 - 6x + 9\tag{A.1.3}$$

we have

$$16 = x^2 - 6x + y^2 = \bigl((x-3)^2 - 9\bigr) + y^2\tag{A.1.4}$$

or in other words

$$(x-3)^2 + y^2 = 25\tag{A.1.5}$$

which is the equation of a circle of radius $$5$$ centered at the point $$(3,0)\text{.}$$

This example demonstrates the technique known as completing the square. Given an expression of the form

$$Q = ax^2 + bx\tag{A.1.6}$$

we'd like to eliminate the linear term. Reasoning along similar lines as above, we have

\begin{align} Q \amp= a \left(x^2 + \frac{b}{a}x \right) = a \left( x^2 + \frac{b}{a}x + \frac{b^2}{4a^2} - \frac{b^2}{4a^2} \right)\notag\\ \amp= a \left(x+\frac{b}{2a}\right)^2 - \frac{b^2}{4a}\tag{A.1.7} \end{align}

Completing the square is the technique used to prove the quadratic formula, see SectionÂ A.2.