Mathematics · Article
Quadratic equations and completing the square
Solve quadratic equations using zero products, square roots, completing the square and a derived formula. Preserve every permitted solution, distinguish the real-root cases and check exact answers in the original equation and context.
Useful background article: Expanding, factoring and algebraic identities
Back to MathematicsAfter reading, you can
- Identify a quadratic equation after simplification and use a zero product without losing a possible zero solution.
- Complete the square through equivalent equation steps, derive the quadratic formula and distinguish the possible numbers of distinct real roots.
- Keep exact fractional or radical answers, check every candidate in the original equation and interpret it within the stated domain and units.
Collect terms before identifying the equation
A quadratic equation in one unknown can be written ax² + bx + c = 0, where a, b and c are fixed real coefficients and a is nonzero. The coefficient a makes the simplified equation genuinely quadratic. In this lesson x is real unless the problem narrows its permitted values. A root means a value of x that satisfies the equation.
An equation containing squared terms need not remain quadratic. For 2x² + 3x = 2x² + 6, subtracting 2x² from both sides gives 3x = 6. Its solution is x = 2, found by the earlier linear method. If the simplified coefficient a is zero, the quadratic formula is unavailable: inspect the remaining linear or constant equation instead.
Use the zero-product rule only when the product is zero
For real numbers, a product is zero exactly when at least one factor is zero. Therefore (x − 2)(x + 3) = 0 means x − 2 = 0 OR x + 3 = 0, giving x = 2 or x = −3. Either factor may be zero; both being zero is also allowed when the factors share the same root.
The same conclusion does not follow from (x − 2)(x + 3) = 4: setting either factor to zero would give a product of zero, not 4. First rewrite an equation with zero on one side, then factor its other side if possible. Factoring changes the expression’s form, while the zero-product rule describes the solutions of the resulting equation.
Do not divide by the unknown and lose a zero root. From x² = 3x, subtract 3x to get x(x − 3) = 0. The roots are x = 0 and x = 3. Dividing the original by x would assume x is nonzero and discard the valid zero solution. Division by a fixed nonzero coefficient is different and remains reversible.
A square equation may have two, one or no real roots
For u² = k, inspect the fixed real number k. If k is positive, the two real solutions are u = √k and u = −√k. The symbol √k denotes the principal, nonnegative square root; it does not itself stand for two values. The ± in u = ±√k records the two alternatives. If k is zero, the only solution is u = 0. If k is negative, there is no real solution because a real square is nonnegative.
For real u, √(u²) = |u|, not always u. For example, √((−3)²) = 3. Taking principal square roots of both sides of u² = 9 gives |u| = 3, hence u = 3 or u = −3. Taking only the positive answer would lose one permitted solution.
An isolated squared bracket follows the same rule. From (x − 1)² = 5, obtain x − 1 = ±√5, then x = 1 ± √5. If the right side were zero, the only root would be x = 1; if it were negative, there would be no real root. Handle any outer multiplier or added constant before interpreting the square equation.
| Condition | Distinct real solutions | Reason |
|---|---|---|
| k > 0 | √k and −√k | Opposite nonzero values have the same square |
| k = 0 | Only 0 | A real square is zero only at zero |
| k < 0 | None | A real square cannot be negative |
Add the same missing square to both sides
Completing the square uses the identity x² + px + (p/2)² = (x + p/2)². The required extra term is the square of half the coefficient of x. To solve x² + 6x = 7, add 9 to both sides: x² + 6x + 9 = 16, so (x + 3)² = 16.
Now x + 3 = ±4, giving x = 1 or x = −7. The original checks are 1² + 6 × 1 = 7 and (−7)² + 6 × (−7) = 7. Adding 9 to only the left side would produce a different equation. Keep brackets around a negative value when squaring it.
Make the coefficient of x² one before using the template
For ax² + bx + c = 0 with a nonzero, divide the complete equation by a first: x² + (b/a)x + c/a = 0. Move the constant to the other side, then add (b/(2a))² to both sides. Using half of b before this normalisation would generally complete the wrong square.
For 2x² − 4x − 2 = 0, divide every term by 2 to obtain x² − 2x − 1 = 0. Then x² − 2x = 1; add 1 to both sides to get (x − 1)² = 2. The exact roots are x = 1 ± √2. A negative leading coefficient may also be divided out, because equality is preserved by division by any fixed nonzero number.
Turn the general equation into one squared expression
The same idea yields a general formula. Starting with ax² + bx + c = 0, multiply the complete equation by the nonzero number 4a. Move 4ac to the right and add b² to both sides: 4a²x² + 4abx + b² = b² − 4ac. The left side is a perfect square, so (2ax + b)² = b² − 4ac.
Write D = b² − 4ac. When D is nonnegative, 2ax + b = ±√D. Subtract b and divide by the nonzero number 2a to obtain x = (−b ± √D)/(2a). The denominator includes both terms in the numerator. Keep the original signs of a, b and c when substituting into the formula; b² squares the entire signed coefficient.
Every derivation step is reversible under the stated real-domain conditions. For positive D, ± supplies both roots. For D = 0 the two written alternatives coincide and count as one distinct root. If a is negative, the formula’s plus branch need not be the larger root; the ± notation lists possibilities rather than ranking them.
Classify distinct real roots before approximating
The discriminant D is the right side of (2ax + b)² = D. If D is positive, its square-root equation gives two distinct real roots. If D is zero, there is one distinct real root, x = −b/(2a), often called a repeated root. If D is negative, no real x satisfies the equation.
For x² − 6x + 9 = 0, D = 0 and the square is (x − 3)² = 0, giving only x = 3. Changing the constant to 10 makes D = −4 and gives (x − 3)² = −1, with no real root. Changing it to 8 makes D = 4 and gives (x − 3)² = 1, with roots 2 and 4. No real roots is different from having zero as a root.
| Discriminant | Root count | Exact result |
|---|---|---|
| D > 0 | Two | x = (−b + √D)/(2a) or x = (−b − √D)/(2a) |
| D = 0 | One | x = −b/(2a) |
| D < 0 | None over the real numbers | A negative value cannot equal the square (2ax + b)² |
Keep exact values until the original checks are complete
Fractions and radicals are exact answers. The roots 1 − √2 and 1 + √2 should remain in that form before any optional decimal approximation. They are approximately −0.414 and 2.414, but the rounded values do not satisfy an exact equation perfectly. An approximate residual must be interpreted with its rounding precision rather than treated as exact equality.
Substitute each candidate into the original equation, including its coefficients and signs. For 2x² − 4x − 2 = 0, write x = 1 + t with t = √2 or t = −√2. Its original left side becomes 2(1 + t)² − 4(1 + t) − 2 = 2t² − 4 = 0, because t² = 2 in both cases. The equivalent derivation explains why no other real roots were missed; a candidate check alone proves only that candidate.
An algebraic root must also fit the problem
Suppose a rectangle has sides x m and (x + 1) m and area 6 m², with both side lengths strictly positive. The numerical equation is x(x + 1) = 6, giving x² + x − 6 = 0. Factoring gives (x − 2)(x + 3) = 0, so the real algebraic roots are 2 and −3. Only x = 2 fits the positive-length domain: the sides are 2 m and 3 m, whose area is 6 m².
The negative root satisfies the real numerical equation but supplies negative side lengths, so it is not a solution of this rectangle problem. A nonnegative domain allows zero; a strictly positive domain does not. A count may also require an integer, and a quantity’s unit must match its model. State these restrictions before interpreting the roots.
Inspect the full root set and an independent candidate
The model uses six stated quadratic equations, including rational and irrational roots, a repeated root, no real roots, a zero root and a negative leading coefficient. Choose the equation and candidate independently. Compare the exact real solution set with the candidate’s evaluation in the original equation; the displayed classification concerns distinct real roots.
A finite candidate list illustrates checks, not the whole real domain. A candidate may pass while another permitted root lies elsewhere, or every listed candidate may fail despite an unlisted root. Use the zero-product rule, a completed square or the derived formula to justify the full root set, then check the originals and any context.
Connect a quadratic equation with its completed square
Choose an equation and an exact candidate independently. Compare the original substitution check with the equivalent completed square, then read the complete real solution set.
Original equation: x² − 5x + 6 = 0
Fixed coefficients: a = 1, b = -5, c = 6. The leading coefficient a is nonzero in every example. Each equation is quadratic, and division by a is reversible over the real numbers.
Discriminant: D = 1; (−5)² − 4 × (1) × (6) = 1.
Since 4a² is positive, the sign of D determines whether the completed square has a positive, zero or negative right side.
Equivalent completed square: (x − 5/2)² = 1/4
Divide by a, move c/a to the right, and add (b/(2a))² to both sides. This gives (x + b/(2a))² = D/(4a²). These steps preserve the complete real solution set.
Complete real solution set: Two distinct real solutions · x = 2; x = 3
For D ≥ 0, the quadratic formula is x = (−b ± √D)/(2a). A negative a changes the sign of the denominator in both branches. Exact substitution checks each reported root; the completed square explains why the root list is complete.
Exact check in the original equation
Original equation: x² − 5x + 6 = 0. Chosen candidate for x: x = 2. 0 = 0. This candidate satisfies the original equation. Complete real solution set: Two distinct real solutions; x = 2; x = 3.
Exact check in the equivalent square equation: 1/4 = 1/4.
| Candidate x | Exact original left side | Required right side | Equality holds |
|---|---|---|---|
| −2 | 20 | 0 | No |
| −1/2 | 35/4 | 0 | No |
| 0 | 6 | 0 | No |
| 1 | 2 | 0 | No |
| 2 | 0 | 0 | Yes |
| 3 | 0 | 0 | Yes |
| −√2 | 8 + 5√2 | 0 | No |
| √2 | 8 − 5√2 | 0 | No |
Surd values retain the exact rational coefficient of √2. The equality check compares those coefficients symbolically, without replacing √2 by a decimal approximation.
The candidate table is a finite set of checks. The reversible completed-square argument and quadratic formula establish every real solution, including the repeated-root and no-real-solution cases.
Inspect degenerate cases and keep the chosen number domain
If a is zero after simplification, inspect bx + c = 0 instead. With b nonzero, the unique real solution is x = −c/b. With b = 0 and c = 0, every real x satisfies the equation; with b = 0 and c nonzero, no real x does. Do not divide by a coefficient before checking that it is nonzero.
No real roots means no solution in the real domain used here. Complex-number arithmetic extends the number domain in later lessons. Cubic equations and advanced function graphs also belong to later work; the exact algebraic methods here establish the quadratic real solution set without them.
Worked examples
Keep the zero root when factoring
Solve 2x² − 6x = 0 over the real numbers.
- Factor the complete expression:
2x(x − 3) = 0. - The factor 2 is nonzero. The zero-product rule gives
x = 0ORx − 3 = 0. - The roots are 0 and 3. Dividing by x would have lost 0.
- Original checks:
2 × 0² − 6 × 0 = 0and2 × 3² − 6 × 3 = 0.
The complete real root set consists of x = 0 and x = 3.
Normalise, complete and retain exact radicals
Solve 2x² − 4x − 2 = 0 by completing the square.
- Divide every term by the nonzero number 2:
x² − 2x − 1 = 0. - Add 1 to both sides, then add another 1 to both sides:
x² − 2x = 1, then(x − 1)² = 2. - The two alternatives are
x − 1 = √2andx − 1 = −√2, givingx = 1 ± √2. - For either root, write x = 1 + t with t² = 2. The original left side is
2(1 + t)² − 4(1 + t) − 2 = 2t² − 4 = 0.
The exact roots are 1 − √2 and 1 + √2; approximately −0.414 and 2.414.
Use signed coefficients and reduce the answers
Solve 3x² − 2x − 1 = 0 using the derived formula.
- Read a = 3, b = −2 and c = −1. The discriminant is
D = (−2)² − 4 × 3 × (−1) = 16. - Use the principal root √16 = 4:
x = (2 ± 4)/6. - The two branches give x = 1 and x = −1/3.
- Original checks:
3 × 1² − 2 × 1 − 1 = 0and3 × (−1/3)² − 2 × (−1/3) − 1 = 1/3 + 2/3 − 1 = 0.
The two distinct real roots are 1 and −1/3.
Try it yourself
Solve
(x − 1)(x + 2) = 0. Why would the same factor conclusions fail if the right side were 3?Show the answer and reasoning
For the zero right side, x = 1 or x = −2. Neither value solves the equation with right side 3.
A zero product requires at least one factor to be zero. Substituting either candidate gives product 0. The zero-product rule cannot replace an equation whose product is 3.
Solve
x² = 9,x² = 0andx² = −9over the real numbers. Why is√(x²) = xunsafe?Show the answer and reasoning
Respectively: x = 3 or −3; only x = 0; no real root. The correct identity is
√(x²) = |x|.A positive target has two opposite square roots as equation solutions, zero has one, and a negative target has none over the reals. For x = −3, the principal square root of x² is 3, not −3.
Solve
x² − 4x = 5by completing the square and check both roots.Show the answer and reasoning
x = 5 or x = −1.
Add 4 to both sides:
(x − 2)² = 9. Hencex − 2 = ±3. The original checks are5² − 4 × 5 = 5and(−1)² − 4 × (−1) = 5.Solve
−2x² + 8x − 6 = 0. Explain why the negative leading coefficient can be divided out.Show the answer and reasoning
x = 1 or x = 3.
Divide the complete equality by the fixed nonzero number −2 to obtain
x² − 4x + 3 = 0. Factor to(x − 1)(x − 3) = 0. Equality is preserved by this reversible division; both roots make the original left side zero.Classify and solve
x² − 6x + 9 = 0,x² − 6x + 10 = 0andx² − 6x + 8 = 0over the real numbers.Show the answer and reasoning
Respectively: one distinct root 3; no real root; two distinct roots 2 and 4.
The discriminants are 0, −4 and 4. Completing the square gives
(x − 3)² = 0,(x − 3)² = −1and(x − 3)² = 1, respectively. A repeated root is counted once as a distinct value.Solve
2x² + 3x = 2x² + 6. Why must you not use the quadratic formula here?Show the answer and reasoning
The unique solution is x = 2; after simplification a = 0.
Subtract
2x²from both sides to obtain3x = 6. The squared terms cancel, leaving a linear equation. At x = 2 both original sides equal 14. A quadratic-formula denominator 2a would be zero.A rectangle has sides x m and (x + 1) m, both positive, and area 6 m². Find the permitted side lengths.
Show the answer and reasoning
x = 2: the sides are 2 m and 3 m.
The numerical equation is
x² + x − 6 = 0, with factors(x − 2)(x + 3). The real algebraic roots are 2 and −3, but −3 would give negative lengths. The permitted pair has area2 × 3 = 6square metres.
What to carry forward
- Identify the simplified coefficients first: a genuine quadratic has a ≠ 0.
- Use the zero-product rule only for a product equal to zero, and preserve a possible zero root instead of dividing by x.
- The principal square root is nonnegative; a square equation with a positive right side needs both ± alternatives, while zero and negative targets have different real-root cases.
- Complete the square with equal operations on both sides, normalising the leading coefficient first when needed.
- The discriminant gives the number of distinct real roots; keep exact radical or fractional results before approximating.
- Check every root in the original equation, then apply the context’s domain and units.
References
Sources for the concepts and teaching approaches in this article.
- Quadratic equations · Number and Algebra Module 34 (2011)Australian Mathematical Sciences Institute · TIMES ProjectTeaching resource
Lynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis · OpenStax, Rice University2 sources
- Elementary Algebra 2e · Solve Quadratic Equations by Completing the SquareLynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis · OpenStax, Rice UniversityTextbook chapter
- Elementary Algebra 2e · Solve Quadratic Equations Using the Quadratic FormulaLynn Marecek, MaryAnne Anthony-Smith and Andrea Honeycutt Mathis · OpenStax, Rice UniversityTextbook chapter
- Explanatory Notes to the Senior Secondary Mathematics Curriculum · Compulsory Part · Unit 1: Quadratic equations in one unknownMathematics Education Section · Curriculum Development Institute · Education Bureau, Hong KongTeaching resource · PDF