$f(a) = 0 \implies (x-a) \mid f(x)$? (polynomial zeros imply factors) Hopefully this is a foolish question with a simple answer.
I've seen it said that, for polynomial $f(x)$
$$
f(a)=0 \iff (x-a) \mid f(x)
$$
I can see the implication from factor to zero: $(x-a) \mid f(x) \implies f(a)=0$, because anything multiplied by zero is zero, and if $x=a$, then $(x-a) = 0$.
But I'm not sure of the converse: $f(a) = 0 \implies (x-a) \mid f(x)$.
If $f(a)=0$, is the only way it can be zero is if it includes a factor $(x-a)$? How can we be sure there isn't some other circumstance that could make it zero? I guess I'm looking for a proof.
Hopefully it is a foolish question and simple answer!
 A: Here is an explicit way of showing it. A general polynomial can be written on the form
$$f(x) = a_0 + a_1x + a_2 x^2 + \ldots + a_n x^n$$
From this we have that $f(x) - f(a)$ is given by
$$f(x) - f(a) = a_1(x-a) + a_2 (x^2-a^2) + \ldots + a_n (x^n - a^n)\tag{1}$$
Now we can try to factor each of the terms above:
$$\begin{align}x^2-a^2 &= (x-a)(x+a)\\x^3-a^3 &= (x-a)(x^2+ax+a^2)\\x^4-a^4 &= (x-a)(x^3+ax^2+a^2x + a^3)\end{align}$$
and in general $x^k - a^k = (x-a)(x^{k-1} + ax^{k-2} + \ldots + a^{k-2}x + a^{k-1})$. This shows that every term on the right hand side of $(1)$ is divisible by $(x-a)$ so in general $(x-a) \mid f(x) - f(a)$. A special case of this is that if $f(a) = 0$ then $(x-a) \mid f(x)$.
A: You can divide $f(x)$ by $(x-a)$ to get $$f(x) = q(x)(x-a) + r(x)$$ where $\deg(r) < \deg(x-a)=1$. Therefore $\deg(r)= 0$ so $r$ is a constant and we can drop the $x$.
Now evaluate at $a$:
$$f(a) = q(a)(a-a) + r$$
The LHS is zero by assumption, the RHS is equal to $r$. Thus $r=0$ and $(x-a)$ divides $f(x)$ without remainder.
$\,$
Edit: It seems to me like you're confused about why polynomial division always works, so here's the proof to clear things up.
Theorem. For any $f(x), g(x) \in \Bbb Q[x]$, $g(x) \neq 0$, there exist $q(x), r(x) \in \Bbb Q[x]$ such that $$f(x) = q(x)g(x) + r(x)$$ and where $\deg(r) < \deg(g)$.
Proof: First, choose any $q(x), r(x)$ such that the above equation is satisfied; i.e. $q(x) = 0, r(x) = f(x).$ If $\deg(r) < \deg(g)$, we are done.
Therefore assume $\deg(r) \geq \deg(g)$. Let $r(x) = r_nx^n + r_{n-1}x^{n-1} + \dots + r_0$, $g(x) = g_mx^m + g_{m-1}x^{m-1} + \dots + g_0$.
Now let $r'(x) = r(x) - x^{n-m}r_ng_m^{-1}g(x)$, let $q'(x) = q(x) + x^{n-m}r_ng_m^{-1}$. Then $\deg r' < \deg r$ (just look at the coefficient of $x_n$) and again we have $$f(x) = q'(x)g(x) + r'(x).$$
If $\deg(r') < \deg(g)$ now, we can stop. If not, repeat the above with $q'$ and $r'$. Because $\deg(r) < \infty$, this procedure must stop after finitely many iterations, so eventually we will have a remainder of degree less than $\deg(g)$.
This concludes the proof.
