Vieta’s formulas
Vieta’s formulas (also called Vieta’s relations) link the roots (that is, the solutions) of a quadratic equation to its coefficients, that is, to the numbers in front of x2 and x and the number without an x. You can read off the sum and product of the roots without having to solve the equation. For an equation whose leading coefficient (the coefficient of x2) is 1,
its roots x1 and x2 satisfy
For a general equation ax2 + bx + c = 0 (where a ≠ 0) we just divide everything by the coefficient a:
Solving in your head
Let’s try it on the equation
Here p = −5 and q = 6. So we are looking for two numbers with sum −p = 5 and product 6. The sum and the product are both positive, so both numbers are positive. We can split 6 into either 1 · 6 or 2 · 3, and only the second pair adds up to 5. The roots are x1 = 2 and x2 = 3, and we did not need the discriminant at all.
Watch the sign. The most common mistake is to look for numbers with sum −5 because the equation says “minus five”. But the sum of the roots is the negative of p. If you looked for a pair with sum −5 and product 6, you would arrive at −2 and −3, but those are the roots of a completely different equation, x2 + 5x + 6 = 0. Substitute −2 into the original equation: (−2)2 − 5 · (−2) + 6 = 20, which is not zero.
The graph reveals one more detail. A parabola is symmetrical, so its turning point lies exactly halfway between the roots, at
How did we get there?
If x1 and x2 are the roots of ax2 + bx + c = 0, its left-hand side can be written as a product:
Why? Both sides have the same a in front of x2, and both are zero for x = x1 and for x = x2. If you subtract one from the other, the x2 terms cancel and what is left is an expression of the form kx + l that is zero at two different points. That is only possible if it is zero everywhere, so the two sides are equal. Now we expand the brackets:
From the middle two terms we take out the common factor x and multiply a into the brackets:
Now we compare this with the left-hand side ax2 + bx + c. The equality holds for every x, so the coefficients of x must be equal, and so must the constant terms (the numbers without an x):
Divide both equalities by a and there you have Vieta’s formulas. For a = 1 we have b = p and c = q, which is the simpler version from the introduction.
You get the same result if you add and multiply the roots using the formula
What Vieta’s formulas are good for
Solving in your head works with negative roots too. Solve x2 + x − 12 = 0. We are looking for numbers with product −12 and sum −1. The product is negative, so one number is positive and the other negative. Of the pairs 1 · 12, 2 · 6 and 3 · 4, only the last one has a difference of 1, and for the sum to come out as −1 the 4 must be the negative one. The roots are x1 = 3 and x2 = −4.
If the coefficient of x2 is a number other than 1, we first divide the equation. We divide the equation 2x2 − 6x − 8 = 0 by 2 and get x2 − 3x − 4 = 0. The numbers with sum 3 and product −4 are 4 and −1.
It works best for equations with integer roots, like those you find in school exercises. If no pair comes to mind within a minute, reach for the discriminant; the roots may well involve a square root.
Checking a result. Did you get the roots 2 and
Factorising. The relationship ax2 + bx + c = a(x − x1)(x − x2) immediately factorises a quadratic expression into a product. From the roots 3 and −4 the brackets are (x − 3) and (x + 4):
You will use this when cancelling algebraic fractions and when factorising polynomials.
Building an equation from known roots. Suppose we want a quadratic equation with roots −2 and 5. The sum of the roots is 3, so p = −3, and the product is −10, so q = −10. The equation we want is
Any multiple of it, for example 2x2 − 6x − 20 = 0, has the same roots.
Expressions in the roots without solving the equation
A popular problem: the equation x2 − 4x + 1 = 0 has roots x1 and x2. Without solving it, work out
From Vieta’s formulas we know that x1 + x2 = 4 and x1 · x2 = 1. We need to express the sum of squares using only the sum and product of the roots. The formula for the square of a sum,
Substituting:
We can handle the sum of the reciprocals in the same way. We put the fractions over a common denominator:
It could also be done directly, since the discriminant gives the roots
Repeated and complex roots
The formulas also hold when the equation has just one repeated root. The equation x2 − 6x + 9 = 0 has the root x1 = x2 = 3, and indeed 3 + 3 = 6 = −p and 3 · 3 = 9 = q.
A negative discriminant does not matter either; the roots are then simply complex. The equation x2 + 2x + 5 = 0 has the roots −1 + 2i and −1 − 2i. Their sum is −2 and their product is (−1)2 − (2i)2 = 1 + 4 = 5, exactly as the formulas say.
Similar formulas exist for equations of higher degree. For a cubic equation x3 + px2 + qx + r = 0, the sum of the three roots is −p and their product is −r.
The formulas are named after François Viète, a 16th-century French lawyer and mathematician who was one of the first to use letters instead of specific numbers in equations.
Chapters: Quadratic equations, The discriminant, Vieta’s formulas, Quadratic equations with a parameter, Quadratic equations with complex solutions