Suppose that $k$ is an algebraically closed field, and let $\mathbb{A}^2$ denote the affine $2$-space $k^2$.
An affine scheme is defined to be a locally ringed space $(X, \mathcal{O}_X )$ which is isomorphic (as locally ringed spaces) to the spectrum of some ring.
Then is $\mathbb{A}^2$ an affine scheme? Is it isomorphic (as locally ringed spaces) to the spectrum of the polynomial ring $k[x,y]$?
Let $\mathbb{A}^2_k = \operatorname{Spec}k[x,y]$, and $\phi: \mathbb{A}^2 \rightarrow \mathbb{A}^2_k, (a,b) \mapsto \langle x-a, y-b \rangle$, then $\phi$ injects $\mathbb{A}^2$ to the set of maximal ideals of $k[x,y]$, i.e., the set of closed points of $\mathbb{A}^2_k$. I see that $0$, as a prime ideal of $k[x,y]$, is also a point in $\mathbb{A}^2_k$, but it does not lie in $\phi(\mathbb{A}^2)$. The Krull dimension of $k[x,y]$ is $2$, so beside $0$ and maximal ideals, there is still another kind of prime ideals in $k[x,y]$. In fact, any irreducible polynomial $f(x,y) \in k[x,y]$ generates a prime ideal $\langle f(x,y) \rangle$. In a word, $\phi$ is not surjective. Can it still be the map of topological spaces in the isomorphism of ringed spaces? The definition for such isomorphism says that the map of topological spaces should be a homeomorphism. Can a non-surjective map be a homeomorphism? Or, is there any other way to define the map?
Thank you very much.
Edited: I neglected the condition of $k$ being algebraically closed, and I thought the denotation $\mathbb{A}^2$ is generally known. I add these in the front. Sorry for the misunderstanding :)
I assume by $\mathbb{A}^2$ you mean the "classical" affine plane over $k$. This can't be homeomorphic to the underlying topological space of the scheme $\mathbb{A}_k^2=\mathrm{Spec}(k[x,y])$ because the latter has a non-closed "generic" point for each irreducible closed subset. When $k$ is algebraically closed (in which case all the maximal ideals of $k[x,y]$ are of the form $(x-a,y-b)$ for $a,b\in k$), the topological space $\mathbb{A}^2$ is homeomorphic to the set of closed points of $\mathbb{A}_k^2$. Basically the scheme $\mathbb{A}_k^2$ is obtained from $\mathbb{A}^2$ by throwing in a generic point for each irreducible closed subset. A detailed explanation of this (making things precise, at least for $k$ algebraically closed) can be found in the second chapter of Hartshorne. Specifically, see Proposition 2.6, where a fully faithful functor from "classical varieties" over $k$ to $k$-schemes is constructed.