Existence of a root in $k[x_1, \ldots, x_n]$

Prove the following:

If $k$ is an algebraically closed field and $f(x_1, \ldots, x_n) \in k[x_1,\ldots, x_n]$ is non-zero, then there exists $(a_1, \ldots, a_n)\in k^n$ s.t $f(a_1, \ldots, a_n) = 0$. I am supposed to prove this without the use of any large theorem and just from elementary principles.

I thought I had a proof for it, but realized that it did not cover all cases. I then tried an inductive argument, but it wasn't working as well as I had hoped.

-
Maybe this could help: $k[x_1,\ldots,x_n]=k[x_1,\ldots, x_{n-1}][x_n]$. –  Sigur Jan 16 '13 at 23:20
The basic idea is that you let $n-1$ of the variables be arbitrary, then solve for the remaining variable. The hitch is that when you assign values to the $n-1$ variables, the polynommial could vanish identically. But you win in that case, too. –  Gerry Myerson Jan 16 '13 at 23:21
@Gerry And what about the possibility that the polynomial is identically constant $\ne 0$ under all specializations? E.g. $f = 1$ is a counterexample. –  Math Gems Jan 17 '13 at 3:31
@MathGems This is the problem I was having with my argument. I assigned n-1 variables to be arbitrary, but realized the constant case was a hitch –  Math2012pc Jan 17 '13 at 4:05
@MathGems, welcome back, haven't seen you here for a while. Yes, non-zero constants would seem to be a bit of a worry. If $f$ is not constant, then presumably you can find some variable $x_k$ and some number $c$ such that if you set $x_k$ to $c$ you still get a non-constant polynomial, and then proceed by induction. But I admit that's a handwave, not a proof. I knew there was a reason I felt more comfortable leaving a comment than an answer! –  Gerry Myerson Jan 17 '13 at 4:50

The correct hypothesis is $f$ non-constant (non-zero is not sufficient as pointed out in the comment by MathGems, and it is also useless because otherwise there is nothing to prove).
Let us prove the following statement by induction on $n$:
If $f\in k[x_1,\dots, x_n]\setminus k$, there exists $a=(a_1, \dots, a_n), b=(b_1, \dots, b_n)\in k^n$ such that $f(a)=0$ and $f(b)\ne 0$.
The statement is clear when $n=1$.
Suppose $n\ge 2$ and the statement true in $\le n-1$ variables. We can suppose $f\notin k[x_1,\cdots, x_{n-1}]$ (otherwise we are done). Write $$f=g_d(x_1,\dots, x_{n-1})x_n^d+\cdots + g_1(x_1, \dots, x_{n-1})x_n+ g_0(x_1, \dots, x_{n-1}), \quad d\ge 1, \ g_d\ne 0.$$ Let $b'\in k^{n-1}$ be such that $g_d(b')\ne 0$. Then the polynomial $f(b',x_n)\in k[x_n]\setminus k$ has a zero $a_n$ and a non-zero $b_n$. So $a:=(b',a_n)$, $b:=(b', b_n)$ satisfy the desired properties.