# Complex polynomials vanishing at all real points

Suppose $f \in \mathbb C[X_1,\ldots,X_n]$ is a complex polynomial in $n$ variables such that $f(P) = 0$ for all $P \in \mathbb R^n$. Is then necessarily $f = 0$?

This is certainly true for $n=1$ as a univariate polynomial that vanishes in infinitely many points is the zero polynomial. However, this argument does not immediately generalize to the case $n > 1$, e.g. $f(X,Y) = X-Y$ has infinitely many zeroes but is not the zero polynomial.

-

Induct on $n$. As you said, it's true for $n=1$. For the induction step, write $f(X_1,\ldots, X_n) = \sum_{j=0}^d f_j(X_2,\ldots,X_n) X_1^j$ where $f_j(X_2,\ldots,X_n)$ is a polynomial. If $x_1,\ldots,x_n$ are all real we have $\sum_{j=0}^d f_j(x_2,\ldots,x_n) x_1^j = 0$, which by the $n=1$ case implies $f_j(x_2,\ldots,x_n) = 0$. Then use the induction hypothesis to get $f_j(X_2,\ldots,X_n) = 0$.