[proofplan]
By definition, the coordinate ring of [affine space](/page/Affine%20Space) is the [polynomial ring](/page/Polynomial%20Ring) modulo the ideal of polynomials vanishing on every $k$-rational point of $k^n$. Thus the only point to prove is that this vanishing ideal is zero. We prove the required vanishing statement by induction on the number of variables, using the elementary fact that a nonzero one-variable polynomial over a field has only finitely many roots. Since $k$ is infinite, a polynomial vanishing at every point of $k^n$ must therefore have all of its coefficients equal to zero.
[/proofplan]
[step:Set up the vanishing ideal whose quotient defines the coordinate ring]
Let
\begin{align*}
R:=k[x_1,\ldots,x_n].
\end{align*}
Let
\begin{align*}
V:=k^n
\end{align*}
be the underlying set of $\mathbb{A}^n_k$. Define the vanishing ideal
\begin{align*}
I(V):=\{f \in R : f(a)=0 \text{ for every } a \in V\}.
\end{align*}
By the definition of the coordinate ring of an affine algebraic set,
\begin{align*}
k[\mathbb{A}^n_k]=R/I(V).
\end{align*}
It remains to prove that $I(V)=\{0\}$.
[/step]
[step:Prove that a polynomial vanishing on all of $k^n$ is zero]
[claim:Vanishing on all points over an infinite field forces a polynomial to be zero]
Let $m \in \mathbb{N}$, and let
\begin{align*}
S_m:=k[t_1,\ldots,t_m].
\end{align*}
If $p \in S_m$ satisfies
\begin{align*}
p(a_1,\ldots,a_m)=0
\end{align*}
for every $(a_1,\ldots,a_m)\in k^m$, then $p=0$ in $S_m$.
[/claim]
[proof]
We argue by induction on $m$.
For $m=1$, write $S_1=k[t_1]$. If $p \in k[t_1]$ is nonzero, then its degree $d:=\deg p$ is a nonnegative integer. The elementary root bound for one-variable polynomials over a field says that $p$ has at most $d$ roots in $k$. Since $k$ is infinite, $k$ has more than $d$ elements, so $p$ cannot vanish at every element of $k$. Hence a polynomial in $k[t_1]$ vanishing on all of $k$ must be zero.
Assume the statement holds for $m-1$, where $m \geq 2$. Let $p \in k[t_1,\ldots,t_m]$ vanish on every point of $k^m$. Regard $p$ as a polynomial in the last variable $t_m$ with coefficients in $k[t_1,\ldots,t_{m-1}]$. Thus there are polynomials $c_0,\ldots,c_d \in k[t_1,\ldots,t_{m-1}]$, with $d \in \mathbb{N}\cup\{0\}$, such that
\begin{align*}
p=\sum_{j=0}^{d} c_j t_m^j.
\end{align*}
Fix a point
\begin{align*}
b:=(b_1,\ldots,b_{m-1}) \in k^{m-1}.
\end{align*}
Define the one-variable polynomial
\begin{align*}
p_b:k \to k,\quad \lambda \mapsto p(b_1,\ldots,b_{m-1},\lambda).
\end{align*}
Equivalently, as an element of $k[t_m]$,
\begin{align*}
p_b(t_m)=\sum_{j=0}^{d} c_j(b)t_m^j.
\end{align*}
Since $p$ vanishes on every point of $k^m$, the polynomial $p_b$ vanishes at every $\lambda \in k$. By the already proved one-variable case, $p_b=0$ in $k[t_m]$. Therefore every coefficient of $p_b$ is zero:
\begin{align*}
c_j(b)=0
\end{align*}
for every $j \in \{0,\ldots,d\}$.
The point $b \in k^{m-1}$ was arbitrary, so each coefficient polynomial $c_j$ vanishes on every point of $k^{m-1}$. By the induction hypothesis applied to $c_j \in k[t_1,\ldots,t_{m-1}]$, we get $c_j=0$ for every $j \in \{0,\ldots,d\}$. Hence
\begin{align*}
p=\sum_{j=0}^{d} 0\cdot t_m^j=0.
\end{align*}
This completes the induction.
[/proof]
[guided]
The key issue is that a polynomial in several variables can be evaluated pointwise on $k^m$, but we need to conclude an algebraic statement: all of its coefficients are zero. We prove this by reducing the number of variables one at a time.
First consider $m=1$. Let $p \in k[t_1]$ vanish at every element of $k$. If $p$ were nonzero, then $d:=\deg p$ would be a nonnegative integer. A nonzero one-variable polynomial over a field has at most as many roots as its degree. Since $k$ is infinite, there are more than $d$ elements of $k$, so $p$ cannot vanish at every element of $k$. Therefore the only polynomial in $k[t_1]$ that vanishes on all of $k$ is the zero polynomial.
Now assume the result is known for $m-1$ variables, where $m \geq 2$. Let $p \in k[t_1,\ldots,t_m]$ vanish on every point of $k^m$. We isolate the final variable $t_m$ and treat the other variables as coefficients. Thus there exist polynomials
\begin{align*}
c_0,\ldots,c_d \in k[t_1,\ldots,t_{m-1}]
\end{align*}
for some $d \in \mathbb{N}\cup\{0\}$ such that
\begin{align*}
p=\sum_{j=0}^{d} c_j t_m^j.
\end{align*}
Fix
\begin{align*}
b:=(b_1,\ldots,b_{m-1}) \in k^{m-1}.
\end{align*}
After substituting $t_i=b_i$ for $1 \leq i \leq m-1$, we obtain a one-variable polynomial in $t_m$:
\begin{align*}
p_b(t_m)=\sum_{j=0}^{d} c_j(b)t_m^j.
\end{align*}
The hypothesis on $p$ says that
\begin{align*}
p_b(\lambda)=p(b_1,\ldots,b_{m-1},\lambda)=0
\end{align*}
for every $\lambda \in k$. By the one-variable case, this forces $p_b=0$ in $k[t_m]$. Equality to the zero polynomial in $k[t_m]$ means each coefficient is zero, so
\begin{align*}
c_j(b)=0
\end{align*}
for every $j \in \{0,\ldots,d\}$.
Because the point $b \in k^{m-1}$ was arbitrary, each coefficient polynomial $c_j$ vanishes at every point of $k^{m-1}$. The induction hypothesis now applies to each map of coefficients $c_j \in k[t_1,\ldots,t_{m-1}]$, giving
\begin{align*}
c_j=0
\end{align*}
for every $j \in \{0,\ldots,d\}$. Substituting these zero coefficients back into the expansion of $p$ gives
\begin{align*}
p=0.
\end{align*}
Thus every polynomial in $m$ variables that vanishes on all of $k^m$ is zero, completing the induction.
[/guided]
[/step]
[step:Identify the quotient with the polynomial ring]
Apply the claim with $m=n$, $t_i=x_i$ for each $i \in \{1,\ldots,n\}$, and $p=f \in R$. If $f \in I(V)$, then $f(a)=0$ for every $a \in k^n$, so the claim gives $f=0$ in $R$. Hence
\begin{align*}
I(V)=\{0\}.
\end{align*}
Therefore
\begin{align*}
k[\mathbb{A}^n_k]=R/I(V)=R/\{0\}.
\end{align*}
The canonical quotient map
\begin{align*}
q:R \to R/\{0\}
\end{align*}
has kernel $\{0\}$ and is surjective by definition of quotient. Hence $q$ is a $k$-algebra isomorphism. Since $R=k[x_1,\ldots,x_n]$, this gives the canonical $k$-algebra isomorphism
\begin{align*}
k[\mathbb{A}^n_k]\cong k[x_1,\ldots,x_n].
\end{align*}
[/step]