Let $\phi : X \rightarrow Y$ be a morphism of affine varieties and let $\phi^\ast : k[Y] \rightarrow k[X]$ be the induced map on coordinate rings. My text says that if $\phi^\ast$ is surjective then $\phi(X)$ is closed in $Y$; the "proof" given is that $\phi(X) = V(\ker \phi^\ast)$. Clearly $\phi(X) \subseteq V(\ker \phi^\ast)$ in general, but how do I get the other direction?
Here's what I have so far:
Consider the maps $\varepsilon_i \in k[X]$ with $\varepsilon_i(x_1, x_2, \ldots x_n) = x_i$. Since $\phi^\ast$ is surjective, there are maps $\gamma_i \in k[Y]$ such that $\varepsilon_i = \gamma_i \circ \phi$. If we let $\gamma = (\gamma_1, \gamma_2, \ldots \gamma_n)$ then $\gamma \circ \phi$ is the identity on $X$, but it's not even clear that the image of $\gamma$ lies in $X$, so I don't know what to do with this.