Polynomial From Roots Calculator

Enter the roots to build a polynomial that has them.

Up to 8 roots, separated by commas. A root can be a fraction or a complex number like 1 + i.

Optional. Leave it empty for the smallest whole-number coefficients.

Try

Result

You enteredx=1, 2, 3x = 1,\ 2,\ 3

x3−6x2+11x−6\displaystyle x^{3} - 6x^{2} + 11x - 6

Factored form

(x−1)(x−2)(x−3)\displaystyle \left(x - 1\right)\left(x - 2\right)\left(x - 3\right)
Show the work
  1. Factor theorem

    If rr is a root of a polynomial then x−rx - r is a factor of it. So a polynomial with these roots is the product of one factor for each root, times a leading coefficient aa.

    P(x)=a(x−r1)(x−r2)⋯(x−rn)=(x−1)(x−2)(x−3)\begin{aligned} P(x) &= a\left(x - r_1\right)\left(x - r_2\right)\cdots\left(x - r_n\right) \\ &= \left(x - 1\right)\left(x - 2\right)\left(x - 3\right) \end{aligned}
  2. Expanding the product

    Multiply the factors out and collect like terms.

    (x−1)(x−2)(x−3)=x3−6x2+11x−6\left(x - 1\right)\left(x - 2\right)\left(x - 3\right) = x^{3} - 6x^{2} + 11x - 6
  3. Result

    So a polynomial with the roots 1, 2, 31,\ 2,\ 3 is x3−6x2+11x−6x^{3} - 6x^{2} + 11x - 6.

    P(x)=x3−6x2+11x−6P(x) = x^{3} - 6x^{2} + 11x - 6

Worked examples