Polynomial from Roots Calculator
Enter real roots separated by commas. Fractions are supported (example: 1/2, -3/4). Repeated roots are allowed.
What this polynomial with roots calculator does
This tool builds an expanded polynomial when you already know its roots. If your roots are
r₁, r₂, ..., rₙ, the polynomial has the factorized form:
P(x) = a(x - r₁)(x - r₂)...(x - rₙ), where a is the leading coefficient.
The calculator multiplies those factors for you and returns:
- The polynomial degree
- The factored form
- The expanded form
- The coefficient vector
[aₙ, aₙ₋₁, ..., a₀] - A root check table showing that
P(r)is approximately zero
How it works behind the scenes
1) Build the monic polynomial from roots
The calculator starts with 1 and repeatedly multiplies by each factor
(x - r). This creates a monic polynomial (leading coefficient 1).
2) Apply the leading coefficient
If you enter a leading coefficient a, every coefficient in the monic polynomial is
multiplied by a. This scales the graph vertically and sets the leading term to
axⁿ.
3) Format and verify
Finally, the calculator formats terms neatly and evaluates the polynomial at each entered root. For decimal roots, tiny floating-point rounding differences are normal, so values extremely close to zero are treated as zero.
Input tips
- Separate roots with commas:
2, -1, 3 - Use fractions if needed:
1/2, -3/4, 5 - Repeat roots for multiplicity:
2, 2, -1means root 2 has multiplicity 2 - Leading coefficient cannot be zero
Example walkthrough
Example A: roots 2, -1, 3 with leading coefficient 1
The factored form is (x - 2)(x + 1)(x - 3). Expanding gives:
x³ - 4x² + x + 6.
So the coefficient vector is [1, -4, 1, 6].
Example B: roots 1/2, 1/2, -4 with leading coefficient 8
The repeated root creates a squared factor:
8(x - 1/2)²(x + 4).
The output polynomial is cubic with coefficients scaled by 8.
Why this is useful
A polynomial from roots calculator is handy in algebra, precalculus, and numerical methods. It helps when you:
- Need a polynomial model with specific x-intercepts
- Check homework for expanded vs factored forms
- Explore root multiplicity and graph behavior
- Practice Vieta’s formulas by comparing roots and coefficients
Quick FAQ
Does this support complex roots?
This version is designed for real-number roots (including fractions). Complex root support can be added in a future version.
What if I enter decimal roots?
Decimals are fully supported. Coefficients may appear as decimals and can include tiny rounding artifacts due to floating-point arithmetic.
What does multiplicity mean?
If a root appears more than once, that root has multiplicity greater than 1. For example,
roots 3, 3, -2 produce factors (x - 3)²(x + 2).
Final note
If you’re studying polynomial equations, this calculator is a fast way to move between roots, factors, and expanded coefficients. Try a few custom root sets and compare how the degree, signs, and intercepts change.