Polynomials vanishing and non-intersecting varieties.

Can non-constant polynomials over algebraically closed fields never vanish? No, right?

Thoughts: Take $f(x,y)$, suppose that for whatever $y'$ we plug in for $y$ we find that $f(x,y')=c$, that is it kills the $x$ term. This would mean that $f(x,y)$ is really just a polynomial in $y$ and boom we are done, because a polynomial in one variable has a root in a a.c. field. Suppose that's not the case, i.e. if we plug in some $y'$ we just get a polynomial in $x$, then by same reasoning, the a.c. guarantees a root. Same argument applies to more variables.

So the main task is: given two affine varieties that are disjoint, $V$ and $V'$, construct a regular function that vanishes on $V$ and is constant $c$ on $V'$. In the simplest case we just have that each of these varieties is defined by a single polynomial each, $f$ and $g$, that differ by a constant, such that $f-g=d$. Then the polynomial we want would be $cf/(f-g)$, because for a point on $V$ we know $f=0$ so this gives $0/(-g)$ (and we know $g\neq0$ on $V$ since $V\cap V'= \emptyset$) and for a point on $V'$ we know $g=0$ which gives $cf/f$ (and we know $f\neq0$ on $V'$ since $V\cap V'= \emptyset$) so this is just $c$. However, I am not sure how to generalize this to varieties defined by polynomials that aren't just different by additive constants and then generalize it more so to varieties defined by multiple polynomials.

I mean, can we deduce from the fact if $f-g$ is a polynomial (rather than a constant) that the varieties $f$ and $g$ define intersect? If $f-g$ is a polynomial, then it must vanish thus there are points where $f=g$. However, these points don't necessarily need to be points where $f=g=0$, and thus I don't think the varieties need to intersect necessarily, but I'm not sure.

Thanks!!

-
Could you please state precisely what your question is? If it is "do affine subvarieties of $\mathbb A^n_k$ necessarily intersect", the answer is "no": parallel lines have been with us for a few thousand years. – Georges Elencwajg Mar 31 '13 at 6:07
The answer to the first question is no by induction on the number of variables. I don't understand what the rest of the question has to do with the first question. – Qiaochu Yuan Mar 31 '13 at 6:26
It is easy to show by induction on the number of a variables that a polynomial function over an infinite field does not vanish identically (proven on this site many times). An algebraically closed field is necessarily infinite, so... – Jyrki Lahtonen Mar 31 '13 at 7:15

Suppose $k$ is an algebraically closed field. If $f,g\in k[x,y]$ are nonzero polynomials without a common zero point, then $V(f,g)$ is empty. By Hilbert's Nullstellensatz, $\sqrt{(f,g)}=(1)$, so $(f,g)=(1)$, which means that there exists $u,v\in k[x,y]$ such that $uf-vg=1$. For any constant $c$ take $h:=cuf=cvg+c$, then $h$ vanishes $V:=V(f)$ and is constant $c$ on $V':=V(g)$.
The idea is that if the difference of $f$ and $g$ is a non-constant polynomial, we find $u$ and $v$ such that the difference of $uf$ and $vg$ is 1, while $uf$ also vanishes on $V$ and $vg$ also vanishes on $V'$.
I think this result is also true for any two disjoint affine varieties $V:=V(I),V':=V(I')$ in $\mathbb{A}_k^n$, since you can modify the proof above substituting $f,g$ by $I,I'$.