The Quadratic Formula and the Discriminant
Learning goals
- Prove the formula by completing the square on the general case
- Split it into the axis plus a symmetric offset
- Read and the vertex height
- State three biconditionals linking to the real roots
- Test rational factorization by whether is a perfect square
- Choose factoring, completing the square, or the formula by the equation
From completing the square to a formula
Everything rests on one derivation, so watch every step. We start from the general quadratic equation and complete the square on it exactly as the previous lesson taught, the only difference being that the coefficients are letters.
The quadratic formula, derived by completing the square#
Begin with , where so the equation is genuinely quadratic.
Divide through by , which is legal precisely because , to make the leading coefficient :
Move the constant to the right, then complete the square on the left. Half of the coefficient is , and its square is , so add that to both sides:
The left side is now a perfect square by construction. Combine the right side over the common denominator , writing :
This one line already holds the whole story, but push on to the formula. Take square roots of both sides. The previous lesson fixed the rule: names the non-negative root, so undoing a square needs a to recover both possibilities. Here , and the already in front of the radical supplies both signs regardless of the sign of . So dividing by or by merely trades which sign is which, so we may write the root over :
Finally subtract and collect the two terms over their shared denominator:
That is the quadratic formula. One warning is already visible in the line before it: the step “take square roots” needs , because a real square root of a negative number does not exist. If , the squared quantity on the left would have to equal a negative number, which no real square ever does, so the equation has no real solution at all. Hold that thought; it becomes the whole next half of the lesson.
The formula deserves its fame because of what the derivation just proved about it. It is not a lucky pattern that happens to work on the examples in a textbook. It is the exact output of an algorithm that provably solves every quadratic, so the formula inherits that guarantee. This is what a theorem is: a result proved once, in general, and then owned outright. You never have to complete the square on a specific quadratic again, because you already did it on all of them at once.
The roots straddle the axis of symmetry
Read the formula slowly, because it is telling you something the first lesson of this chapter promised. Split it into its two pieces:
The first piece, , is exactly the axis of symmetry that Quadratic Functions and Parabolas dug out of using symmetry alone. The second piece is a single signed offset added on one side and subtracted on the other. So the formula says the two roots sit the same distance to either side of the line , one to its left and one to its right. That common distance is the magnitude . The roots are a mirror pair about the axis, the same fact the parabola showed you before any algebra. The two -intercepts are reflections of each other, so their midpoint lands on the axis. The graph knew where the roots were, up to that one offset, and the formula supplies it as .
This also explains, with no extra work, why the roots average to . Add the two values from the formula and the pieces cancel:
so their average is , the axis, precisely as symmetry demanded.
Worked example 1 A quadratic that does not factor nicely
Solve .
Try factoring first, honestly. You want two integers with product and sum ; the only integer pairs multiplying to are and , summing to and , never . The integer search fails, so reach for the formula. Here , , :
Simplify the radical: , so
The two roots are and . Notice they straddle , which is the axis , each a distance away. The integer search never had a chance, because the answers are irrational, but the formula found them without breaking stride.
Check your understanding
Solve with the quadratic formula.
With , , , the discriminant is .
The simplification and the shared factor of in the numerator and denominator are what turn the raw output into .
The discriminant fixes the vertex
The quantity under the square root did all the deciding in the derivation, so it earns a name. The discriminant of is
The Greek letter (capital delta) is standard for it. Everything interesting about the number of real roots is packed into the sign of , and the reason is not a coincidence of algebra. The discriminant is, up to a fixed factor, the height of the vertex.
The vertex height is #
The first lesson of this chapter located the vertex of at . Evaluate there to find its height:
Put the first two terms over , using , and combine everything over :
So the -coordinate of the vertex is exactly .
This little identity turns the sign of into a statement about the picture. Take a parabola that opens upward, so . Then has the opposite sign to : when the vertex sits below the -axis, so the upward arms must cross the axis twice. When the vertex sits on the axis, so the parabola just touches it. When the vertex sits above the axis, so the whole upward parabola floats clear of it and never meets it. For a parabola that opens downward, , every “above” and “below” swaps, but the conclusion about meeting the axis is identical. The reason is that a downward parabola with its vertex above the axis still crosses twice. The sign of the discriminant is the algebra of where the vertex sits relative to the -axis.
Three signs, three outcomes, proved both ways
The picture makes the three cases believable. The completed-square line from the derivation makes them certain, and it makes them biconditionals: each root count happens exactly when its sign of holds, converse included. This is the most careful passage in the lesson, so read the logic, not just the conclusions.
The discriminant counts the real roots#
Return to the line the derivation reached before any square roots:
The denominator is positive, since , so the right side has the same sign as . A real number solves the equation exactly when the left side, a real square, can equal the right side. Three cases, and they are exhaustive and mutually exclusive because every real number is positive, zero, or negative and nothing else.
If , the right side is a positive number, and a positive number has two distinct real square roots, so gives two distinct values of . Two distinct real roots.
If , the right side is , so the equation is , which holds only for , and holds there. Exactly one real root, the double root sitting on the axis, where the parabola is tangent to the -axis.
If , the right side is negative, but the left side is a square and no real square is negative, so no real works. No real roots.
Now the converse comes for free, and this is the point people skip. The three hypotheses on partition every possibility, and the three conclusions (two roots, one root, no roots) are mutually exclusive outcomes. When a full partition of the input matches one-to-one with mutually exclusive outputs, the matching automatically runs backward as well. Two distinct real roots can therefore only have come from , since the other two signs produce exactly one root or none. Similarly one real root can only have come from , and no real roots only from , by the same elimination. So each statement is an “if and only if”, not just an “if”.
Say the three biconditionals out loud in their full form, because their exactness is what makes them usable. That same exactness is also what makes them easy to overclaim in a moment.
- if and only if there are two distinct real roots (the parabola crosses the axis twice).
- if and only if there is exactly one real root, a double root (the parabola is tangent to the axis).
- if and only if there are no real roots (the parabola does not meet the axis).
These hold for every real , , , with no hypothesis about the coefficients being whole or rational. The number of real roots is a question the discriminant answers completely. In Chapter 5 the number system itself is enlarged so that the case, too, acquires roots; for now, “no real roots” is the full and honest answer.
Worked example 2 Counting roots without solving
For each equation, use only the discriminant to say how many real solutions it has.
For : here , , , so
which means two distinct real roots.
For : , so exactly one real root. Indeed the left side is , with the double root .
For : , so no real roots. This is the very quadratic the factoring lesson proved is positive for every real . The discriminant now certifies the same fact in one subtraction, and the parabola floats entirely above the axis.
Check your understanding
How many real solutions does have?
Read off , , and compute the discriminant.
A negative discriminant means the parabola never meets the -axis, so there are no real solutions. The discriminant settles the count with complete certainty, so the last option is wrong.
When a quadratic factors, and over what
The factoring lesson left a question open on purpose. It showed that has real zeros yet refuses to factor over the rationals, and it warned that “factors” is meaningless until you name the number system. The discriminant closes that question, but only if you keep two claims apart, because they are genuinely different and blurring them is the classic error at this exact spot.
The first claim is a real test with a real hypothesis.
The perfect-square test (for rational coefficients only)#
Let have rational coefficients (integers are the common case), with . The roots are , and since and are rational, these roots are rational exactly when is rational. A factoring lesson result says a quadratic with rational coefficients factors over the rationals exactly when it has a rational root. Chaining the two,
For integer coefficients is an integer, and is rational exactly when is a perfect square (a non-square integer has an irrational square root). So a quadratic with integer coefficients factors over the rationals if and only if its discriminant is a perfect square.
The hypothesis is not decoration. The test speaks only about quadratics whose coefficients are rational, and it says nothing about a quadratic with irrational coefficients. State it with its hypothesis attached every single time.
The second claim is the trap, and it is false: a non-negative discriminant does not mean a quadratic “factors nicely.” Having real roots and factoring over the rationals are different properties. A quadratic with has two real zeros, and each real zero buys a real factor. So such a quadratic always factors over the reals, but it factors over the rationals only when that is a perfect square on top of being positive. The next example holds the two apart.
Worked example 3 Perfect square, so it factors over the rationals
Solve , and connect the answer to factoring.
Compute the discriminant: , , , so
The discriminant is a perfect square and the coefficients are integers, so the test predicts rational roots and a rational factorization before we even finish. The formula confirms it:
Both roots are rational, so the quadratic factors over the rationals. Cashing each root in for a factor, . A perfect square discriminant was the early warning that the integer search of the factoring lesson would have succeeded here.
Worked example 4 Real roots, yet no rational factorization
Does factor over the rationals? Does ?
For , the coefficients are integers, so run the test:
Now is positive, so there are two distinct real roots, but is not a perfect square, so is irrational and the roots are irrational. The quadratic does not factor over the rationals, even though it factors over the reals as . Real roots did not buy a rational factorization.
Change the constant by one, to , and the story flips:
a perfect square, so this one does factor over the rationals, as . The two quadratics look almost identical, both have two real roots, and only the discriminant tells you which one an integer factoring search can crack. This is the honest retirement of the factoring lesson’s open question: “factors” always needs a number system named, and the discriminant is what names it.
Check your understanding
The equation has integer coefficients and discriminant . What does that tell you?
The discriminant is , a perfect square, and the coefficients are integers, so the perfect-square test applies.
Both roots are rational, so it factors over the rationals as . A perfect-square discriminant with integer coefficients is exactly the condition for a rational factorization.
Designing with the discriminant, and choosing a method
Because controls the root count, you can run the logic backwards: fix the number of roots you want and solve for the coefficient that delivers it. The condition in particular is the exact knife edge between two roots and none. So problems that ask for “exactly one solution” or a graph “tangent to the axis” are really asking you to set the discriminant to zero.
Worked example 5 Forcing a single root
For which values of does have exactly one real solution?
Exactly one real solution is the case . With , , ,
Set it to zero: , so and . Both work, and they are geometrically the two ways to slide the parabola until its vertex just kisses the axis. At the equation is with double root ; at it is with double root . A single condition on the discriminant pinned down both designs.
The formula always works, which tempts you to reach for it every time, but “always works” is not the same as “always fastest.” Match the method to the equation. If a quadratic factors on sight, like , factoring reads off the roots in seconds and the formula is slower busy work. If the equation is already a square or a shift away from one, completing the square is direct. Reach for the formula when factoring fails or would take longer than it is worth, which is exactly when the roots are irrational or the coefficients are awkward. A quick glance at the discriminant tells you which world you are in before you commit. With integer or rational coefficients, a perfect-square discriminant means the quadratic factors over the rationals, so a factoring search will succeed. With those same coefficients, any other value means factoring over the rationals is hopeless, and the formula is your reliable route.
One caution belongs with any formula that produces radicals. The quadratic formula is a statement about exact arithmetic. The value is an exact root of ; the decimal is only an approximation. Rounding too early can quietly corrupt an answer, especially when the formula subtracts two nearly equal numbers. Keep radicals in exact form as long as you can, and round only at the very end if a decimal is what the problem wants.