# If the polynomial $f$ is zero on the nonzero set of another polynomial $g$, does $f=0$?

Suppose $f(x_1,\dots,x_n)$ is a polynomial in $n$ indeterminates over an infinite field $F$. Suppose $f((a_i))=0$ for all $n$-tuples $(a_i)$ such that $g((a_i))\neq 0$, where $g(x_1,\dots,x_n)$ is another nonzero polynomial over $F$. I know that the set of $n$-tuples such that $g$ is nonzero is nonempty.

Does this imply $f=0$?

I'm curious, because it's true when $n=1$. Since $g$ has only finitely many roots, the set of values on which $g$ is nonzero is infinite since $F$ is infinite, but then $f=0$ as $f$ has infinitely many roots. Does the same argument work in arbitrarily many indeterminates, or does more care need to be taken? Thanks.

-
I assume you suppose $g\neq 0$. This is certainly true for $\mathbb R^n$ and $\mathbb C^n$, given that the set of points at which $g$ does not vanish is dense in the metric topology. I haven't thought of an approach for general infinite fields though. I'm tempted to use the dimensions of the affine varieties that make up the zero sets of $f$, but I'm not sure this works when $F$ is not algebraically closed, because I usually assume closure for this type of thing. –  Alex Becker Jul 16 '12 at 4:10
@AlexBecker Yes, I am assuming $g\neq 0$. I mention so in the second sentence, apologies if was not communicated well. –  Son Bi Jul 16 '12 at 4:12
Oh yes, sorry I missed that. –  Alex Becker Jul 16 '12 at 4:13
1) Over an infinite field $F$, a polynomial $f \in F[X_1,\ldots,X_n]$ is $0$ if and only if the corresponding function from $F^n \to F$ is $0$.
2) Over any field $F$, $F[X_1,\ldots,X_n]$ is an integral domain (i.e. if $f g = 0$ then $f=0$ or $g=0$).
Suggestion to Son Bi: The identification $F[X_1,\ldots,X_n]=F[X_1,\ldots,X_{n-1}][X_n]$ is useful. 1) can be proved by induction, and you already have the base case. For 2) you can show that $R[X]$ is an integral domain if $R$ is. –  Jonas Meyer Jul 16 '12 at 4:27