# Matching of polynomial coefficients

I am trying to find the proof/theorem that states:

Given two polynomials in x, if they are equal to eachother, their coefficients must also be equal

For example, in

ax^3 + bx^2 + cx + d = ex^2 + fx + g

a MUST equal 0, and b must equal e, etc...

Does anyone have the actual proof stating this? Thank you!

-
What happens if you start giving values to $x$? Set $x=0$, $x=1$... –  N. S. Oct 13 '11 at 21:52

Set $x=0$ and get $0+0+0+d=0+0+g$ so $d=g$. Subtract $d=g$ from both sides, cancel off $x$, and continue...

-
Yeah I think this is the proof maybe just note that polynomials by definition have a finite number of non-zero co-efficients –  user9352 Oct 13 '11 at 22:11
Thank you! Exactly what I needed! –  staticfloat Oct 14 '11 at 1:03

It's the same thing as saying that if a polynomial is equal to the zero polynomial then its coefficients must all be zero. That can be proved a number of ways. For example, if the constant term is not zero, then the polynomial is not zero at zero, so it isn't the zero polynomial; if the constant term is zero, you can factor a power of the variable out of the polynomial to get one where the constant term is not zero, reducing to a problem already solved.

-
@J.M., thanks for the edit. –  Gerry Myerson Oct 14 '11 at 1:27
That's because I care. ;) And apparently I forgot to upvote, so there you go... –  Ｊ. Ｍ. Oct 14 '11 at 1:30
The only reason I didn't choose your answer was because the other answer was more concise. Thank you for taking the time to answer! –  staticfloat Oct 14 '11 at 4:30

In a general field, the Vandemonde determinant tells all.

-
I'm not familiar with that term, can you provide me with a reference? –  staticfloat Oct 14 '11 at 1:03

$$p(x)=a_nx^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0\sim b_nx^n+b_{n-1}x^{n-1}+\cdots+b_1x+b_0=q(x).$$

If I want these to be equal I want their outputs to be equal and in particular at $x=0$:

$$p(0)\overset{!}{=}q(0)\Rightarrow a_0=b_0.$$

Also I want all of their derivatives to be equal if they are to be equal. Direct calculation shows that

\begin{align} p'(x)&=a_1+\mathcal{O}(x) \\ p''(x)&=2a_2+\mathcal{O}(x) \\ \vdots& \\ p^{(k)}(x)&=k!a_k+\mathcal{O}(x), \end{align} and similarly $$q^{(k)}(x)=k!b_k+\mathcal{O}(x).$$

Setting $$p^{(k)}(0)\overset{!}{=}q^{(k)}(0)\Rightarrow k!a_k=k!b_k\Rightarrow a_k=b_k,$$ for all $k$.

-