This is an exercise of Advanced linear algebra of Steven Roman:
Let $F$ a finite field and $p(x)\in F[x]$ a nonconstant polynomial such that $p(r)=0$. Show that $x-r$ is a factor of $p(x)$.
This exercise appear after some theory of cyclic decomposition of torsion modules over PIDs, however I dont have any clue about how to show that. Also I dont found anything useful from previous chapters of the book to solve this question.
My first idea was trying to see if $F[x]$ is a PID, what would imply that each ideal is principal, and so, as a $F[x]$ module, it would imply that the submodule defined by $S_r:=\{p(x)\in F[x]: p(r)=0\}$ would be cyclic, finishing the proof. However it seems not the case that $F[x]$ is a PID, otherwise $x-r$ and $p(x)$ would be associated, meaning that $p(x)=u(x)(x-r)$ where $u(x)$ is a unit (that is, that have inverse).
Im really stuck with this exercise, some help will be appreciated, thank you.
NOTE: this doesn't answer my question, because it doesn't show why $x-r\mid p(x)$. Searching for proofs about the division algorithm on polynomial rings it seems that it just hold whenever the ring is an integral domain, however nothing related to this topic is stated in the book, so I assume that it may exist a different way to answer the question.