Completing the Square
Introduction: Why this skill matters ✨
students, in Functions, many important graphs and equations are built from quadratic expressions such as $f(x)=ax^2+bx+c$. One of the most useful ways to understand these functions is to rewrite them in a different form called vertex form. The method that makes this possible is completing the square. It is a powerful algebraic tool because it turns a quadratic expression into something easier to interpret, graph, and solve.
By the end of this lesson, you should be able to:
- explain what completing the square means and why it works,
- rewrite a quadratic expression in a squared form,
- use completing the square to find key graph features like the vertex and axis of symmetry,
- solve quadratic equations by turning them into a square,
- connect this technique to broader ideas in Functions, including transformations and inverse relationships.
This topic appears everywhere in mathematics and science. For example, when modeling the path of a ball, the profit from a business decision, or the shape of a bridge arch, a quadratic model often appears. Completing the square helps reveal the hidden structure inside that model 📈.
The basic idea of completing the square
A perfect square trinomial has the form $x^2+2px+p^2$, which factors as $(x+p)^2$. The goal of completing the square is to take an expression like $x^2+6x$ and add a constant so it becomes a perfect square. Then we can factor it neatly.
Let’s start with a simple example:
$$x^2+6x$$
The number $6$ is twice $3$, so we want $x^2+6x+9$, because $9=3^2$. Then:
$$x^2+6x+9=(x+3)^2$$
Since we added $9$, we must also keep the expression equivalent by subtracting $9$ if needed:
$$x^2+6x=(x+3)^2-9$$
This is the main move in completing the square. The expression has not changed in value; it has only been rewritten in a more useful form.
Why is this useful? Because the squared expression shows a minimum or maximum value immediately. For example, $(x+3)^2$ is never negative, so $(x+3)^2-9$ is always at least $-9$. That tells us the graph of $y=x^2+6x$ has its lowest point at $(-3,-9)$.
Completing the square for a general quadratic
A quadratic function usually looks like $f(x)=ax^2+bx+c$, where $a\neq 0$. To complete the square, it is best if the coefficient of $x^2$ is $1$. If it is not, we first factor it out from the $x^2$ and $x$ terms.
For example, consider:
$$f(x)=2x^2+8x+3$$
First, factor out $2$ from the terms involving $x$:
$$f(x)=2(x^2+4x)+3$$
Now complete the square inside the brackets. Half of $4$ is $2$, and $2^2=4$, so we add and subtract $4$ inside the bracket:
$$f(x)=2(x^2+4x+4-4)+3$$
Factor the trinomial:
$$f(x)=2\big((x+2)^2-4\big)+3$$
Now simplify:
$$f(x)=2(x+2)^2-8+3$$
So:
$$f(x)=2(x+2)^2-5$$
This is called vertex form. In general, a quadratic function can be written as:
$$f(x)=a(x-h)^2+k$$
This form tells us the vertex is $(h,k)$, and the axis of symmetry is $x=h$. Here, the function $f(x)=2(x+2)^2-5$ has vertex $(-2,-5)$ and axis of symmetry $x=-2$.
This is one of the biggest benefits of completing the square: it turns an algebraic expression into a graphing tool.
Solving equations by completing the square
Completing the square is also useful for solving quadratic equations. Suppose we want to solve:
$$x^2+8x+7=0$$
Move the constant term to the other side:
$$x^2+8x=-7$$
Take half of $8$, which is $4$, and square it to get $16$. Add $16$ to both sides:
$$x^2+8x+16=9$$
Factor the left-hand side:
$$ (x+4)^2=9$$
Now take the square root of both sides:
$$x+4=\pm 3$$
So:
$$x=-4\pm 3$$
The two solutions are:
$$x=-1 \quad \text{and} \quad x=-7$$
This method works even when factoring is difficult. In IB Mathematics, you may need this technique when an equation does not factor nicely, or when you need exact solutions rather than decimal approximations.
A very important detail is the $\pm$ sign. When you take the square root of both sides, both the positive and negative roots must be considered, because both square to the same value.
Connecting completing the square to functions and graphs
In Functions, the form of an expression tells us how to interpret it. A quadratic in standard form $ax^2+bx+c$ tells us the $y$-intercept quickly, because $f(0)=c$. But the vertex form $a(x-h)^2+k$ gives deeper information about shape and position.
For example, compare these two forms:
$$f(x)=x^2-4x+1$$
and
$$f(x)=(x-2)^2-3$$
They represent the same function, but the second form immediately shows that the vertex is $(2,-3)$.
This matters when you study transformations. Starting from the parent function $y=x^2$:
- $y=(x-h)^2$ shifts the graph horizontally by $h$ units,
- $y=x^2+k$ shifts it vertically by $k$ units,
- $y=a(x-h)^2+k$ stretches or compresses the graph vertically by factor $|a|$ and reflects it in the $x$-axis if $a<0$.
Completing the square helps convert standard form into transformation form, so you can describe the graph clearly.
It also helps with related concepts like domain and range. For instance, if
$$f(x)=-(x-1)^2+6$$
then the parabola opens downward, so the maximum value is $6$. Therefore the range is:
$$f(x)\le 6$$
This kind of reasoning is very common in IB when linking algebra to graph behaviour.
Example with interpretation in a real-world context
Suppose the height of a thrown ball is modeled by:
$$h(t)=-5t^2+20t+1$$
where $h(t)$ is height in meters and $t$ is time in seconds.
To find the maximum height, complete the square:
$$h(t)=-5(t^2-4t)+1$$
Half of $-4$ is $-2$, and $(-2)^2=4$, so:
$$h(t)=-5(t^2-4t+4-4)+1$$
$$h(t)=-5\big((t-2)^2-4\big)+1$$
$$h(t)=-5(t-2)^2+20+1$$
$$h(t)=-5(t-2)^2+21$$
Now the vertex is $(2,21)$. This means the ball reaches its maximum height of $21$ meters after $2$ seconds. The equation is no longer just a string of symbols; it gives real information about motion 🚀.
This is exactly why completing the square is important in modeling. It lets you interpret a function’s parameters in context.
Common mistakes and how to avoid them
One common mistake is forgetting to adjust the constant after completing the square. If you add a number inside the bracket, you must balance the equation or expression so the value stays the same.
Another mistake is handling the coefficient $a$ incorrectly when it is not $1$. Always factor it out first from the terms containing $x$.
A third mistake is forgetting the $\pm$ when solving an equation after taking a square root. For example, if
$$(x-3)^2=16$$
then:
$$x-3=\pm 4$$
not just $x-3=4$.
A good habit is to check your answer by substitution. If you solve $x^2+8x+7=0$ and get $x=-1$ and $x=-7$, substitute each value back into the original equation to confirm they work.
Conclusion
Completing the square is a central skill in Functions because it transforms quadratics into forms that are easier to solve, graph, and interpret. It connects algebra with geometry by revealing the vertex, axis of symmetry, and maximum or minimum value of a parabola. It also supports IB reasoning by helping you move between standard form and vertex form, which is especially useful in transformations and modeling.
For students, the key idea is simple: completing the square is not just an algebra trick. It is a way of uncovering the structure of a function. Once you can do it confidently, many quadratic problems become much clearer ✅.
Study Notes
- Completing the square rewrites a quadratic expression so part of it becomes a perfect square, such as $(x+p)^2$.
- The identity behind the method is $x^2+2px+p^2=(x+p)^2$.
- For a quadratic $ax^2+bx+c$, factor out $a$ first if $a\neq 1$.
- Vertex form is $f(x)=a(x-h)^2+k$.
- In vertex form, the vertex is $(h,k)$ and the axis of symmetry is $x=h$.
- If $a>0$, the parabola opens upward and has a minimum value of $k$.
- If $a<0$, the parabola opens downward and has a maximum value of $k$.
- Completing the square can solve quadratic equations that do not factor easily.
- When taking square roots, always use $\pm$.
- In Functions, completing the square helps connect algebraic expressions to graph transformations, range, and real-world models.
