Vieta's formulas relate the roots of a quadratic equation to its coefficients: for a monic equation \(x^2 + px + q = 0\), the sum of the roots is \(-p\), and the product is \(q\). This allows you to find roots mentally by guessing, without using the discriminant. This page contains exact formulas for monic and general forms, the converse of Vieta's theorem, a root-guessing algorithm, solved examples, and an interactive practice tool.
What is Vieta's theorem
Vieta's theorem is a rule that relates the roots of a quadratic equation to its coefficients. It is stated as follows: if \(x_1\) and \(x_2\) are the roots of the monic quadratic equation \(x^2 + px + q = 0\), then
In words: the sum of the roots is equal to the second coefficient with the opposite sign, and the product of the roots is equal to the constant term. The minus sign in the sum is the most important part of the entire topic: it is \(-p\), not \(p\).
For a general quadratic equation \(ax^2 + bx + c = 0\) (where \(a \neq 0\)), the formulas are obtained by dividing by \(a\):
The theorem works only when real roots exist, i.e., when \(D \ge 0\). If the discriminant is negative, there is nothing to guess: no real numbers with such a sum and product exist.
Monic equation and general form: when to divide by a
A quadratic equation is called monic if the coefficient of \(x^2\) is one: \(x^2 + px + q = 0\). Vieta's theorem is shortest for this form, which is why root guessing always starts with normalization.
If \(a \neq 1\), the equation is first divided by \(a\) term by term. For example, \(3x^2 - 10x + 3 = 0\) becomes \(x^2 - \frac{10}{3}x + 1 = 0\) after dividing by \(3\), meaning \(p = -\frac{10}{3}\), \(q = 1\). Thus, \(x_1 + x_2 = \frac{10}{3}\) and \(x_1 \cdot x_2 = 1\).
The same idea can be written directly for the general form without normalizing: \(x_1 + x_2 = -\frac{b}{a}\), \(x_1 \cdot x_2 = \frac{c}{a}\). The most common mistake is applying the "short" formulas \(-p\) and \(q\) to a non-monic equation, resulting in a sum of \(10\) instead of \(\frac{10}{3}\).
Converse of Vieta's theorem
Vieta's theorem has a converse, and it is what allows us to solve equations by guessing. It states: if numbers \(m\) and \(n\) are such that
then \(m\) and \(n\) are the roots of the equation \(x^2 + px + q = 0\).
The difference is fundamental. The direct theorem goes from roots to coefficients: the roots are already known, and we find the relationships between them. The converse goes from coefficients to roots: we guess a pair of numbers with the required sum and product, and we have the full right to call them roots; nothing else needs to be proven.
This also leads to a useful rule: if \(x_1\) and \(x_2\) are roots, the polynomial can be factored as \(x^2 + px + q = (x - x_1)(x - x_2)\). For example, \(x^2 - 5x + 6 = (x-2)(x-3)\).
Root guessing using Vieta's theorem: algorithm
Root guessing is the main practical application of the theorem. It works faster than the discriminant when the roots are integers and takes five steps.
Root signs based on coefficients p and q
Even before guessing, you can determine the signs of the roots by looking at the signs of \(p\) and \(q\). This significantly narrows down the search: you immediately see whether to look for a pair of two positive numbers, two negative numbers, or numbers with different signs.
| p and q | Roots | Example |
|---|---|---|
| q > 0, p < 0 | both > 0 | x2 − 5x + 6 = 0 → 2; 3 |
| q > 0, p > 0 | both < 0 | x2 + 5x + 6 = 0 → −2; −3 |
| q < 0 | different signs | x2 + 2x − 15 = 0 → 3; −5 |
| q = 0 | 0 and −p | x2 − 5x = 0 → 0; 5 |
Vieta's theorem or discriminant: what to choose
The quadratic formula \(x = \dfrac{-b \pm \sqrt{D}}{2a}\) always works but requires calculations. Vieta's theorem works instantly, but only if the roots can be guessed — usually small integers.
A practical rule is:
- the equation is monic, and \(q\) can be factored into a pair of small factors → try guessing with Vieta, the answer is obtained mentally;
- coefficients are large or fractional, roots cannot be guessed in 10–15 seconds → calculate the discriminant;
- you only need the number of roots or the signs of the roots, and the roots themselves are not needed → \(D\) and the sign table above are enough.
It is also useful to combine them: calculate the discriminant and find the roots, then check the answer using Vieta. The sum should give \(-p\), and the product \(q\). Such a check takes a couple of seconds and catches almost any arithmetic error.
Examples of solving using Vieta's theorem
Example 1. Root guessing: both roots are positive
Solve \(x^2 - 9x + 20 = 0\).
Step 1. The equation is monic: \(p = -9\), \(q = 20\).
Step 2. Check the discriminant: \(D = (-9)^2 - 4\cdot 20 = 81 - 80 = 1 > 0\) — two roots exist.
Step 3. Write down the relationships: \(x_1 + x_2 = -p = 9\), \(x_1 \cdot x_2 = q = 20\).
Step 4. Check factorizations of 20: \(1\cdot 20\) (sum 21), \(2\cdot 10\) (sum 12), \(4\cdot 5\) (sum 9) — the last pair fits. Both factors are positive because \(q > 0\) and \(p < 0\).
Step 5. Verification by substitution. \(4^2 - 9\cdot 4 + 20 = 16 - 36 + 20 = 0\); \(5^2 - 9\cdot 5 + 20 = 25 - 45 + 20 = 0\).
Answer: \(x_1 = 4\), \(x_2 = 5\).
Example 2. Roots of different signs
Solve \(x^2 + 3x - 28 = 0\).
Step 1. The equation is monic: \(p = 3\), \(q = -28\).
Step 2. \(q < 0\), which means the roots have different signs and the discriminant is definitely positive: \(D = 3^2 - 4\cdot(-28) = 9 + 112 = 121 > 0\).
Step 3. Relationships: \(x_1 + x_2 = -3\), \(x_1 \cdot x_2 = -28\).
Step 4. Factorizations of 28: \(1\cdot 28\), \(2\cdot 14\), \(4\cdot 7\). We need a difference of 3 — the pair 4 and 7 fits. Since the sum is negative, the root with the larger absolute value takes the minus sign: \(4\) and \(-7\).
Step 5. Verification. \(4^2 + 3\cdot 4 - 28 = 16 + 12 - 28 = 0\); \((-7)^2 + 3\cdot(-7) - 28 = 49 - 21 - 28 = 0\).
Answer: \(x_1 = 4\), \(x_2 = -7\).
Example 3. General form equation (a ≠ 1)
Solve \(3x^2 - 10x + 3 = 0\).
Step 1. The coefficient \(a = 3\), so the "short" formulas \(-p\) and \(q\) cannot be used. Use the general form: \(x_1 + x_2 = -\dfrac{b}{a} = \dfrac{10}{3}\), \(x_1 \cdot x_2 = \dfrac{c}{a} = \dfrac{3}{3} = 1\).
Step 2. The product is 1 — which means the roots are reciprocals: if one is \(t\), the other is \(\tfrac{1}{t}\). The sum \(t + \tfrac{1}{t} = \tfrac{10}{3}\) suggests \(t = 3\), since \(3 + \tfrac{1}{3} = \tfrac{10}{3}\).
Step 3. Verification by substitution. \(3\cdot 3^2 - 10\cdot 3 + 3 = 27 - 30 + 3 = 0\); \(3\cdot\left(\tfrac{1}{3}\right)^2 - 10\cdot\tfrac{1}{3} + 3 = \tfrac{1}{3} - \tfrac{10}{3} + 3 = 0\).
Answer: \(x_1 = 3\), \(x_2 = \tfrac{1}{3}\).
Example 4. Constructing an equation from its roots
Task. Construct a monic quadratic equation whose roots are \(-4\) and \(6\).
Step 1. Calculate the sum and product: \(x_1 + x_2 = -4 + 6 = 2\), \(x_1 \cdot x_2 = -4 \cdot 6 = -24\).
Step 2. By the converse of Vieta's theorem, the coefficients are \(p = -(x_1 + x_2) = -2\) and \(q = x_1 x_2 = -24\). This is where the main trap lies: \(p\) is the sum with the opposite sign.
Step 3. Write the equation: \(x^2 - 2x - 24 = 0\).
Step 4. Verification by substitution. \((-4)^2 - 2\cdot(-4) - 24 = 16 + 8 - 24 = 0\); \(6^2 - 2\cdot 6 - 24 = 36 - 12 - 24 = 0\).
Answer: \(x^2 - 2x - 24 = 0\). The same result is obtained by factoring \((x + 4)(x - 6) = 0\).
Example 5. Checking someone else's answer using Vieta's theorem
Task. A student solved the equation \(x^2 + 5x + 6 = 0\) and wrote the answer: \(x_1 = 2\), \(x_2 = 3\). Check if they made a mistake.
Step 1. According to Vieta, it should be \(x_1 + x_2 = -p = -5\) and \(x_1 \cdot x_2 = q = 6\).
Step 2. For the proposed answer, the product matches (\(2\cdot 3 = 6\)), but the sum does not: \(2 + 3 = 5 \neq -5\). So, the answer is incorrect: a sign was lost.
Step 3. Find the correct pair: we need numbers with a product of \(6\) and a sum of \(-5\) — these are \(-2\) and \(-3\) (both negative because \(q > 0\) and \(p > 0\)).
Step 4. Verification by substitution. \((-2)^2 + 5\cdot(-2) + 6 = 4 - 10 + 6 = 0\); \((-3)^2 + 5\cdot(-3) + 6 = 9 - 15 + 6 = 0\).
Answer: the correct roots are \(x_1 = -2\), \(x_2 = -3\).
Common mistakes when working with Vieta's theorem
-
Losing the minus in the sum: writing $x_1 + x_2 = p$ instead of $x_1 + x_2 = -p$.
The minus is only for the sum; the product is taken with the same sign: \(x_1 + x_2 = -p\), \(x_1 x_2 = q\). Check with a simple equation \(x^2 - 5x + 6 = 0\): here \(p = -5\), the sum of the roots is \(5\), and the roots are indeed 2 and 3.
-
Applying formulas $-p$ and $q$ to a non-monic equation: for $2x^2 - 9x + 4 = 0$, saying "sum is 9, product is 4".
As long as \(a \neq 1\), the general form formulas apply: \(x_1 + x_2 = -\dfrac{b}{a} = \dfrac{9}{2}\), \(x_1 x_2 = \dfrac{c}{a} = 2\). The roots here are 4 and \(\tfrac{1}{2}\), not 4 and 1. Or, divide the entire equation by \(a\) first.
-
Guessing roots without checking the discriminant: trying to find a pair of numbers with a sum of $-1$ and a product of $1$ for $x^2 + x + 1 = 0$.
First, ensure that roots exist: \(D = 1 - 4 = -3 < 0\), no real roots, guessing is impossible. Vieta's theorem only works when \(D \ge 0\).
-
Guessing a pair only by the product without checking the sum: for $x^2 - 8x + 12 = 0$, taking 3 and 4 because their product is 12.
Both relationships must be checked simultaneously. For \(x^2 - 8x + 12 = 0\), the product 12 is given by pairs (1; 12), (2; 6), (3; 4), but the sum 8 is only given by the pair 2 and 6. Verification: \(2^2 - 8\cdot 2 + 12 = 0\) and \(6^2 - 8\cdot 6 + 12 = 0\).
-
When constructing an equation from roots, taking $p$ equal to the sum: for roots 2 and 5, writing $x^2 + 7x + 10 = 0$.
The coefficient \(p\) is the sum with the opposite sign: \(p = -(2 + 5) = -7\), \(q = 2\cdot 5 = 10\), i.e., \(x^2 - 7x + 10 = 0\). Substitution confirms: \(2^2 - 7\cdot 2 + 10 = 0\), \(5^2 - 7\cdot 5 + 10 = 0\).
-
Believing that Vieta's theorem is only valid for integer roots and not using it to check answers.
The relationships \(x_1 + x_2 = -p\) and \(x_1 x_2 = q\) hold for any real roots — integer, fractional, and irrational. It's just that mental guessing is convenient for integers, while for others, the theorem remains a quick way to verify an answer found via the discriminant.
Questions and answers
How is Vieta's theorem stated in simple words?
If a monic quadratic equation \(x^2 + px + q = 0\) has roots, their sum is equal to the second coefficient with the opposite sign, and their product is equal to the constant term: \(x_1 + x_2 = -p\) and \(x_1 x_2 = q\).
What are the sum and product of the roots of the equation $ax^2 + bx + c = 0$?
For a general form equation, the sum of the roots is \(-\dfrac{b}{a}\), and the product is \(\dfrac{c}{a}\). These formulas are derived from the monic case by dividing the entire equation by \(a\).
How does the converse of Vieta's theorem differ from the direct one?
The direct theorem goes from roots to coefficients: knowing the roots, we get the sum \(-p\) and the product \(q\). The converse goes the other way: if a pair of numbers gives the required sum and product, then these numbers are the roots of the equation. It is the converse theorem that allows solving equations by guessing.
How to guess roots using Vieta's theorem?
Normalize the equation to \(x^2 + px + q = 0\), ensure \(D \ge 0\), write down \(x_1 + x_2 = -p\) and \(x_1 x_2 = q\), check factorizations of \(q\) into pairs of factors, and choose the pair whose sum is \(-p\). For example, for \(x^2 + 6x + 8 = 0\), we need numbers with a product of 8 and a sum of \(-6\) — these are \(-2\) and \(-4\).
Does Vieta's theorem work if the coefficient of $x^2$ is not one?
Yes, but in the general form: \(x_1 + x_2 = -\dfrac{b}{a}\), \(x_1 x_2 = \dfrac{c}{a}\). The short formulas \(-p\) and \(q\) are only true for a monic equation, so when \(a \neq 1\), the equation is first divided by \(a\).
What to do if roots cannot be guessed using Vieta's theorem?
This means the roots are not integers or do not exist at all. Calculate the discriminant: if \(D < 0\), there are no real roots, and if \(D \ge 0\), find the roots using the formula \(x = \dfrac{-b \pm \sqrt{D}}{2a}\) and then verify the answer using Vieta's theorem.
How to determine the signs of the roots without solving the equation?
Based on the signs of \(p\) and \(q\) when \(D \ge 0\): if \(q > 0\) and \(p < 0\) — both roots are positive; if \(q > 0\) and \(p > 0\) — both are negative; if \(q < 0\) — roots have different signs; if \(q = 0\) — one of the roots is zero.
In what grade is Vieta's theorem taught?
In 8th grade during algebra lessons, right after quadratic equations and the discriminant. Later, it is used for factoring quadratic trinomials \(x^2 + px + q = (x - x_1)(x - x_2)\), investigating roots with parameters, and in OGE and EGE exams.