VOOZH about

URL: https://www.geeksforgeeks.org/maths/vietas-formula/

⇱ Vieta's Formula - GeeksforGeeks


  • Courses
  • Tutorials
  • Interview Prep

Vieta's Formula

Last Updated : 23 Jul, 2025

Vieta's Formulas provide a way to relate the coefficients of a polynomial to the sums and products of its roots. Named after the French mathematician François Viète, these formulas establish a connection between the roots of a polynomial and its coefficients.

If you have a polynomial equation and know its roots, Vieta's formulas help you determine the relationships between the equation's coefficients and its roots.

👁 Vieta's-Formula
Vieta's Formula

For example: Consider the equation f(x) = x2 − x − 6, which factors to (x − 3) (x + 2), so the roots are x = 3 and x = -2.

  • Vieta's formula can find that the sum of the roots is −b/a = 1 and the product is c/a = −6, which matches the actual values: 3 + (−2) = 1, and 3⋅(−2) = −6.
  • Vieta’s formulas make it easy to find these relationships directly from the equation without factoring.

Vieta's Formula for Quadratic Equation

If f(x) = ax2 + bx + c is a quadratic equation with roots α and β, then,

  • Sum of roots = α + β = -b/a
  • Product of roots = αβ = c/a

If the sum and product of roots are given, the quadratic equation is given by :

  • x2 - (sum of roots)x + (product of roots) = 0

Example: Solve for the roots using Vieta's formulas for the equation: x2 − 5x + 6 = 0.
Solution:

From the equation, we can identify a = 1, b = −5b , and c = 6.
Sum of roots = α + β = -b/a = 5
Product of roots = αβ = c/a = 6

Vieta's Formula for the Cubic Equation

If f(x) = ax3+ bx2 + cx + d is a quadratic equation with roots α, β, and γ, then,

  • Sum of roots = α + β + γ = -b/a
  • Sum of product of two roots = αβ + αγ + βγ = c/a 
  • Product of roots = αβγ = -d/a

If the sum and product of roots are given, then the cubic equation is given by :

x3 - (sum of roots)x2 + (sum of product of two roots)x - (product of roots) = 0

Example: Solve for the roots using Vieta's formulas for the equation: x3 − 6x2 + 11x − 6 = 0.
Solution:

From the equation, we can identify a=1, b=−6, c=11, and d=−6.
Sum of roots = α + β + γ = -b/a = 6
Sum of product of two roots = αβ + αγ + βγ = c/a = 11
Product of roots = αβγ = -d/a = 6

Vieta's Formula for Higher Degree Polynomials

If f(x) = anxn+ an-1xn-1 + an-2xn-2 + ......... + a2x2 + a1x +a0 is a quadratic equation with roots r1, r2, r3, ...... rn-1, rn then,
The sum of the roots: r1 + r2 + r3 +.......... + rn-1 + rn = -an-1/an
The sum of the products of the roots taken two at a time: (r1r2 + r1r3 +.... +r1rn) + (r2r3 + r2r4 +....... +r2rn) + ......... + rn-1rn = an-2/an
:
:
The product of all the roots: r1r2...rn = (-1)n(a0/an

Example: Let's take an example of a degree n = 5 polynomial and apply Vieta’s formulas.

Solution:

This is a degree-5 polynomial with leading coefficient a5 = 1, and the coefficients are:

r1 + r2 + r3 + r4 + r5 = -a4/a5 = -(4) = 4
r1 r2 + r1 r3 +...+ r4 r5 = a3/a5 = 3
r1 r2 r3 ...... = -a2/a5 = -2
r1 r2 r3 r4...... = a1/a5 = -1
r1 r2 r3 r4 r5 = (-1)5a0/a5 = -6

Polynomial Degree

Formula for the sum of Roots

Formula for Product of Roots

Quadratic

α + β = -b/a

αβ = c/a

Cubic

α + β + γ = -b/a

αβγ = -d/a

Higher-Degree

Generalized for sums and products of roots

Varies by degree

Solved Questions on Vieta's Formula

Question 1: If α, β are the roots of the equation x2 - 10x + 5 = 0, then find the value of (α2 + β2)/(α2β  + αβ2).

Solution: 

Given Equation:

  • x2 - 10x + 5 = 0

By Vieta's Formula
α + β = -b/a = -(-10)/1 = 10
αβ = c/a = 5/1 = 5
As (α22) = (α + β )2 - 2αβ
= (10)2 - 2×5 
= 100 - 10  
22)  = 90

Now value of (α2 + β2)/(α2β  + αβ2)
= (α2 + β2)/(αβ(α + β))
= 90/(5×10)
= 90/50
= 1.8

Question 2: If α, β are the roots of the equation: x2 + 7x + 2 = 0, then find the value of 14÷(1/α + 1/ β).

Solution:

Given Equation:

  • x2 + 7x + 2 = 0

By Vieta's Formula
α + β = -b/a = -7/1 = -7
αβ = c/a = 2/1 = 2
Now, (1/α + 1/ β) = (α + β)/αβ
(1/α + 1/ β) = -7/2
Now value of  14÷(1/α + 1/ β)
= 14 ÷ (-7/2)
= 14 × (-2/7)
= -4

Question 3: If α, β are the roots of the equation: x2 + 10x + 2 = 0, then find the value of (α/β +  β/α).

Solution: 

Given Equation:

  • x2 + 10x + 2 = 0

By Vieta's Formula
α + β = -b/a = 10/1 = 10
αβ = c/a = 2/1 = 2
As (α22) = (α + β )2 - 2αβ
= 102 - 2×2
= 100 - 4 
= 96
Now value of (α/β +  β/α) = (α22)/αβ 
= 96/2
= 48

Question 4: If α and β are the roots of the equation and given that α + β = -100 and αβ = -20, then find the quadratic equation.

Solution:

Given, 

  • Sum of roots = α + β = -100
  • Product of roots = αβ = -20

Quadratic equation is given by:
x2 - (sum of roots)x + (product of roots) = 0
x2 - (-100)x + (-20) = 0
x2 + 100x - 20 = 0

Question 5: If α, β and γ are the roots of the equation and given that α + β +  γ= 10, αβ + αγ + βγ = -1, and αβγ = -6, then find the cubic equation.

Solution:

Given,

  • Sum of roots = α + β + γ= 10,
  • Sum of product of two roots = αβ + αγ + βγ = -1
  • Product of roots = αβγ = -6

Cubic equation is given by:
x3 - (sum of roots)x2 + (sum of product of two roots)x - (product of roots) = 0
x3 - 10x2 + (-1)x - (-6) = 0
x3 - 10x2 - x + 6 = 0

Question 6: If α, β and  γ are the roots of the equation x3 + 1569x2 - 3 = 0, then find the value of [(1/α) + (1/β )]3 + [(1/γ) + (1/β )]3 + [(1/γ) + (1/α )]3

Solution:

Given,

  • Sum of roots = α + β + γ= -b/a = -1569/1 = -1569
  • Sum of product of two roots = αβ + αγ + βγ = c/a = 0/1 = 0
  • Product of roots = αβγ = -d/a = -(-3)/1 = 3

Since, (p3 + q3 + r3 - 3pqr) = (p + q + r)(p2 +q2 + r2 - pq - qr - pr)                 ......(1)
Let, p = (1/α) + (1/β )  , q = (1/γ) + (1/β ) , r = (1/γ) + (1/α )
p + q + r = 2[(1/α) + (1/β ) +  (1/γ) ] = 2(αβ + αγ + βγ)/αβγ
= 2(0/3) = 0 
From equation (1):
(p3 + q3 + r3 - 3pqr) = 0
p3 + q3 + r3 = 3pqr 
[(1/α) + (1/β )]3 + [(1/γ) + (1/β )]3 + [(1/γ) + (1/α )]3 = 3[(1/α) + (1/β )][(1/γ) + (1/β )][(1/γ) + (1/α )]
= 3(-1/γ)(-1/α) (-1/β )
= -3/αβγ  = -3/3
= -1

Question 7: If α and β are the roots of the equation x2 - 3x + 2 = 0, then find the value of α2 - β2.

Solution:

Given,

  • Sum of roots = α + β = -b/a = -(-3)/1 = 3
  • Product of roots = αβγ = c/a = 2/1 = 2

As (α - β)2 = (α + β)2 -4αβ  
(α - β)2 = (3)2 - 4(2) = 9 - 8 = 1
(α - β) = 1
Since, 
α2 - β2 = (α - β)(α + β) = (1)(3) = 3
α2 - β2 = 3

Comment

Explore