Completing the Square: Definition, Formula & Example

Completing the square is an algebraic method that rewrites a quadratic expression so part of it becomes a perfect square. It is commonly used to solve quadratic equations, convert quadratics into vertex form, identify a parabola’s vertex, and derive relationships involving quadratic expressions.
For a simple expression such as:
x² + 6x
half the coefficient of x is 3. Squaring 3 gives 9, so adding 9 creates:
x² + 6x + 9
which factors as:
(x + 3)²
That transformation is the central idea behind completing the square.
Although the workbook places this topic within Arithmetic & Number Theory, the calculation itself is an algebraic transformation involving quadratic expressions.
What Does Completing the Square Mean?
A quadratic expression commonly appears in the form:
ax² + bx + c
where:
a ≠ 0
Completing the square rewrites the quadratic so that it contains a squared binomial such as:
(x + p)²
or:
(x – p)²
The key identity is:
(x + p)² = x² + 2px + p²
If an expression begins with:
x² + bx
then compare b with 2p.
Since:
2p = b
we get:
p = b / 2
Therefore:
x² + bx + (b / 2)² = (x + b / 2)²
This is the basic completing-the-square formula when the coefficient of x² is 1.
Completing the Square Formula
For:
x² + bx
add:
(b / 2)²
to create a perfect square.
Therefore:
x² + bx + (b / 2)² = (x + b / 2)²
For example:
x² + 10x
Half of 10 is 5:
10 / 2 = 5
Square it:
5² = 25
Therefore:
x² + 10x + 25 = (x + 5)²
The number added is determined entirely by the coefficient of x.
Why Half the Middle Coefficient?
Expand:
(x + p)²
The result is:
x² + 2px + p²
For this to match:
x² + bx + ?
the middle coefficients must satisfy:
2p = b
so:
p = b / 2
The final constant must therefore be:
p² = (b / 2)²
That is why completing the square always takes half the linear coefficient and squares it when the leading coefficient is 1.
Example: Complete the Square for x² + 8x
Start with:
x² + 8x
Half of 8 is:
8 / 2 = 4
Square 4:
4² = 16
Add 16:
x² + 8x + 16
Factor:
(x + 4)²
Therefore:
x² + 8x + 16 = (x + 4)²
If the goal is to rewrite the original expression without changing its value, add and subtract 16:
x² + 8x = x² + 8x + 16 – 16
Then:
x² + 8x = (x + 4)² – 16
This form is often useful when transforming a quadratic function.
Example With a Negative Middle Term
Consider:
x² – 12x
Half of -12 is:
-12 / 2 = -6
Square it:
(-6)² = 36
Therefore:
x² – 12x + 36 = (x – 6)²
If the expression must remain equivalent to the original:
x² – 12x = (x – 6)² – 36
The sign inside the squared binomial follows the sign of half the original linear coefficient.
How to Solve a Quadratic by Completing the Square
Consider:
x² + 6x – 7 = 0
Move the constant term to the other side:
x² + 6x = 7
Take half of 6:
6 / 2 = 3
Square it:
3² = 9
Add 9 to both sides:
x² + 6x + 9 = 7 + 9
Simplify:
(x + 3)² = 16
Take square roots:
x + 3 = ±4
This produces two cases:
x + 3 = 4
x = 1
and:
x + 3 = -4
x = -7
Therefore:
x = 1 or x = -7
Check the original equation.
For x = 1:
1² + 6(1) – 7 = 0
For x = -7:
(-7)² + 6(-7) – 7 = 49 – 42 – 7 = 0
Both solutions are valid.
The broader structure and solution methods for equations of this type belong to the dedicated quadratic equation topic.
Why You Must Add the Same Number to Both Sides
When completing the square inside an equation, adding a number to only one side changes the equation.
For example:
x² + 4x = 12
To create a perfect square, add:
(4 / 2)² = 4
Because this is an equation, 4 must be added to both sides:
x² + 4x + 4 = 12 + 4
Then:
(x + 2)² = 16
Adding the same quantity to both sides preserves equality.
Completing the Square When a ≠ 1
Consider:
2x² + 8x – 10 = 0
The coefficient of x² is 2, so first divide every term by 2:
x² + 4x – 5 = 0
Move the constant:
x² + 4x = 5
Half of 4 is 2:
4 / 2 = 2
Square it:
2² = 4
Add 4 to both sides:
x² + 4x + 4 = 9
Factor:
(x + 2)² = 9
Take square roots:
x + 2 = ±3
Therefore:
x = 1
or:
x = -5
The essential rule is that the x² coefficient should be 1 before the ordinary half-and-square step is applied.
Example Without Dividing the Entire Equation First
A quadratic expression can also be handled by factoring the leading coefficient from the quadratic and linear terms.
Consider:
3x² + 12x + 7
Factor 3 from the first two terms:
3(x² + 4x) + 7
Complete the square inside the parentheses:
x² + 4x = (x + 2)² – 4
Substitute:
3[(x + 2)² – 4] + 7
Distribute 3:
3(x + 2)² – 12 + 7
Simplify:
3(x + 2)² – 5
Therefore:
3x² + 12x + 7 = 3(x + 2)² – 5
This form immediately reveals useful information about the graph.
Completing the Square and Vertex Form
A quadratic function in standard form is:
y = ax² + bx + c
Vertex form is:
y = a(x – h)² + k
where (h, k) is the vertex.
Completing the square provides a direct way to transform standard form into vertex form.
Consider:
y = x² + 6x + 5
Group the quadratic and linear terms:
y = (x² + 6x) + 5
Complete the square:
x² + 6x = (x + 3)² – 9
Therefore:
y = (x + 3)² – 9 + 5
Simplify:
y = (x + 3)² – 4
Since:
x + 3 = x – (-3)
the vertex is:
(-3, -4)
Completing the square therefore converts the equation into a form where the vertex can be read directly.
General Vertex Coordinates
For:
y = ax² + bx + c
the horizontal coordinate of the vertex is:
h = -b / (2a)
The vertical coordinate is found by evaluating the function at that value.
Equivalently:
k = c – b² / (4a)
So the quadratic can be written as:
y = a(x + b / (2a))² + c – b² / (4a)
This general result comes directly from completing the square.
Completing the Square and Perfect Squares
The method works because it deliberately creates a perfect square.
For instance:
x² + 14x + 49
is a perfect-square trinomial because:
49 = 7²
and:
14x = 2 × 7 × x
Therefore:
x² + 14x + 49 = (x + 7)²
Recognizing the structure can make the calculation faster, but completing the square still works even when the perfect-square term is not immediately obvious.
Example With an Odd Coefficient
Completing the square does not require the coefficient of x to be even.
Consider:
x² + 5x
Half of 5 is:
5 / 2
Square it:
(5 / 2)² = 25 / 4
Therefore:
x² + 5x + 25 / 4 = (x + 5 / 2)²
So:
x² + 5x = (x + 5 / 2)² – 25 / 4
Fractions are completely valid in completing-the-square calculations.
Worked Equation With an Odd Coefficient
Solve:
x² + 5x + 1 = 0
Move 1:
x² + 5x = -1
Add:
(5 / 2)² = 25 / 4
to both sides:
x² + 5x + 25 / 4 = -1 + 25 / 4
Write -1 as -4/4:
(x + 5 / 2)² = 21 / 4
Take square roots:
x + 5 / 2 = ±√21 / 2
Therefore:
x = (-5 ± √21) / 2
The result is exact.
If a decimal answer were required, the square root could then be approximated.
Completing the Square and the Quadratic Formula
Completing the square can be applied to the general equation:
ax² + bx + c = 0
Following the method symbolically leads to:
x = (-b ± √(b² – 4ac)) / (2a)
That is the familiar quadratic formula.
The quadratic formula page owns the direct use and interpretation of that formula; here, the important relationship is that completing the square provides one route by which the formula can be derived.
Completing the Square vs. Factoring
Both methods can solve some quadratic equations, but they work differently.
Consider:
x² + 5x + 6 = 0
This factors neatly:
(x + 2)(x + 3) = 0
so the solutions are easy to find.
Other quadratics do not factor cleanly using integers. Completing the square remains systematic even when convenient factors are unavailable.
The dedicated factoring quadratics topic focuses on identifying and using factor structures, while completing the square deliberately transforms the quadratic into a squared-binomial form.
Square Roots After Completing the Square
Once an equation reaches:
(x + p)² = q
the next step commonly requires taking a square root:
x + p = ±√q
The ± is essential because both a positive and negative number can have the same positive square.
For example:
z² = 25
means:
z = 5 or z = -5
The broader arithmetic of square roots is separate from the transformation used to create the squared expression.
What if the Right Side Is Negative?
Suppose completing the square produces:
(x + 2)² = -9
No real number squared equals -9.
Therefore, the equation has no real solutions.
In a number system that includes complex numbers:
x + 2 = ±3i
and:
x = -2 ± 3i
Whether complex solutions are required depends on the scope of the problem.
Checking a Completed Square
You can verify the result by expanding the squared binomial.
Suppose:
x² – 8x = (x – 4)² – 16
Expand:
(x – 4)² = x² – 8x + 16
Subtract 16:
x² – 8x + 16 – 16
which simplifies to:
x² – 8x
The original expression is recovered, confirming the transformation.
A Geometric Interpretation
The phrase completing the square has a literal geometric interpretation.
Imagine:
x² + bx
as the area of a square with area x² plus rectangular regions representing the bx term.
Splitting the linear contribution into two equal strips leaves a missing corner.
The side length of that corner is:
b / 2
so its area is:
(b / 2)²
Adding that small square completes one larger square whose side length is:
x + b / 2
Therefore:
x² + bx + (b / 2)² = (x + b / 2)²
The algebra and geometry describe the same transformation.
Common Mistakes
A common error is squaring the full coefficient instead of half of it.
For:
x² + 10x
the required number is not:
10² = 100
It is:
(10 / 2)² = 25
Another mistake is forgetting to add the same number to both sides of an equation.
For:
x² + 8x = 2
adding 16 only to the left side would change the equation. The correct step is:
x² + 8x + 16 = 2 + 16
A third error is forgetting the ± sign after taking the square root.
From:
(x – 4)² = 9
both:
x – 4 = 3
and:
x – 4 = -3
must be considered.
Completing the Square Is Not a General Number-Factor Method
Completing the square transforms a quadratic expression. It does not identify integer divisor relationships.
For example, finding common factors or classifying composite numbers examines how whole numbers divide, rather than how a quadratic expression can be rewritten.
Likewise, extracting cube roots reverses cubing and does not use the half-the-linear-coefficient procedure.
Counting questions are different again. Combinatorics studies possible arrangements and selections, while combinations specifically count selections where order does not matter.
These distinctions matter because similar-looking calculations can belong to very different mathematical structures.
Frequently Asked Questions
What is completing the square?
Completing the square is a method of rewriting a quadratic expression so that it contains a perfect-square binomial such as (x + p)².
What number do you add when completing the square?
For:
x² + bx
add:
(b / 2)²
This creates:
(x + b / 2)²
How do you complete the square when the x² coefficient is not 1?
First divide the equation by the leading coefficient when appropriate, or factor that coefficient from the quadratic and linear terms. Then apply the half-and-square rule to the expression inside.
Can completing the square give two answers?
Yes. When solving an equation, taking the square root of both sides normally creates positive and negative possibilities.
For example:
(x + 1)² = 16
gives:
x + 1 = ±4
Can completing the square produce fractions?
Yes. If the coefficient of x is odd, halving it generally produces a fraction. Fractions are valid and should not be rounded unless the problem specifically asks for an approximation.
Is completing the square the same as factoring?
No. Factoring expresses a quadratic as a product, while completing the square rewrites it using a squared binomial.
Can completing the square find the vertex of a parabola?
Yes. Rewriting a quadratic as:
y = a(x – h)² + k
makes its vertex (h, k) directly visible.
Why is completing the square useful?
It provides a systematic way to transform and solve quadratics, derive vertex form, identify a parabola’s vertex, and understand the structure behind the quadratic formula.
Final Example
Solve:
x² – 10x + 13 = 0
Move the constant:
x² – 10x = -13
Half of -10 is:
-5
Square it:
(-5)² = 25
Add 25 to both sides:
x² – 10x + 25 = -13 + 25
Therefore:
(x – 5)² = 12
Take square roots:
x – 5 = ±√12
Since:
√12 = 2√3
we get:
x – 5 = ±2√3
Therefore:
x = 5 ± 2√3
Completing the square works because the original quadratic is transformed into a perfect-square equation without changing its solutions.



