Sub topic 2
What It Means to Solve a Quadratic
Prerequisites
This chapter assumes you can solve linear equations, expand and factor simple polynomials, simplify square roots, and read points on a coordinate graph. The previous chapter covered writing a quadratic in standard form, ax² + bx + c = 0 with a ≠ 0. Here we look at what a solution is, how to confirm one, and how many solutions to expect.
A solution is a value that makes the equation true
To solve a quadratic equation means to find every value of x that makes the equation true. Each such value is called a root of the equation. The words "root", "solution" and "zero" are used interchangeably in this tutorial. The term "zero" comes from the function view: x = r is a zero of f(x) = ax² + bx + c when f(r) = 0.
A value is a root only if substituting it into the equation gives a true statement. Take x² − 5x + 6 = 0.
- Try x = 2: 2² − 5(2) + 6 = 4 − 10 + 6 = 0. This is true, so 2 is a root.
- Try x = 3: 9 − 15 + 6 = 0. This is true, so 3 is a root.
- Try x = 1: 1 − 5 + 6 = 2. This is not 0, so 1 is not a root.
Substitution is the only test that matters. A method can fail or be misapplied, but a candidate that satisfies the equation is a root regardless of how you found it.
Why the equation must equal zero
Solving requires one side of the equation to be 0. Standard form gives you that. To see why, consider x² − 5x + 6 = 0, which can be factored as (x − 2)(x − 3) = 0.
A product of two numbers is zero only when at least one of them is zero. This is the zero product property. It lets you split one quadratic equation into two linear ones: x − 2 = 0 or x − 3 = 0.
Now compare an equation whose right side is not zero: (x − 2)(x − 3) = 6. Knowing a product equals 6 tells you almost nothing about the factors. Many pairs multiply to 6, such as 1 and 6, 2 and 3, or −1 and −6. So you cannot set each factor equal to a number. This is the most common reason students get wrong answers from factoring: they factor first and move terms second. Always rearrange to standard form before you factor or apply the quadratic formula.
How many roots can there be?
A quadratic has degree 2, so it has at most two roots over the real numbers. Over the complex numbers it has exactly two, counted with multiplicity. There are three situations:
| Situation | Example | Real roots |
|---|---|---|
| Two distinct real roots | x² − 5x + 6 = 0 | 2 and 3 |
| One repeated real root | x² − 6x + 9 = 0 | 3 (counted twice) |
| No real roots | x² + 1 = 0 | none (roots are ±i) |
The repeated case is worth a closer look. The equation x² − 6x + 9 = 0 factors as (x − 3)(x − 3) = 0, which is (x − 3)² = 0. The root x = 3 appears from both factors. We say it has multiplicity 2. It is one number, but it is a "double root".
The third case is not a failure to find an answer. The equation x² + 1 = 0 has solutions, but they are not real numbers. They are the complex numbers i and −i. A later chapter treats these. For now, remember that "no real roots" and "no roots" are different claims.
Roots and the graph
The graph of y = ax² + bx + c is a parabola. A root of the equation is a value of x where y = 0. So the real roots are the x-intercepts, the points where the parabola crosses or touches the x-axis.
This picture connects the algebra and the geometry. Solving the equation and finding where the curve meets the axis are the same task. Later chapters show how the discriminant predicts which of the three cases you are in before you solve anything.
Methods for solving, and their scope
Several methods exist. They differ in how widely they apply.
| Method | Works on | Limitation |
|---|---|---|
| Square root method | Equations like x² = k or (x − h)² = k | Needs no x term, or a perfect-square form |
| Factoring | Quadratics with integer or simple rational roots | Hard or impossible to find factors for many equations |
| Completing the square | Any quadratic | More steps by hand |
| Quadratic formula | Any quadratic | Requires careful arithmetic |
The last two always work. Factoring is fast when it works but gives no guarantee. Completing the square, covered in the next chapter, is the idea that produces the quadratic formula, so the formula is not a separate trick. It is the completing-the-square procedure done once for all coefficients.
The square root method
Some quadratics can be solved in one step. If the equation has the form x² = k, then x = ±√k when k ≥ 0. The ± sign is essential, because both a positive and a negative number square to k.
For example, 3x² − 48 = 0 becomes x² = 16, so x = 4 or x = −4. A frequent error is to write only x = 4. Check: (−4)² = 16 as well, so −4 is also a root.
The same idea works when a squared expression is isolated. For (x − 1)² = 9, take square roots: x − 1 = ±3, so x = 4 or x = −2.
Verifying roots by substitution in code
You can automate the substitution test. This function evaluates the quadratic at a candidate and reports whether it is a root, allowing a small tolerance because floating-point arithmetic is not exact.
import math
def is_root(a, b, c, x, tol=1e-9):
return abs(a * x * x + b * x + c) <= tol
# x^2 - 5x + 6 = 0
for candidate in [1, 2, 3]:
print(candidate, is_root(1, -5, 6, candidate))
# 2x^2 - 4x - 6 = 0 has roots -1 and 3
for candidate in [-1, 3, 0]:
print(candidate, is_root(2, -4, -6, candidate))
# A root such as sqrt(2) is irrational, so exact equality would fail
print(is_root(1, 0, -2, math.sqrt(2)))The output is 1 False, 2 True, 3 True, then -1 True, 3 True, 0 False, and finally True. The last line shows why a tolerance is needed. The value math.sqrt(2) is a rounded approximation, so its square is very close to 2 but may not equal 2 exactly. Comparing with == 0 would be unreliable.
Edge cases
- a = 0. The equation is no longer quadratic. It is linear, with at most one root, and the methods in this tutorial do not apply. Code should reject it or handle it separately.
- c = 0. Then x = 0 is always a root, since substituting gives 0. Factor out x: ax² + bx = x(ax + b) = 0, so the roots are 0 and −b/a.
- b = 0. The equation is ax² + c = 0, solved by the square root method: x = ±√(−c/a). The roots are real only when −c/a ≥ 0.
- Dividing by a variable. If you divide both sides of x² = 3x by x, you get x = 3 and lose the root x = 0. Instead move everything to one side, x² − 3x = 0, and factor: x(x − 3) = 0. Dividing by an expression containing x can silently discard roots.
- Equations not in standard form. An equation such as x(x + 2) = 15 looks factored but is not. Expand and rearrange to x² + 2x − 15 = 0, then solve: (x + 5)(x − 3) = 0, so x = −5 or x = 3.
Worked example
Solve 2x² = 8x − 6.
- Move all terms to one side so the other side is zero: 2x² − 8x + 6 = 0.
- Simplify by dividing by 2, which is allowed because 2 is a nonzero constant: x² − 4x + 3 = 0.
- Factor: (x − 1)(x − 3) = 0.
- Apply the zero product property: x = 1 or x = 3.
- Check in the original equation. For x = 1: left side 2(1) = 2, right side 8 − 6 = 2. For x = 3: left side 2(9) = 18, right side 24 − 6 = 18. Both hold.
Notice that the check uses the original equation, not the rearranged one. If you made a mistake while rearranging, checking against the rearranged form would hide it.
Common errors in this chapter
- Factoring when the right side is not zero.
- Dropping the negative root in x² = k.
- Dividing by x and losing the root x = 0.
- Declaring "no solution" when the roots exist but are complex.
- Forgetting that a repeated root is still a root.
Exercise
Solve x² = 5x by a method that does not lose any root, then verify each root by substitution. Explain why dividing both sides by x is a mistake.
Show answer
Move everything to one side: x² − 5x = 0. Factor: x(x − 5) = 0. By the zero product property, x = 0 or x = 5. Check x = 0: 0 = 0, true. Check x = 5: 25 = 25, true. Dividing both sides by x gives x = 5 and removes the root x = 0, because that division is not valid when x = 0.
Exercise
How many real roots does (x + 2)² = 0 have, and what is its multiplicity? Then say how many real roots (x + 2)² = −4 has and why.
Show answer
(x + 2)² = 0 gives x + 2 = 0, so x = −2. It is one real root with multiplicity 2, and the parabola touches the x-axis at x = −2. For (x + 2)² = −4, a real number squared is never negative, so there are no real roots. The roots are complex: x + 2 = ±2i, so x = −2 ± 2i.