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=12, −3x = \frac{1}{2},\ -3

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

Factored form

(x−12)(x+3)\displaystyle \left(x - \frac{1}{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−12)(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 - \frac{1}{2}\right)\left(x + 3\right) \end{aligned}
  2. Expanding the product

    Multiply the factors out and collect like terms.

    (x−12)(x+3)=x2+52x−32\left(x - \frac{1}{2}\right)\left(x + 3\right) = x^{2} + \frac{5}{2}x - \frac{3}{2}
  3. Clearing fractions

    The coefficients were not all whole numbers, so multiply by the smallest positive number, 22, that makes them whole numbers with no common factor.

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

    So a polynomial with the roots 12, −3\frac{1}{2},\ -3 is 2x2+5x−32x^{2} + 5x - 3.

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

Worked examples