Checking quadratic roots by substitution and factorization
A quadratic solver gives you two numbers. Substituting each one back into the polynomial shows whether they really are roots.
Why a solver output deserves a second look
A quadratic equation ax² + bx + c = 0 is solved by a formula, and any formula can be misread, mistyped or applied to the wrong signs. The most common slip is entering b with the wrong sign, since the formula uses -b. Substitution catches that slip at once, because a wrong root does not make the polynomial equal zero. The check also works without trusting the solver at all: it uses only multiplication, addition and subtraction on the original coefficients. For x² - 5x + 6 = 0, the quadratic equation calculator returns a discriminant of 1 and roots 2 and 3, and the rest of this page shows how to confirm those two numbers by hand.
Checking the root x = 2
Put x = 2 into x² - 5x + 6. The three terms are 2² = 4, then -5 × 2 = -10, then +6. The first two terms combine to 4 - 10 = -6, which the basic calculator confirms in the second case, and adding the constant 6 gives 0. A result of zero means that 2 satisfies the equation. Notice how the check is organized: the variable terms are summed first, and the constant is added last. That order makes it easy to see that the constant 6 cancels the combined variable terms exactly, which is what any root of this polynomial must achieve.
Checking the root x = 3
Repeat the substitution with x = 3. The terms are 3² = 9, then -5 × 3 = -15, then +6. The variable terms combine to 9 - 15 = -6, the same value as before, and adding 6 gives 0. Seeing -6 appear twice is not a coincidence. The sum of the variable terms must equal minus c at every root, so both roots produce the same partial result. If the two partial sums differed, one of the candidates would be wrong. Zero at both candidates proves that each is a root. Because a quadratic has at most two roots, nothing else needs checking.
Confirming with the factored form
Roots can also be tested by rebuilding the polynomial from them. If r1 and r2 are roots and the leading coefficient is a, then a(x - r1)(x - r2) must expand back to the original. Here (x - 2)(x - 3) = x² - 3x - 2x + 6 = x² - 5x + 6. The middle coefficient is minus the sum of the roots, -(2 + 3) = -5, and the constant is the product of the roots, 2 × 3 = 6. These sum and product relations, usually credited to Viete, give a second independent check that needs no substitution. They also give a quick sanity test on any solver output before you carry it into later work.
How the solver computes its candidates
The page's tool computes the discriminant D = b² - 4ac, then x1 = (-b - sqrt(D)) / (2a) and x2 = (-b + sqrt(D)) / (2a). With a = 1, b = -5 and c = 6, D = 25 - 24 = 1, so the square root is 1. Then x1 = (5 - 1) / 2 = 2 and x2 = (5 + 1) / 2 = 3. Because D is a perfect square here, both roots are whole numbers and the substitution check is exact. When D is not a perfect square, the roots are irrational and a decimal display is rounded, so substituting the displayed value leaves a tiny remainder instead of exactly zero.
Reading the discriminant before trusting roots
The discriminant sorts the cases. A positive D gives two distinct real roots, as in this example. D = 0 gives one repeated root, which can appear in both output fields, and the substitution check then confirms the same number twice. A negative D means the parabola never crosses the x-axis, and no real number makes the polynomial zero. The tool is a real-number solver, so it does not report complex roots, and a missing real answer must not be read as proof that no solutions exist anywhere. Complex roots exist for negative D, and they come as a conjugate pair.
Inputs that break the quadratic assumption
If a is zero, the term in x² disappears and the equation is linear, with the single solution x = -c / b when b is not zero. The quadratic formula divides by 2a, so it cannot be applied at a = 0, and the equation needs the linear treatment instead. Another frequent trap is a polynomial that is not yet in standard form. An equation such as x² = 5x - 6 must first be rearranged to x² - 5x + 6 = 0 before the coefficients are read off, with the sign of every moved term flipped. Typing the coefficients of the unrearranged form produces valid-looking roots of the wrong equation.
When the check passes and when it cannot
A zero result at both candidates settles the question for this equation, since a polynomial of degree two has no other roots. If only one candidate gives zero, the solver output or your copy of the coefficients has an error, and the sum and product relations tell you which root is likely at fault. The check does not test whether the equation itself models your problem correctly, and it does not tell you which root is physically meaningful. In a projectile problem, for instance, one root may be a negative time that has to be discarded. For decimal roots, expect small rounding remainders and judge them against the precision of the display. The arithmetic here uses small integers, so each substitution is exact. With a decimal root such as 1.4142 for x² - 2, the substitution gives 1.99996 - 2, a remainder near -0.00004, and that remainder shrinks as more digits of the root are kept. A remainder of that size reflects rounding of the root, not a wrong answer.
A second polynomial with a different outcome
Try x² - 4x + 4. The discriminant is 16 - 16 = 0, so both output fields show the root 2. Substituting gives 4 - 8 + 4 = 0, and the factored form is (x - 2)², a square, which explains why the root repeats. Now try x² + 2x + 5. The discriminant is 4 - 20 = -16, which is negative, so the real-number solver has no real roots to display. Substitution cannot succeed with any real number there, because x² + 2x + 5 = (x + 1)² + 4 is at least 4 for every real x. Completing the square, as in that rewrite, is another way to see the sign of the discriminant directly from the polynomial. Running both examples through the solver and then through substitution is a good habit before relying on a result in later work.
Reproduce the checks
Solve the polynomial
Open the Quadratic Equation Calculator and enter:
- Coefficient a
1- Coefficient b
-5- Coefficient c
6
Expected output:
Discriminant
1Root using minus sign
2Root using plus sign
3The two candidates are distinct real roots.
First root variable terms
Open the Basic calculator and enter:
- First number
4- Operation
subtract- Second number
10
Expected output:
Result
-6Adding the constant six gives zero.
Second root variable terms
Open the Basic calculator and enter:
- First number
9- Operation
subtract- Second number
15
Expected output:
Result
-6Adding the same constant also gives zero.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- OpenStax ↗ · 2026-10-08