Why does $p(a)=0$ imply $(x-a) \mid p$? There's something I've never understood about polynomials.
Suppose $p(x) \in \mathbb{R}[x]$ is a real polynomial. Then obviously,
$$(x-a) \mid p(x)\, \longrightarrow\, p(a) = 0.$$
The converse of this statement was used throughout high school, but I never really understood why it was true. I think maybe a proof was given in 3rd year university algebra, but obviously it went over my head at the time. So anyway:

Question. Why does $p(a)=0$ imply $(x-a) \mid p(x)$?

I'd especially appreciate an answer from a commutative algebra perspective.
 A: Hint: using Division Algorithm, you have:
$$p(x)=(x-a)q(x)+r $$ 
$$0=p(a)=r$$    

Edition: (by comment of Marc van Leeuwen). definition from "Cox D., Little J., O'Shea D. Ideals, Varieties, and Algorithms "

A: The proof using the division algorithm is a good one. Here is a more direct approach.
Note that $x^r-a^r=(x-a)(x^{r-1}+ax^{r-2}+a^2x^{r-3} \dots +a^{r-1})=(x-a)p_r(x)$ where $(x-a)$ is a factor.
Let $p(x)=c_rx^r+c_{r-1}x^{r-1}+\dots +c_0$. We are given $p(a)=0$ so $$p(x)=p(x)-p(a)=c_r(x^r-a^r)+c_{r-1}(x^{r-1}-a^{r-1})+\dots+c_0-c_0=(x-a)\left(c_rp_r(x)+c_{r-1}p_{r-1}(x)+\dots+c_1\right)$$
A: You can also understand division by $(x-a)$ as follows:
Take a polynomial
$$P(x) = \sum c_k x^k$$
Plug in $x+a$ instead of $x$. You get a new polynomial in $x$, $P(x+a) = \sum_k c_k (x+a)^k = \sum_k d_k x^k$
that is
$$P(x+a) = \sum d_k x^k$$
Now in the last equality instead of $x$ plug in $x-a$. You get
$$P(x) = \sum_{k=0}^n d_k (x-a)^k$$
This is important, you can expand $P(x)$ as a sum of powers of $(x-a)$. Now if you plug in the value $x=a$ above you get 
$$P(a) = d_0$$
since all the other terms are $0$. So what you have is 
$$P(x) = d_0 + (\sum_{k\ge 1} d_k (x-a)^k) = P(a) + (x-a) \cdot (\sum_{k\ge 1} d_k (x-a)^{k-1})$$
Here is your division by $(x-a)$. 
Now you see: if $P(a) =0$ then $P(x)$ is indeed divisible by $(x-a)$.
A: if $(x-a)$ does not divide $p(x)$, then every linear factor of $p(x)$ is not equal to $x-a$, that is, $p(a)$ is product of nonzero (complex) numbers, therefore $p(a) \neq 0$
A: Here's what helped make this intuitive for me when I took undergraduate abstract algebra:
You can always try to divide a polynomial by another polynomial. There is a division algorithm.
Of course, the division might not come out evenly, and there might be a remainder. But what would that remainder look like?
