Fields of polynomials . Proving that a belongs to k as a root if $f(x)\in k[x]$, where $k$ is a field, then $a\in k$ is a root of $f(x)$ iff $x-a$ divides $f(x)$ in $k[x]$.
My result ...
If $a$ is a root of $f(x)=q(x)(x-q)$ and if we let $f(x)=q(x)(x-a)$,then evaluating at $a$ gives $f(a)=q(a)(a-a)=0$. 
Hence by definition, if $f(x) \in k[x]$, where $k$ Is a field, then a root of $f(x)$ in $k$ is an element $a \in K$ with $f(a)=0$.
Proof clarification please.
 A: It sounds like the question your trying to answer is the following:

Say that an element $a \in k$ is a root of a polynomial $f(x)$ over $k$ if $f(a) = 0$. Prove that $a$ is a root of $f(x)$ if and only if $(x-a)\mid f(x)$.

Your proof doesn't really make sense. Here's a few notes:


*

*You first assume $a$ is a root of $f(x)$, which by the above definition only says that $f(a) = 0$. You seem to be assuming that $f(x)$ is taking the special form $f(x) = q(x)(x-q)$, which is quite ambiguous. It looks like you're using $q$ to denote both a polynomial (for the first factor $q(x)$) and an element of $k$ (when you write $x-q$ for the second factor).

*You then "let" $f(x) = q(x)(x-a)$, which isn't a valid thing to do since you're essentially assuming the consequent. In other words, based on your first assumption that $f(a) = 0$, you should be proving (not assuming) that $f(x) = q(x)(x-a)$ (or in other words $(x-a)\mid f(x)$).

*On the other hand, you can prove the reverse implication ($(x-a) \mid f(x) \implies f(a) = 0$) using an argument that's pretty close to what you've written, but if you meant to prove this, then your current proof still needs some work. (Get rid of the part where you assume $a$ is a root of $f(x)$ and also the equation $f(x) = q(x)(x-q)$, and you'll be well on your way.) I've written a rough proof of this half of the implication below using a spoiler tag.



 Assume $(x-a)\mid f(x)$. Then there exists a polynomial $q(x)$ with coefficients in $k$ such that $f(x) = q(x)(x-a)$. Evaluating at $x = a$ we find $f(a) = q(a)(a-a) = q(a)\cdot0 = 0$, and so $a$ is a root of $f(x)$.

Again, for the converse direction, you need to assume $f(a) = 0$ and show that this implies that $f(x)$ can be written as $f(x) = q(x)(x-a)$ for some polynomial $q(x)$ over $k$. I've provided a hint below.

 Hint: Use polynomial division to rewrite $f(x) = q(x)(x-a) + r(x)$ where either $r(x) = 0$ or $\deg(r) < 1$.

