# Surjective map on coordinate rings implies the map is injective

Let $X$ and $Y$ be affine varieties and $f: X \rightarrow Y$ a polynomial map. If the induced map on coordinate rings $K[Y] \rightarrow K[X]$ is surjective why this implies that $f$ is injective?

-

If $x\neq x'\in X$, then there exists $\phi\in K[X]$ with $\phi(x)=0$ and $\phi(x')=1$.
Let $\phi= f^\ast \psi=\psi\circ f$ for some $\psi \in K[Y]$ (surjectivity hypothesis).
Then $\psi( f(x))=(f^\ast \psi)(x)=\phi(x)=0$ whereas $\psi( f(x'))=(f^\ast \psi)(x')=\phi(x')=1$, and of course the inequality $\psi( f(x))\neq \psi( f(x'))$ forces $f(x)\neq f(x')$.
 why such $\phi$ exists? – user31509 May 20 '12 at 8:01 Since $X$ is affine, we have $X\subset A^n$ for some $n$. Since $x=(a_1,...,a_n) \neq x'=(a'_1,...,a'_n)$, some coordinate of $\mathbb A^n$ is different for those two points: say $a_1\neq a'_1$. You may then take $\phi(t_1,...,t_n)=\frac {t_1-a_1}{a'_1-a_1}$ – Georges Elencwajg May 20 '12 at 8:51
I'll assume you understand the correspondence between maximal ideals of $K[X]$ and points of $X$. I'll also assume the base field $k$ is algebraically closed. Then, for every point $p$ of $X$, there is a unique $k$-algebra homomorphism $\epsilon_p : K[X] \to k$ corresponding to $p$. We compose this with the pullback map $f^* : K[Y] \to K[X]$ to $\epsilon_{f (p)} : K[Y] \to k$. Now, suppose $f (p) = f (p')$. Then $\epsilon_{f (p)} = \epsilon_{f (p')}$, but then that means $\epsilon_p \circ f^* = \epsilon_{p'} \circ f^*$, and hence, $\epsilon_p = \epsilon_{p'}$ if $f^*$ is surjective. But that implies $p = p'$, so $f$ is injective.