# If $f(a_1, \ldots, a_n) \mid g(a_1, \ldots, a_n)$ for all $(a_1, \ldots, a_n) \in k^n$ then $f(x_1, \ldots, x_n) \mid g(x_1, \ldots, x_n)$?

For $k$ a field and $f(x_1, \ldots, x_n), g(x_1, \ldots, x_n) \in k[x_1, \ldots, x_n]$ if $f(a_1, \ldots, a_n) \mid g(a_1, \ldots, a_n)$ for all $(a_1, \ldots, a_n) \in k^n$ then $f(x_1, \ldots, x_n) \mid g(x_1, \ldots, x_n)$? This seems to be a naive(?) statement but I can't seem to find a counterexample. Is this even true? Any hints would be appreciated.

• This is true, as a function between sets is exactly determined by its evaluation maps. Commented Sep 5, 2018 at 17:54
• That is very very cool. Commented Sep 5, 2018 at 17:57
• Note that $f(a_1, \dots, a_n) \mid g(a_1, \dots, a_n)$ is nearly always true, since this is divisibility in a field. Only $f(a_1, \dots, a_n) = 0$ is a possible exception. Commented Sep 5, 2018 at 17:59
• @Geoff A polynomial is only determined by its values if the base field is infinite. See Suzet's answer. Commented Sep 5, 2018 at 18:00

This is wrong in any field. $f(X)=X(X-1)^2$ and $g(X)=X^2(X-1)$ have the same zeroes (so $f(a)|g(a)$ and $g(a)|f(a)$ for all $a\in K$) but they do not divide each other.
This is untrue. Consider for instance $p$ a prime number and $k=\mathbb Z / p\mathbb Z$. Consider then the polynomial $f=0 \in k[X]$ and $g=X^p-X\in k[X]$. Then, for every $a\in k$, we have $g(x)=a^p-a=0$ by Fermat's little theorem, so that $f(a)|g(a)$.
However, clearly, we do not have $f(X)|g(X)$, as $g$ is not the zero polynomial.
• Nice! However, is there a counterexample for say $k$ an algebraically closed field? Commented Sep 5, 2018 at 18:05
• What about $X^2\nmid X$? Commented Sep 5, 2018 at 18:15