Q:

A polynomial $p(x,y)$ that is never $0$ if $y\neq 0$

I would like to find the best proof of the following fact:
If a polynomial $p\in k[x,y]$ (where $k$ is an algebraically closed field) is such that $p(a,b)\neq 0$ on the set $\{(a,b):b\neq 0\}$, then in fact $p\in k[y]$ (that is, $p$ does not depend on $x$). I do know how to prove this using an argument with a Vandermonde matrix, but I feel that there should be a more direct way to do it.

A:

Write
\begin{align*}
p(x, y) = a_n(y) x^n + \cdots + a_1(y) x + a_0(y)
\end{align*}
for some $a_i\in k[y]$. For any fixed nonzero $b\in k$, the polynomial $p(x, b)\in \overline{k}[x]$ has no zeros and must be constant. Thus the $a_i(b)$ for $i\not =0$ all vanish for $b\not = 0$. But $\overline{k}$ is algebraically closed and thus infinite, forcing all $a_1, \dots, a_n$ to vanish identically.

