# Is it possible when multiplying two polynomials that, after collecting similar terms, all terms vanish?

Algebra by Gelfand poses this question with the remarkably unhelpful answer of:

No. Probably this problem seems silly; it is clear that it cannot happen. If you think so, please reconsider the problem several years from now.

I'm sure the mathematical wit is just lost on me, but since you can lose some terms from multiplying, it doesn't seem too far fetched through some mathematical wizardry that there are cases where they all vanish. So why is this?

• Hint: think at the degree of the product of two polynomials.
– dxiv
Apr 13, 2017 at 23:43
• So what I've gotten out of this is that I can think of each polynomial as numbers either equaling 0 for all x, or not. Then you can just think about multiplication between two random numbers and realize that unless one is 0, the result can otherwise never equal 0. Is that kind of on the right track? Apr 14, 2017 at 0:10
• Barry Cipra has the explanation for Gelfand's comment. Israel Gelfand was a top-notch mathematician, and his "silly" comments should not be taken too lightly. His joke is that you can consider polynomials defined on other domains than the complex numbers. Some of those other domains (Barry gives one example) have zero divisors. Apr 14, 2017 at 2:28
• @theideasmith: If you are dealing with a field, it's always true. If in some ring you have two non-zero elements $a$ and $b$ with $ab=0$, then it cannot be a field. Of course there's no requirement that a polynomial must be defined over a field; a ring is completely sufficient. Apr 14, 2017 at 6:40
• @OlaB if only one of them needs to have many terms then you can just use the two usual factors of $(x^{n+1}-1)=(x^n+x^{n-1}+\dots +1)(x-1)$. Over the complex numbers the long term factors fully so by shuffling around the factors you might get some two polynomials with many factors though I would have to look at that some more.
– DRF
Apr 14, 2017 at 11:23

If you are working with polynomials over a ring with zero divisors, such as $\mathbb{Z}/4\mathbb{Z}$, then it is possible for the product of two polynomials to vanish. This may be what Gelfand is coyly alluding to. But in the ordinary sense of polynomials with rational, real, or complex coefficients, the degree of the product is the sum of the degrees of the polynomials being multiplied together.

• For an explicit example, the polynomials $p(x)=q(x)=2x+2$ are nonzero in $\mathbb{Z}/4\mathbb{Z}$, but their product is zero. Apr 14, 2017 at 7:20
• This! ... is hat "several yeras from now" is supposed to mean for the reader of Gelfand Apr 14, 2017 at 8:09
• I don't think that this is stuff for "several years later". At least in my case, we did that in the first term linear algebra course... Apr 14, 2017 at 8:11

Just look at the highest-order coefficient $-$ it can't be zero, because it is the product of the highest-order coefficients of $p$ and $q$.

• @WGroleau What's summed is orders, but the coefficients of the highest-order terms are multiplied as stated.
– J.G.
Apr 14, 2017 at 15:30
• Oops, yeah, I was thinking of order (exponent). Apr 14, 2017 at 17:51

Consider the zero polynomial $p(x)=0$, then certainly multiplying any real polynomial by $p(x)$ yields $0$.

For a polynomial with $\deg\geq0$, over some field $\mathbb{F}$, this is not possible.

Consider the general polynomial of the form:

$$p(x)=a_nx^n+a_{n-1}x^{n-1}+...+a_2x^2+a_1x+a_o$$

For $a_n$ having real or complex coefficients.

Clearly, as you multiply two polynomials, the $\deg$ of each term increases, except for the constant case, which yields a proportional polynomial.

So we can simply say, for all $x\in \mathbb{R}$, such that two real polynomials $p(x)g(x)=0$ implies $p(x) \ or \ g(x)=0$.

• I don't know if this is a polynomial, math definitions of things are still hard for me to read, but what about 0x^3+0x^2+0, is that just not a polynomial? Apr 13, 2017 at 23:59
• Yes, the above is a generalization of a polynomial. Your example is absolutely a polynomial, we call that the zero polynomial as stated above, because $p(x)=0$. Apr 14, 2017 at 0:03
• A small nitpick: a polynomial with degree $0$ is constant, not zero. So your condition should be $\deg \ge 0$. (The only sensible definition for the degree of the zero polynomial is $-\infty$.) I agree that what you wrote is not false, but it is misleading. Apr 14, 2017 at 1:13
• You might want to specify that your answer only holds for polynomials over fields, which is almost surely what Gelfand is referring to. Otherwise it's not so "clear" that the degree of the product of polynomials always increases when you multiply.
– Josh
Apr 14, 2017 at 8:20
• The only problem with saying that deg(0)=0 is that it breaks the rule that deg(PQ) = deg(P) + deg(Q). Defining deg(0) as negative infinity resolves this. Apr 14, 2017 at 8:58

Hint: Try to consider the product of two linear terms: $(ax+b)(cx+d)$ where $a,b,c,d$ are real numbers with $a,c$ being nonzero. When expanding and simplifying (collecting like terms), for which terms is it possible for those terms to have coefficients of zero?

After answering this, can you generalize this to the product of any two non-zero polynomials of any degree?

EDIT: There is the slight issue of distinguishing polynomials and polynomial functions. One may consider two polynomials as equal if and only if their corresponding coefficients are equal. On the other hand, one may consider two polynomials as equal if and only if they are equal as functions (i.e. polynomials $p,q$ are equal if and only if $p(x) = q(x)$ are equal for all $x$).

It turns out that for polynomials in $\mathbb{R}$, we don't need to worry about such a distinction (although you would need to if you were dealing with polynomials over a ring as Barry Cipra mentioned in his answer). It may be a good exercise to show that two polynomials are equal over $\mathbb{R}$ if and only if they are equal as polynomial functions.

• @MarkPineau I'm not sure what you are referring to; I haven't made any claims or statements in my answer, so there isn't anything "true" or "false" about what I said. As for my answer, I'm going under the assumption that the OP is talking about "formal polynomials" where the $x, x^2, \dots,$ serve as formal symbols as opposed to the "polynomial function" associated with the polynomial. Apr 14, 2017 at 0:43

If our two polynomials are $P(x_1,x_2,\cdots, x_n)$ and $Q(x_1,x_2,\cdots, x_n)$, this means $P(x_1,x_2,\cdots, x_n)\cdot Q(x_1,x_2,\cdots, x_n) = 0.$ If neither of these polynomials are the zero polynomial, there must exist some set $(x_1,x_2,\cdots, x_n)$ such that neither polynomial evaluates to $0$ there. Then $P\cdot Q \neq 0$.

• So all these answers are using the conditional $p, q \neq 0$, does that mean the author's answer is wrong, in a pedantic kind of way? Apr 14, 2017 at 0:03
• @Patrick Kinda. The statement that "all terms vanish" seems to me to imply that there are terms in the expansion the first place, meaning that neither polynomial is the zero polynomial. Apr 14, 2017 at 0:04
• Right, that seems fair to me. Apr 14, 2017 at 0:11
• How do you prove that "there must exist some set $(x_1,x_2,,\dots,x_n)$ such that neither polynomial evaluates to 0 there"? It seems to me that this is the central point, and it is almost equivalent to the given problem. Apr 14, 2017 at 7:19
• @FedericoPoloni is right: If you work in a finite field $\mathbb{F}$, it can occur that even though $P(x)$ is not the zero polynomial, any possible choice of particular value $x$ (from $\mathbb{F}$) leads to the polynomial evaluating to zero (in $\mathbb{F}$) there. So the answer is not correct. As other answers explain, as long as $\mathbb{F}$ is a field (or more specifically has no zero divisors), we can still look at the most significant terms in the two polynomials and conclude that their product term will not vanish. So the degree-of-product formula still holds. (Poloni: "equivalent"?) Apr 14, 2017 at 23:37

I like the way you wrote your question. But think about this: If $p \not \equiv 0$ is a polynomial, then $|p(x)|>0$ for $|x|$ large. So if $p,q$ are two polynomials, neither identically $0,$ then $|p(x)q(x)| > 0$ for large $|x|.$

• I think you also need $\text{deg}(p) \geq 1$ Apr 19, 2017 at 20:06
• No, constant polynomials that aren't $0$ fit right in.
– zhw.
Apr 19, 2017 at 20:39

Additional to Barry Cipra's answer I want to mention that it also depends on whether you consider the formal polynomial ring or the ring of polynomial functions. In $\mathbb{Z}/2\mathbb{Z}$ the formal polynomial $X+X^2$ has non-vanishing coefficients, but is equal to the zero polynomial function, as $1^2+1=1+1=0$. Hence for $p(X)=X,q(X)=1+X$ we may associate the polynomial functions $\tilde p,\tilde q: \mathbb{Z}/2\mathbb{Z}\to \mathbb{Z}/2\mathbb{Z}$ for which holds $\tilde p \neq 0 \neq q$, but $\tilde p \cdot \tilde q = 0$. So in some sense the coefficients "vanish".

• If the map from formal polynomials to their associated polynomial functions fails to be injective, as happens over finite rings as in this example, there is (for exactly that reason) no notion of coefficients of a polynomial function. So it is a bit misleading to say the coefficients "vanish" in the product. Apr 16, 2017 at 13:16
• That's why I have stated this issue as careful as possible starting with "in some sense" and putting vanish in quotes ;) Apr 16, 2017 at 13:19

If one of the polynomials is zero, then the product will be zero. Assuming henceforth that you are talking about the product of two nonzero polynomials, then you must first consider what happens in the base ring where the coefficients of the polynomials live; the subset of constant polynomials if you like. Some coefficient rings admit zero divisors: nonzero elements $a,b$ whose product is zero. Example are the rings of integers modulo a composite number, direct products of at least two nontrivial rings, or rings of square matrices of size$~n>1$ (which will have zero divisors even if the coefficients are taken in a ring without zero divisors). (If you have never heard of such rings, please reconsider several years from now.) If the base ring admits zero divisors, then clearly a ring of polynomials over it will do so as well.

Once you have understood these examples, you will see that the interesting question to ask is: if a ring$~R$ (which you may assume to have commutative multiplication to keep it simple, though it actually has little bearing on this question) has no zero divisors (such rings are called integral domains), does it follow that a ring of polynomials with coefficients in$~R$ is also an integral domain? The answer is yes. The most interesting case of the ring $R[X]$ of polynomials in a single indeterminate$~X$ (more general cases easily follow from this special case). In the contributions to the product of two nonzero polynomials there may be terms that completely cancel out. There are however two kinds of contribution for which there is never cancellation because they are unique in their degree, namely the product of the lowest degree (nonzero) terms of each factor, and the product of the highest degree terms of each factor. Consideration of either of these cases shows that the product of two nonzero polynomials in $X$ over an integral domain cannot be (entirely) zero. (Note that is both factors have only one term, then these two cases coincide, which is why I avoided saying that there are two contribution that can never cancel out.)

Almost everybody proving that a polynomial ring over an integral domain is an integral domain uses the highest degree terms (mentioning leading terms, degrees of the polynomials, etc.), since often this term of a polynomial is of special interest for other reasons. However I wanted to mention that the lowest degree terms can be used just as well. Not because they provide a better argument for the statement for polynomial rings, but one that better generalises, for instance to the ring $R[[X]]$ of formal power series and to the ring of Laurent series; indeed these kinds of rings are also integral domains whenever $R$ is. In such rings there is no notion of leading term because there is no bound on the degrees of their terms; they do however have a notion of lowest degree terms of nonzero elements.

Consider two polynomials. If both are nonzero, then each has a finite number of zeros. Thus there must be a point $x_0$ such that $f(x_0)$ and $g(x_0)$ are nonzero. Then $f(x_0)g(x_0)$ is nonzero. Thus their product cannot be zero.

Absolutely you can!

0x^2 + 0x + 0 times 0x^2 + 0x + 0 for example. :)

But think about it, it is the same reason you cannot multiply any numbers and get 0, unless one of them is 0. Multiplication by any number of different variables added, is sum of every possible combination of them...

Better Proof...

Suppose you have two polynomials of x that multiply to 0:

ax^n + bx^(n-1) + cx^(n-2) ...

times

Ax^h + Bx^(h-1) + Cx^(h-2)...

with a and A being the leading nonzero coefficients of each.

When you start to multiply these there will be one and only one combination that multiplies to aAx^(h+n). Since the result must always be 0 this term needs to be 0x^(h+n) and either a or A is 0. Contradiction!

If you had zero'd out, say ax^n you would now have an Abx^(h+n-1) which is the multiplication of only two terms, and either A or b must be 0, and so on...

Furthermore, this proof actually works in reverse... for the least term (...x^2 + x + 1 ) * (...x^2 + x + 1 ) can never have a 0 ones term unless there is no lone number, in one or the other polynomial. Same for any least term combination.

• And sums of non-zero numbers can be zero, so you need another argument. I do no think that this was the question, though. Apr 15, 2017 at 17:05
• Found a proof that works around that... the first and last will never be subtractable. Apr 16, 2017 at 2:45

Sure, if the polynomials are piecewise defined. Let p(x)={x^2, x>0; 0,x<0}, q(x)={x^3,x<=0;0,x>0}. But these wouldn't be polynomials in the strict definition.

• Not sure why the downvotes. Most textbook definitions are too imprecise to rule out the possibility of piecewise polynomials. The question as posed certainly doesn't. Apr 17, 2017 at 17:36