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=2, 2x = 2,\ 2

x2−4x+4\displaystyle x^{2} - 4x + 4

Factored form

(x−2)(x−2)\displaystyle \left(x - 2\right)\left(x - 2\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−2)(x−2)\begin{aligned} P(x) &= a\left(x - r_1\right)\left(x - r_2\right)\cdots\left(x - r_n\right) \\ &= \left(x - 2\right)\left(x - 2\right) \end{aligned}
  2. Expanding the product

    Multiply the factors out and collect like terms.

    (x−2)(x−2)=x2−4x+4\left(x - 2\right)\left(x - 2\right) = x^{2} - 4x + 4
  3. Result

    So a polynomial with the roots 2, 22,\ 2 is x2−4x+4x^{2} - 4x + 4.

    P(x)=x2−4x+4P(x) = x^{2} - 4x + 4

Worked examples