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+i, 1−ix = 1 + i,\ 1 - i

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

The conjugate 1 - i was added so the coefficients are real.

Factored form

(x−(1+i))(x−(1−i))\displaystyle \left(x - \left(1 + i\right)\right)\left(x - \left(1 - i\right)\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+i))(x−(1−i))\begin{aligned} P(x) &= a\left(x - r_1\right)\left(x - r_2\right)\cdots\left(x - r_n\right) \\ &= \left(x - \left(1 + i\right)\right)\left(x - \left(1 - i\right)\right) \end{aligned}
  2. Conjugate pairs

    A polynomial with real coefficients that has a complex root must also have its complex conjugate as a root, so the missing conjugate was added.

    1−i1 - i
  3. Expanding the product

    Multiply the factors out and collect like terms.

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

    So a polynomial with the roots 1+i, 1−i1 + i,\ 1 - i is x2−2x+2x^{2} - 2x + 2.

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

Worked examples