I know that polynomials can be refactored in terms of their roots. However, this must imply that two different polynomials have different roots (this is just what I think). So my question is: Are polynomials with the same roots identical? - if so, why?

A follow-up question that is also about the uniqueness of roots and polynomials can be found here: Is the set of roots unique for each $g(x)$ in $a_n x^n + g(x)$?

  • 7
    $\begingroup$ The polynomials $f(x)=1$, $g(x)=2$ and $h(x)=x^2+1$, $k(x)=x^2+x+1$ have the same roots over $\Bbb R$. $\endgroup$
    – ajotatxe
    Jun 6, 2019 at 16:15

9 Answers 9


No, they are not.

For instance, $2x^2-2$ and $x^2-1$ have the same roots, yet they are not identical.

And, depending on what you mean by "the same roots", we have that $x^2-2x+1$ and $x-1$ have the same roots, yet they are not identical.

Again, depending on what you mean by "the same roots", $x^3+x$ and $x^3+2x$ both only have one real root, yet they are not the same.

However, if two monic polynomials have the same roots, with the same multiplicities, over some algebraicaly closed field (like the complex numbers $\Bbb C$) then yes, they are identical.

  • $\begingroup$ Aha okay, thanks. But then how come you can write a polynomial in terms of its roots? Like $(\lambda - a)(\lambda - d)-bc = 0$ can be written in terms of its roots $(\lambda - \lambda_1)(\lambda - \lambda_2) = 0$? Since having the same roots apparently does not imply that two polynomials are identical, using the roots as a way to write a unique polynomial then seems confusing to me $\endgroup$
    – That Guy
    Jun 6, 2019 at 16:36
  • 3
    $\begingroup$ @FacPam Those polynomials are monic, and since they are quadratic, there are always exactly two (possibly complex) roots when counted with multiplicity. And since they both have the two roots $\lambda_1$ and $\lambda_2$, they do turn out to be the same polynomial. Wasn't this addressed in your previous question? $\endgroup$
    – Arthur
    Jun 6, 2019 at 16:40
  • $\begingroup$ Ahh, no it was not addressed - at least I do not think so. Possibly because I do not know the definition of "monic". I will look that up now. Thanks again $\endgroup$
    – That Guy
    Jun 6, 2019 at 16:48
  • 4
    $\begingroup$ @FacPam "Monic" just means that the highest-order term has coefficient $1$. That requirement is there to stop things like the first counterexample in my answer: $x^2-1$ is monic (as the coefficient of $x^2$ is $1$) while $2x^2-2$ is not (as the coefficient of $x^2$ is not $1$). $\endgroup$
    – Arthur
    Jun 6, 2019 at 17:14
  • 5
    $\begingroup$ @FacPam No, the "same multiplicities" is to resolve the issue of $x-1$ versus $x^2 - 2x + 1$ (or, as others have pointed out, $x$ versus $x^2$). They have the same roots, but are clearly not the same. That's because these quadratic example polynomials have a double root, a root with multiplicity $2$. $\endgroup$
    – Arthur
    Jun 6, 2019 at 18:47

The accepted answer is deservedly so, a great explanation. As I read this, I thought of my students who are visual learners, for whom, a picture is worth a thousand words, and this would answer their question with almost no further comment.

enter image description here

The image above shows a simple $Y=(X-1)(X-2)(X-3)$ and an overlapping $Y=-3(X-1)(X-2)(X-3)$.

This helps show that manipulation made to an equation such as factoring may preserve the roots, but do not leave an equation with the the same nature, e.g. the end behaviour which might be important, is easily lost.

Edit - by popular demand, I'm adding the original graph, and an overlapping one with 2 as a double root.

enter image description here

  • 9
    $\begingroup$ How about spicing it up with a polynomial for which (X-2) appears twice? Still the same roots, and it would show that we're talking about more than just trivial constant factors. $\endgroup$ Jun 7, 2019 at 15:38
  • $\begingroup$ Remind your students that linear functions are polynomial, and show them $f(x)=x,\, g(x)=-x, $ and $h(x)=2x.$ $\endgroup$ Jun 10, 2019 at 6:28

For polynomials over $\mathbb{R}$, the answer is no; for example, $f(x)=x$ and $g(x) = x(x^2+1)$ have the same roots over $\mathbb{R}$—with the same multiplicities—but they are not equal.

For polynomials over $\mathbb{C}$, the answer is almost. The fundamental theorem of algebra says that every polynomial over $\mathbb{C}$ of degree $n \ge 1$ splits uniquely into $n$ linear factors. So if $f$ and $g$ have the same roots $\alpha_1,\alpha_2,\dots,\alpha_n$, listed with multiplicity, then $$ f(x) = \lambda (x-\alpha_1)\cdots(x-\alpha_n) \text{ and } g(x) = \mu(x-\alpha_1)\cdots(x-\alpha_n) $$ for some $0 \ne \lambda,\mu \in \mathbb{C}$. So roots (with multiplicity) determine polynomials over $\mathbb{C}$ up to a multiplicative constant and, in particular, monic polynomials over $\mathbb{C}$ are uniquely determined by their roots.

For polynomials over finite fields, the answer is very much no. There are polynomials that don't just have the same roots, but they have all the same values for every input. For example, the polynomials $f(x) = x$ and $g(x)=x^3$ over $\mathbb{F}_2$ satisfy $f(x)=g(x)$ for all $x \in \mathbb{F}_2$, and yet $f \ne g$.

  • 2
    $\begingroup$ Of course for finite fields $\mathbb{F}$, the pigeonhole principle alone can say that there will be distinct polynomials which induce the same map $\mathbb{F}\to\mathbb{F}$. Because the number of such maps is finite, while the number of polynomials is infinite. $\endgroup$ Jun 8, 2019 at 8:27

No, they aren't:

$f_1(x)=(x+1)(x-2)$ and $f_2(x)=5(x+1)(x-2)$ have the same roots. But they don't even need to have same degree to have the same roots: $f_3(x)=x^2$ has the same root as $f_4(x)=x$.

  • $\begingroup$ What do you mean by "up to a constant" - $f_1(x)=(x+1)(x-2)$ and $f_2(x)=5(x+1)(x-2)$ are not identical? $\endgroup$
    – That Guy
    Jun 6, 2019 at 20:29
  • 1
    $\begingroup$ @FacPam Well, $f_2(x) = 5 f_1(x)$ so we can hardly say they are identical except at their roots $\endgroup$
    – zdimension
    Jun 7, 2019 at 6:51
  • $\begingroup$ @FacPam It means that if $f(x_o)=0$ for some $x_0$, then also $\lambda f(x_0)=0$ for any scalar $\lambda$ $\endgroup$
    – Tesla
    Jun 7, 2019 at 8:31
  • $\begingroup$ if you don't consider multiplicity you first stmt is incorrect, consider x(x-1)^2 and x^2(x-1). If you consider multiplicity, then your second stmt incorrect $\endgroup$
    – RiaD
    Jun 7, 2019 at 9:15
  • $\begingroup$ yea thanks all, didnt think about it for more than two seconds. $\endgroup$
    – Tesla
    Jun 8, 2019 at 6:08

The multiplicity counts too: for example $x$ and $x^2$ have the same roots, but are different polynomials. If two polynomials have all the same roots and all the same multiplicities, then even then they are not equal: $2x$ and $x$ for example. So all you can conclude is that one is a scalar multiple of another.

However, this statement needs to be interpreted correctly: you need to work over $\mathbb{C}$ (or some other algebraically closed field). For example, over $\mathbb{R}$, the polynomials $x^2+1$ and$ (x^2+1)^2$ have the same real roots (namely, they have no roots!) but are clearly not the same.

So: you have to count the roots with multiplicity in the algebraic closure.


No they are not, and it's easy to see why that is the case. You probably wouldn't consider $f(x)=x$ and $f(x)=10x$ to be identical even though they have the same root.


Let's start by considering polynomials with all their roots, real and complex. This allows us to fully answer the question for first complex, and then real, polynomials and roots.

This approach will not only let us get all answers, but prove these are all answers, and the only answers.** It's also easy to see why that's so.

Fundamental principle: Over the complex numbers, all nonconstant polynomials can be uniquely factored into linear terms and a multiplier

See Wikipedia "Irreducible polynomial - over the complex numbers" and Fundamental theorem of algebra: any nonconstant polynomial can, in complex terms, be uniquely factored into something like

A.(x-B).(x-C).(x-D)... = 0

A <> 0 and B, C,D.. are the roots. B,C,D can of course be complex or real numbers. Also some of the B, C, D... may repeat, in which case we have one or more repeating roots, but the polynomial will still factorise this way.

We can rewrite this in terms of unique roots, as follows:

A. [(x-B)^P] . [(x-C)^Q] . [(x-D)^R] . [...] ... = 0

where A <> 0 and B,C,D... are now all unique complex numbers, and are the roots of the polynomial, and P,Q,R... are all integers >= 1 that account for any repeated roots.

The fundamental.theorem of algebra guarantees we can factor all polynomials this way, and that it will be unique for each polynomial. It's also evident from inspection that B,C,D are the roots, and all the roots, and no other roots exist.

Your answer, if complex roots are allowed

... Is now quite simple. Suppose 2 non-constant polynomials have identical roots. Then they must be identical other that possibly:

  • a different non-zero multiplier (A is different between the polynomials, when factored)
  • repeated roots (one or more of P, Q,R will differ between the polynomials, when factored)

What if we only allow real roots?

The polynomial can still only be factored one way as above. The only difference is, any B,C,D that isn't a real number won't ever equal a value of X we can choose, so it can't be a solution. So as well as the 2 types of change above, we can also change the powers for any existing complex linear factors to any integer >= 0, or multiply by new complex linear factors (to any integer power >0), and provided the factor we multiply/divide by has a complex parameter, it won't ever affect the real roots. We can't divide by new complex linear factors, though, because the result wouldn't be a polynomial.

This is easiest explained by example.

Example: suppose our equation is a polynomial that factors into a mix of real and complex linear factors, some repeated:

4 . (X - 7)^2 . (X + 4.5) . (X + 2i) . (X - 2i)= 0

Then any polynomial with identical real roots must be formed by some combination of these changes (I'll give an example of each):

  • (-6) . (X - 7)^2 . (X + 4.5) . (X + 2i) . (X - 2i) = 0
    We have multiplied A by some real value <> 0 (in this case, -1.5).

  • 4 . (X - 7)^8 . (X + 4.5) . (X + 2i) . (X - 2i)= 0
    4 . (X - 7)^0 . (X + 4.5)^5 . (X + 2i) . (X - 2i)= 0
    We have changed the powers for some of the repeated roots (up or down)

  • 4 . (X - 7)^2 . (X + 4.5) . (X + 2i) . (X - 2i) . (X - [3+7i])^3 = 0
    4 . (X - 7)^2 . (X + 4.5) . (X + 2i)^17 . (X - 2i) = 0
    4 . (X - 7)^2 . (X + 4.5) . (X + 2i)= 0
    4 . (X - 7)^2 . (X + 4.5) = 0
    We have changed the powers for some of the complex roots (up or down), or removed them (equivalent to changing their power to 0), or introduced new complex linear factors.

Note that this last transformation might or might not change some of the coefficients in the equation from real to complex coefficients or vice-versa, depending what you do (see especially the last example where they don't). It may well change the complex roots of the polynomial. But it will not change, add or remove any real roots of the polynomial.

If you restrict yourself to changes of this kind that don't change any real coefficients to complex coefficients, you'll achieve all real coefficient polynomials with the same roots this way.

** Note - For quintics and higher, we may not be able to factorise to simple algebraically expressed roots, because not all 5th and higher order polynomials allow for neat expressions of their roots this way. But - even if inexpressible - the roots do exist, the limitation is in our ability to calculate them exactly, or write them concisely, not in their existence. The same method will work and be valid, and the same other types of polynomials will have identical complex (or real) roots. We just wouldn't be able to calculate or write the linear expressions, transformative equations, or roots, neatly, in the same way.

  • 13
    $\begingroup$ please learn to use MathJax $\endgroup$
    – qwr
    Jun 7, 2019 at 14:03
  • $\begingroup$ This answer should really be upvoted $\endgroup$
    – klutt
    Jun 9, 2019 at 18:57

Dislaimer: long answer.

Arthur answered your question very nicely, but I'd like to tell you a much more general result that might pique your interest in a field of math called "algebraic geometry". So – if we are working in an algebraically closed field, say the complex numbers $\mathbb{C}$, then every polynomial in one variable splits completely into linear factors. As the other answers say, this is enough to show that one variable complex polynomials are uniquely determined by their roots, up to multiplicity and multiplication by a constant: if the roots of a polynomial $p(t)$ are some complex numbers $\lambda_1,...,\lambda_k\in\mathbb{C}$, then that polynomial must be $\lambda(t-\lambda_1)^{l_1}...(t-\lambda_k)^{l_k}$ for some non-zero complex number $\lambda$ and some non-zero natural numbers $l_1,...l_k$.

However, what happens if we want to consider polynomials in multiple variables? This is a very natural thing if you want to study geometry – for instance, the unit circle in the real plane is cut out by an equation of the form $t_1^2+t_2^2-1=0$. This polynomial has more than one variable, and in general we won't be able to factor such polynomials the same way we can polynomials in one variable. However, we can get a beautiful analog of the one-variable result using some more advanced algebraic machinery.

In particular, there's an important result in commutative algebra called Hilbert's Nullstellensatz, which I won't state in full generality here. But one corollary of it is that, if the roots of a complex polynomial $p(t_1, ..., t_n)\in\mathbb{C}[t_1, ..., t_n]$ are also roots of another complex polynomial $q(t_1, ..., t_n)\in\mathbb{C}[t_1, ..., t_n]$, then there exist a natural number $k$ and a third polynomial $r(t_1, ..., t_n)\in\mathbb{C}[t_1, ..., t_n]$ such that $q^k=rp$. We can use this to prove the following lovely result: if $p(t_1, ..., t_n),q(t_1, ..., t_n)\in\mathbb{C}[t_1, ..., t_n]$ are non-zero and share the same roots, and also have no repeated factors (ie, if a non-constant polynomial $r$ divides $p$, then $r^2$ does not divide $p$, and likewise for $q$), there there is a complex number $\lambda$ such that $p=\lambda q$ – ie, $p$ and $q$ differ by only a scalar multiple, and so a polynomial with no repeated factors is uniquely determined (up to a scalar multiple) by its roots.

I give a proof of this below; you need one other piece of machinery from algebra, which is that any non-constant polynomial in $\mathbb{C}[t_1, ..., t_n]$ has a unique factorization into irreducible polynomials, up to reordering and multiplication by constants. (Recall that an irreducible polynomial is one that has no non-constant divisors other than constant multiples of itself.) The term for this is that $\mathbb{C}[t_1, ..., t_n]$ is a "unique factorization domain" (ufd), which is a much more general phenomenon, but you don't need that here. Given these two facts that I've mentioned, you can prove the result we want. I do this below, but first I recommend trying to prove this yourself!! It's a nice exercise.

Proof: let $p$ and $q$ be as above: non-zero complex polynomials in $n$ variables with no repeated factors and which share the same roots. In particular, the roots of $p$ are also roots of $q$, so by the corollary to the nullstellensatz there is some $k\in\mathbb{N}$ and $r\in\mathbb{C}[t_1,...,t_n]$ such that $q^k=rp$. I claim that we can assume $k=1$. Indeed, because of unique factorization in $\mathbb{C}[t_1, ..., t_n]$, we can write $q=q_1*...*q_m$ for some $m\in\mathbb{N}$, where each $q_i\in\mathbb{C}[t_1,...,t_n]$ is irreducible. Note that, if $i\neq j$, then $q_i\neq \lambda q_j$ for any $\lambda\in\mathbb{C}$, or else $q_i^2$ would divide $q$, contradicting the fact that $q$ has no repeated factors.

Now, the fact that $q^k=rp$ means that $q_1^k...q_m^k=rp$. In particular, $q_i^k$ divides $rp$ for every $i$ – ie $q_i$ (or some scalar multiples of it) appears $k$ times in the unique (up to constant multiples) factorization of $rp$ into irreducible polynomials. But a factorization of $rp$ into irreducible polynomials is the same thing as a factorization of $r$ into irreducibles multiplied with a factorization of $p$ into irreducibles. In particular, this means that – if $l_1$ and $l_2$ are the largest numbers such that $q_i^{l_1}$ divides $r$ and $q_i^{l_2}$ divides $p$ – then $l_1+l_2=k$. (Note that $l_1$ and $l_2$ are not necessarily non-zero.) However, we know that $q_i^l$ does not divide $p$ for any $l>1$, since $p$ has no repeated factors, and so by the pigeonhole principle we must have that $q_i^{k-1}$ divides $r$. In particular, each $q_i$ appears at least $k-1$ times in the factorization of $r$ into irreducibles, so $q^{k-1}=q_1^{k-1}*...*q_m^{k-1}$ divides $r$; say $r=r'q^{k-1}$ for some other other polynomial $r'\in\mathbb{C}[t_1,...,t_n]$.

Putting this together with the fact that $q^k=rp$ gives us $q^k=q^{k-1}r'p$, and dividing out gives $q=r'p$. Now, on the other hand, the roots of $q$ are also roots of $p$, and so we can go through exactly the same arguments as above to show that there is some polynomial $s\in\mathbb{C}[t_1,...,t_n]$ such that $p=sq$. Hence, combining these two equations, $q=r'sq$, and dividing out by $q$ gives $r's=1$. But no non-constant polynomial is invertible, so this means that $r'$ and $s$ are actually constant polynomials – ie complex numbers – and so $\lambda=s\in\mathbb{C}$ gives $p=\lambda q$, exactly the result we desired.

Hopefully this argument was all clear; let me know if there's any confusion on your end. And hopefully this seems like a nice result!! It's a vast generalization of the the question you asked, and shows that some of our intuition for one-variable polynomials carries over very nicely to multi-variable polynomials. In particular, when we want to do some geometry and think about curves defined by multi-variable polynomials, we can use some of the same ideas and tools that we use for one-variable polynomials. These multi-variable polynomials and the curves they cut out are some of the central objects of study in classical algebraic geometry. Now, the algebraic results that we had to use – in particular the nullstellensatz – are non-elementary, and there's a decent amount of algebra you'd have to learn before you could prove it in full generality, but hopefully this gives you some motivation to study some higher math in the future!! It's full of beautiful results like this one.


Of course NOT. A simple multiplication by a constant works. More interestingly define an equivalence relation where p1~p2 iff they share exactly the same roots!


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .