Sum and Product of Roots

Learning goals

  • Read r1+r2=−bar_1 + r_2 = -\tfrac{b}{a} and r1r2=car_1 r_2 = \tfrac{c}{a}
  • Derive them by expanding the factored form and matching
  • Build a quadratic from roots, up to a nonzero scalar
  • Reduce a symmetric function of the roots to sum and product
  • Link (r1−r2)2(r_1 - r_2)^2 to Δ\Delta as the real-root test
  • State the converse with the condition s2−4p≥0s^2 - 4p \ge 0

Running the chapter’s map backwards

You have three forms for the same quadratic, and each answers a question at sight. Standard form ax2+bx+cax^2 + bx + c hands you the yy-intercept cc and, through the sign of aa, the end behavior. Vertex form a(x−h)2+ka(x - h)^2 + k hands you the vertex, the axis, and the range. Factored form a(x−r1)(x−r2)a(x - r_1)(x - r_2) hands you the zeros r1r_1 and r2r_2. Every earlier lesson moved from standard form toward factored form. Now go backward. Multiply the factored form out and see what the coefficients have to be.

Try it on a quadratic whose roots you can already see, (x−2)(x−3)(x - 2)(x - 3). Multiplying it out gives

(x−2)(x−3)=x2−5x+6.(x - 2)(x - 3) = x^2 - 5x + 6.

The roots 22 and 33 add to 55, and the middle coefficient is −5-5, its negative. The roots multiply to 66, and that is exactly the constant term. That is not a coincidence of this one example. The same pattern holds for every quadratic with real roots, and the proof below is just this multiplication done with letters instead of numbers.

Why r1+r2=−bar_1 + r_2 = -\dfrac{b}{a} and r1r2=car_1 r_2 = \dfrac{c}{a}#

Suppose the quadratic ax2+bx+cax^2 + bx + c with a≠0a \ne 0 has real roots r1r_1 and r2r_2. Because the roots are real, the quadratic factors over the real numbers, and it is aa times the product of the two factors those roots produce:

ax2+bx+c=a(x−r1)(x−r2).ax^2 + bx + c = a(x - r_1)(x - r_2).

The leading aa is there so the squared terms match, since (x−r1)(x−r2)(x - r_1)(x - r_2) on its own starts with a bare x2x^2. Expand the right side:

a(x−r1)(x−r2)=a(x2−(r1+r2)x+r1r2)=ax2−a(r1+r2)x+a r1r2.a(x - r_1)(x - r_2) = a\left(x^2 - (r_1 + r_2)x + r_1 r_2\right) = ax^2 - a(r_1 + r_2)x + a\,r_1 r_2.

Two polynomials are equal for every xx only when their coefficients agree one at a time. The x2x^2 terms already match. Line up the coefficient of xx and the constant term:

b=−a(r1+r2)andc=a r1r2.b = -a(r_1 + r_2) \qquad \text{and} \qquad c = a\,r_1 r_2.

Divide each equation by aa, which is legal because a≠0a \ne 0:

r1+r2=−baandr1r2=ca.r_1 + r_2 = -\frac{b}{a} \qquad \text{and} \qquad r_1 r_2 = \frac{c}{a}.

Notice the hypothesis the argument used: the factorization a(x−r1)(x−r2)a(x - r_1)(x - r_2) exists because the roots are real, that is, because the discriminant satisfies Δ=b2−4ac≥0\Delta = b^2 - 4ac \ge 0. When a=1a = 1 these collapse to r1+r2=−br_1 + r_2 = -b and r1r2=cr_1 r_2 = c. The minus sign lives on the sum alone, and it comes from the two −r1-r_1 and −r2-r_2 inside the factors.

The point worth repeating is what did not happen. Nowhere did you solve for r1r_1 or r2r_2. You matched coefficients, and the sum and product fell out of the letters. This is the reverse of every other lesson in the chapter, and it is why this lesson closes it.

Matching the factored form to standard formTwo aligned rows of a quadratic. The top row is the expanded factored form. The bottom row is standard form. Vertical dashed lines join the middle terms and the constant terms, and the two results are shown beneath.Expand the factored form, then match term by termax²− a(r₁ + r₂)x+ a r₁r₂ax²+ bx+ cr₁ + r₂ = −b⁄ar₁r₂ = c⁄a
Expanding the factored form and stacking it above standard form. Matching the middle coefficients gives the sum of the roots, and matching the constants gives the product, with no solving.

The matching argument above is complete on its own. There is also a second route to the same two totals, starting straight from the quadratic formula instead of from matching coefficients.

Worked example 1 Read the sum and product of the roots of 2x2−11x+52x^2 - 11x + 5 without solving

Read the coefficients: a=2a = 2, b=−11b = -11, c=5c = 5. This lesson’s formulas need real roots, so first check the discriminant:

Δ=b2−4ac=(−11)2−4(2)(5)=121−40=81≥0.\Delta = b^2 - 4ac = (-11)^2 - 4(2)(5) = 121 - 40 = 81 \ge 0.

Since Δ≥0\Delta \ge 0, apply the formulas directly:

r1+r2=−ba=−−112=112,r1r2=ca=52.r_1 + r_2 = -\frac{b}{a} = -\frac{-11}{2} = \frac{11}{2}, \qquad r_1 r_2 = \frac{c}{a} = \frac{5}{2}.

No solving was needed. As a check, this quadratic happens to factor as (2x−1)(x−5)(2x - 1)(x - 5), with roots 12\tfrac{1}{2} and 55, and indeed 12+5=112\tfrac{1}{2} + 5 = \tfrac{11}{2} while 12⋅5=52\tfrac{1}{2} \cdot 5 = \tfrac{5}{2}.

Check your understanding

5x2+12x−95x^2 + 12x - 9 has real roots. Without solving, find their sum and product.

Answer choices

Constructing a quadratic from its roots

The formulas run just as well in reverse. Given the two roots, you can write a quadratic without expanding anything, because a monic quadratic (one whose leading coefficient is 11) with roots r1r_1 and r2r_2 is exactly

x2−(r1+r2)x+r1r2.x^2 - (r_1 + r_2)x + r_1 r_2.

The coefficient of xx is the negative of the sum, and the constant is the product with its own sign. There is a caveat that matters. Scaling by any nonzero number leaves the roots untouched, since a(x−r1)(x−r2)a(x - r_1)(x - r_2) is zero at exactly r1r_1 and r2r_2 for every a≠0a \ne 0. So the roots fix the factors and the zeros, but not the leading coefficient aa, which is free to be anything nonzero. The whole family a(x−r1)(x−r2)a(x - r_1)(x - r_2) shares those roots, even though changing aa changes the parabola itself, its width and, if aa turns negative, which way it opens. You get a single quadratic only by fixing the leading coefficient. Choosing a=1a = 1 gives the monic one above; that is the standard choice, but it is a choice.

Worked example 2 Build a quadratic with roots 32\tfrac{3}{2} and −4-4 and integer coefficients

Start with the sum and product of the two roots:

r1+r2=32+(−4)=−52,r1r2=32⋅(−4)=−6.r_1 + r_2 = \tfrac{3}{2} + (-4) = -\tfrac{5}{2}, \qquad r_1 r_2 = \tfrac{3}{2} \cdot (-4) = -6.

Drop these into the monic template x2−(r1+r2)x+r1r2x^2 - (r_1 + r_2)x + r_1 r_2, watching that the middle coefficient is the negative of the sum:

x2−(−52)x+(−6)=x2+52x−6.x^2 - \left(-\tfrac{5}{2}\right)x + (-6) = x^2 + \tfrac{5}{2}x - 6.

That is a correct answer. To clear the fraction, multiply every term by 22, which scales the quadratic without moving its roots:

2(x2+52x−6)=2x2+5x−12.2\left(x^2 + \tfrac{5}{2}x - 6\right) = 2x^2 + 5x - 12.

Both x2+52x−6x^2 + \tfrac{5}{2}x - 6 and 2x2+5x−122x^2 + 5x - 12 have roots 32\tfrac{3}{2} and −4-4; they are the same quadratic up to the scalar 22. Factoring the integer version back to (2x−3)(x+4)(2x - 3)(x + 4) confirms the roots.

Finding the other root

When one root is handed to you, the sum or the product recovers the other one in a single step, with no factoring. Both totals work, and using both is a free check.

Worked example 3 One root of 3x2−14x+8=03x^2 - 14x + 8 = 0 is 44. Find the other root.

The roots add to −ba=143-\frac{b}{a} = \frac{14}{3} and multiply to ca=83\frac{c}{a} = \frac{8}{3}. Call the known root r1=4r_1 = 4 and use the sum to peel off the other:

r2=(r1+r2)−r1=143−4=14−123=23.r_2 = (r_1 + r_2) - r_1 = \frac{14}{3} - 4 = \frac{14 - 12}{3} = \frac{2}{3}.

The product confirms it, since the roots multiply to 83\tfrac{8}{3} and 83÷4=23\tfrac{8}{3} \div 4 = \tfrac{2}{3}. The other root is 23\tfrac{2}{3}.

Check your understanding

Which monic quadratic has roots 66 and −1-1?

Answer choices

Symmetric functions of the roots

Here is where the method earns its keep. Many quantities built from both roots can be rewritten using only the sum and the product, so you can evaluate them without ever finding a single root. The key identity comes from expanding a square:

(r1+r2)2=r12+2r1r2+r22  ⟹  r12+r22=(r1+r2)2−2r1r2.(r_1 + r_2)^2 = r_1^2 + 2 r_1 r_2 + r_2^2 \implies r_1^2 + r_2^2 = (r_1 + r_2)^2 - 2 r_1 r_2.

The sum of the squares is the square of the sum minus twice the product. Two more follow the same way. The sum of the reciprocals needs c≠0c \ne 0 so that neither root is zero:

1r1+1r2=r2+r1r1r2=r1+r2r1r2.\frac{1}{r_1} + \frac{1}{r_2} = \frac{r_2 + r_1}{r_1 r_2} = \frac{r_1 + r_2}{r_1 r_2}.

And the squared difference of the roots, which will pay off in a moment:

(r1−r2)2=(r1+r2)2−4r1r2.(r_1 - r_2)^2 = (r_1 + r_2)^2 - 4 r_1 r_2.

Worked example 4 For the roots of x2−6x+4x^2 - 6x + 4, evaluate r12+r22r_1^2 + r_2^2, 1r1+1r2\tfrac{1}{r_1} + \tfrac{1}{r_2}, and (r1−r2)2(r_1 - r_2)^2

This quadratic is monic, so r1+r2=−(−6)=6r_1 + r_2 = -(-6) = 6 and r1r2=4r_1 r_2 = 4. Its discriminant is Δ=36−16=20≥0\Delta = 36 - 16 = 20 \ge 0, so the roots are real (they are the irrational numbers 3±53 \pm \sqrt{5}, though you will never need to write that). Feed the two totals into each identity:

r12+r22=(r1+r2)2−2r1r2=62−2(4)=36−8=28.r_1^2 + r_2^2 = (r_1 + r_2)^2 - 2 r_1 r_2 = 6^2 - 2(4) = 36 - 8 = 28.1r1+1r2=r1+r2r1r2=64=32.\frac{1}{r_1} + \frac{1}{r_2} = \frac{r_1 + r_2}{r_1 r_2} = \frac{6}{4} = \frac{3}{2}.(r1−r2)2=(r1+r2)2−4r1r2=36−16=20.(r_1 - r_2)^2 = (r_1 + r_2)^2 - 4 r_1 r_2 = 36 - 16 = 20.

Every answer is a clean rational number even though the roots are irrational. That is the power of working with symmetric combinations: the messy parts of the roots cancel.

Look again at that last line. For a monic quadratic, (r1−r2)2=(r1+r2)2−4r1r2=20(r_1 - r_2)^2 = (r_1 + r_2)^2 - 4 r_1 r_2 = 20, which is exactly the discriminant Δ=20\Delta = 20. That is no accident. In general,

(r1−r2)2=(r1+r2)2−4r1r2=(−ba)2−4⋅ca=b2a2−4ca=b2−4aca2=Δa2.(r_1 - r_2)^2 = (r_1 + r_2)^2 - 4 r_1 r_2 = \left(-\frac{b}{a}\right)^2 - 4 \cdot \frac{c}{a} = \frac{b^2}{a^2} - \frac{4c}{a} = \frac{b^2 - 4ac}{a^2} = \frac{\Delta}{a^2}.

This ties the discriminant from the previous lesson back to the roots themselves, and it explains why Δ≥0\Delta \ge 0 is precisely the condition for real roots. One direction is right here: for real r1r_1 and r2r_2, the quantity (r1−r2)2(r_1 - r_2)^2 is a real square, so it cannot be negative, which forces Δ=a2(r1−r2)2≥0\Delta = a^2 (r_1 - r_2)^2 \ge 0. The other direction is the quadratic formula from the previous lesson: when Δ≥0\Delta \ge 0, Δ\sqrt{\Delta} is a real number, so −b±Δ2a\frac{-b \pm \sqrt{\Delta}}{2a} names two real roots. The two roots are real exactly when the quantity a2(r1−r2)2a^2 (r_1 - r_2)^2, which is what Δ\Delta turns out to be, is not negative. Geometrically, the two roots sit symmetrically about the axis of symmetry x=−b2ax = -\frac{b}{2a}, and the gap between them is Δ/∣a∣\sqrt{\Delta}/|a|: for a fixed leading coefficient aa, a larger discriminant means roots that sit farther apart.

The two roots straddle the axis of symmetryA horizontal number line with two root marks placed symmetrically about a central dashed axis. The midpoint is the axis of symmetry at x equals negative b over 2a, and the labeled gap between the roots is the square root of the discriminant divided by the absolute value of a.axis of symmetryx = −b⁄2ar₂r₁r₁ − r₂ = √Δ ⁄ |a|
The two roots sit symmetrically about the axis of symmetry at x equals negative b over 2a. Their sum fixes the midpoint, and the discriminant fixes how far apart they spread.

Check your understanding

For 2x2−4x−32x^2 - 4x - 3, are the roots real, and if so what is (r1−r2)2(r_1 - r_2)^2?

Answer choices

Check your understanding

The roots of x2−8x+2x^2 - 8x + 2 are real. Find r12+r22r_1^2 + r_2^2 without solving.

Answer choices

The converse, stated honestly

The forward story says: real roots give a sum −ba-\frac{b}{a} and a product ca\frac{c}{a}. The natural question is the converse. If someone hands you a target sum ss and product pp, are there real numbers with that sum and product? Not always, and the exact condition is worth stating with its hypothesis attached, because the careless version is false.

Real numbers with sum ss and product pp exist if and only if s2−4p≥0s^2 - 4p \ge 0#

Let ss and pp be real numbers. We prove both directions.

First suppose real numbers r1r_1 and r2r_2 have sum ss and product pp. Then, by the squared-difference identity,

(r1−r2)2=(r1+r2)2−4r1r2=s2−4p.(r_1 - r_2)^2 = (r_1 + r_2)^2 - 4 r_1 r_2 = s^2 - 4p.

The left side is the square of a real number, so it cannot be negative, which gives s2−4p≥0s^2 - 4p \ge 0.

Now the other direction. Suppose s2−4p≥0s^2 - 4p \ge 0, and consider the monic quadratic x2−sx+px^2 - sx + p. Its discriminant is (−s)2−4(1)(p)=s2−4p≥0(-s)^2 - 4(1)(p) = s^2 - 4p \ge 0, so it has real roots

r1,r2=s±s2−4p2.r_1, r_2 = \frac{s \pm \sqrt{s^2 - 4p}}{2}.

By the sum and product formulas applied to this monic quadratic, r1+r2=sr_1 + r_2 = s and r1r2=pr_1 r_2 = p. So two real numbers with the required sum and product exist, and they are the roots of x2−sx+px^2 - sx + p.

The hypothesis s2−4p≥0s^2 - 4p \ge 0 is the whole point, and it is exactly what the following slogan drops. That slogan is tempting but wrong: “pick any real numbers ss and pp, and x2−sx+px^2 - sx + p has two real numbers with that sum and product.” Real numbers with sum 55 and product 44 exist, since 52−4(4)=9≥05^2 - 4(4) = 9 \ge 0; they are 11 and 44. But no real numbers have sum 55 and product 77, because 52−4(7)=−3<05^2 - 4(7) = -3 < 0. Writing down x2−5x+7x^2 - 5x + 7 does not conjure them into existence.

Worked example 5 Do two real numbers have sum 66 and product 1010? Sum 66 and product 88?

Test each pair with the condition s2−4p≥0s^2 - 4p \ge 0. For sum 66 and product 1010:

s2−4p=62−4(10)=36−40=−4<0.s^2 - 4p = 6^2 - 4(10) = 36 - 40 = -4 < 0.

The condition fails, so no real numbers add to 66 and multiply to 1010. For sum 66 and product 88:

s2−4p=62−4(8)=36−32=4≥0.s^2 - 4p = 6^2 - 4(8) = 36 - 32 = 4 \ge 0.

The condition holds, so such numbers exist. They are the roots of x2−6x+8=(x−2)(x−4)x^2 - 6x + 8 = (x - 2)(x - 4), namely 22 and 44, which indeed sum to 66 and multiply to 88.

Check your understanding

Do two real numbers exist with sum s=4s = 4 and product p=5p = 5?

Answer choices

Checking a solution without solving again

The same two totals verify an answer you found by another method, which is a fast and independent check. Suppose you solved 2x2−7x+3=02x^2 - 7x + 3 = 0 and claim the roots are 33 and 12\tfrac{1}{2}. The roots must sum to −ba=72-\frac{b}{a} = \frac{7}{2} and multiply to ca=32\frac{c}{a} = \frac{3}{2}. Your pair gives 3+12=723 + \tfrac{1}{2} = \tfrac{7}{2} and 3⋅12=323 \cdot \tfrac{1}{2} = \tfrac{3}{2}, matching both totals, so the solution is confirmed. A pair that matches only the sum, or only the product, is wrong; a correct pair passes both tests at once.

Closing the chapter

This lesson took the last step in the chapter’s map: expanding factored form back into standard form, and lining the two up. Here is what that step found. Standard form was quietly carrying the sum and product of its roots the whole time, folded into −ba-\frac{b}{a} and ca\frac{c}{a}, even though the roots are invisible in it.

One honest boundary remains. Every derivation here assumed the roots were real, so that the factorization a(x−r1)(x−r2)a(x - r_1)(x - r_2) used real numbers. These identities actually survive into the next chapter, where even a negative discriminant has roots and the same sum −ba-\frac{b}{a} and product ca\frac{c}{a} still hold. That is the story of complex numbers, and it begins the chapter after this one.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

A second derivation, straight from the formula

The main lesson gets r1+r2=−bar_1 + r_2 = -\dfrac{b}{a} and r1r2=car_1 r_2 = \dfrac{c}{a} by matching coefficients. Here is a second route to the same two totals, starting from the quadratic formula instead. The quadratic formula names the two roots outright:

r1=−b+Δ2a,r2=−b−Δ2a,Δ=b2−4ac.r_1 = \frac{-b + \sqrt{\Delta}}{2a}, \qquad r_2 = \frac{-b - \sqrt{\Delta}}{2a}, \qquad \Delta = b^2 - 4ac.

Add them and multiply them directly, and the same two totals appear.

Confirming the sum and product from the quadratic formula#

Take Δ≥0\Delta \ge 0, so Δ\sqrt{\Delta} is a real number and both roots are real. Adding the two roots, the +Δ+\sqrt{\Delta} and −Δ-\sqrt{\Delta} cancel exactly:

r1+r2=(−b+Δ)+(−b−Δ)2a=−2b2a=−ba.r_1 + r_2 = \frac{(-b + \sqrt{\Delta}) + (-b - \sqrt{\Delta})}{2a} = \frac{-2b}{2a} = -\frac{b}{a}.

Multiplying them, the numerator is a difference of squares, (−b)2−(Δ)2(-b)^2 - (\sqrt{\Delta})^2:

r1r2=(−b+Δ)(−b−Δ)4a2=b2−Δ4a2.r_1 r_2 = \frac{(-b + \sqrt{\Delta})(-b - \sqrt{\Delta})}{4a^2} = \frac{b^2 - \Delta}{4a^2}.

Now b2−Δ=b2−(b2−4ac)=4acb^2 - \Delta = b^2 - (b^2 - 4ac) = 4ac, so the product simplifies to

r1r2=4ac4a2=ca.r_1 r_2 = \frac{4ac}{4a^2} = \frac{c}{a}.

Both totals agree with the matching argument. The cancellation of Δ\sqrt{\Delta} in the sum, and the difference of squares in the product, are why these totals stay clean. Both cancellations survive even when the roots themselves are ugly irrational numbers.

A bit of history (optional)

A computer can get a quadratic wrong, and the formula is what betrays it.

Algebra is exact. Arithmetic on a machine is not, because every number is held to a fixed count of digits. Take an equation in which b2b^2 is enormously larger than 4ac4ac. The square root of the discriminant is then almost exactly the size of bb. So one of the two roots is computed by subtracting two numbers that agree in nearly every digit. Almost everything cancels, and what survives is mostly rounding error. The answer can come back wrong in the first decimal place.

In 1966 the American computer scientist George Forsythe published a short report. It asked how a machine ought to solve a quadratic equation. His answer was not the formula on its own. Take the root whose two terms carry the same sign, so that nothing cancels. Then obtain the second root from the product, dividing ca\frac{c}{a} by the root you already hold.

That is this lesson’s identity doing a job no exercise asks of it. You proved that the roots multiply to ca\frac{c}{a}. You used that above to check an answer you had found some other way. It is also a way to find one, and careful numerical software has leaned on it ever since.