# Injective map on coordinate ring implies surjective?

Suppose that $f:X\rightarrow Y$ is a morphism between two affine varieties over an algebraically closed field $K$.

I believe that if the corresponding morphism of $K-$algebras, $f^\ast:K[Y]\rightarrow K[X]$ is injective, it is not necessarily true that $f:X\rightarrow Y$ must be surjective but I have yet to come up with a counterexample.

Is there such a counterexample?

-
What definition of affine variety are you using? – Mariano Suárez-Alvarez Oct 23 '12 at 5:17
My definition of an affine variety is a variety that is isomorphic to an irreducible algebraic set. – Victor Oct 24 '12 at 5:54

Consider the inclusion $k[x] \subset k[x, x^{-1}]$. The corresponding map on $k$-points ($k$ algebraically closed) is also an inclusion, namely $\mathbb{A}^1 \setminus \{ 0 \} \subset \mathbb{A}^1$.

-
What is true is that a map of rings is monic iff the corresponding map of affine varieties is an epi —simply because of the anti-equivalence of categories between that of rings and that of affine varieties. In Qiaochu's example, the map of rings is both monic and epic,, so the map of varieties is both monic and epic. – Mariano Suárez-Alvarez Oct 23 '12 at 5:21
In particular, one can fix the statement of the question by replacing surjective by epi, because monomorphism of rings are simply injective maps. – Mariano Suárez-Alvarez Oct 23 '12 at 5:26
Is the fact that k be algebraically closed necessary here? – Victor Oct 23 '12 at 5:33
@Victor: if $k$ isn't algebraically closed, you should clarify what you mean by a surjective map of $k$-varieties. – Qiaochu Yuan Oct 23 '12 at 5:34
This example doesn't work if one defines affine varieties to be isomorphic to irreducible algebraic sets. Is there such a simple example in this case? – Victor Oct 24 '12 at 5:57

Given a morphism of rings $\phi:A\to B$ and the corresponding morphism of affine schemes $\sideset {^a}{} \phi=f:Spec (B)\to Spec(A)$, we have the equivalence: $$f (Spec(B))\: \text {is dense in}\: Spec(A)\iff \text {Ker } (\phi) \subset \text {Nil} (A)$$ From this it is very easy to find injective morphisms of rings $\phi:A\to B$ with associated non surjective morphisms $f:Spec (B)\to Spec(A)$.

For example if $A$ is a domain and $0\neq a\in A$, then the inclusion morphism $\phi:A\to A_a=A[\frac {1}{a}]$ yields the inclusion $\sideset {^a}{} \phi=f:Spec (A_a)\to Spec(A)$, which is not surjective as soon as $a$ is not an invertible element of $A$. (Qiaochu's example is of that type)

-