Dominant morphism between affine varieties induces injection on coordinate rings? Here are the definitions that we use for this problem:


*

*A morphism $\varphi : X \to Y$ between two varieties is said to be dominant if the image of $\varphi$ is dense in $Y$ (c.f. Hartshorne exercise 1.3.17)

*We say $X$ is an affine variety if it is an irreducible closed subset of $\Bbb{A}^n$. (see the definition after example 1.1.4 of Hartshorne)
Now let $X$ and $Y$ be affine varieties and $\varphi : X \to Y$ a dominant morphism. Now this means that for all $p \in X$, $\varphi^\ast_p : \mathcal{O}_{\varphi(p),Y} \to \mathcal{O}_{p,X}$ is injective (c.f. Hartshorne exercise 1.3.3 (c)). Because we have assumed that $X,Y$ are affine varieties we identify $\mathcal{O}_{p,X} \cong A(X)_{\mathfrak{m}_p}$ and similarly for $Y$ to get that
$$(\varphi^\ast)_p : A(Y)_{\mathfrak{m}_{\varphi(p)}} \to A(X)_{\mathfrak{m}_p}$$
is injective for all $p\in X$.


My question is: Is it true that $\varphi^\ast : A(Y) \to A(X)$ is injective?


Here are some partial results I can get. Choose a maximal ideal $\mathfrak{m}_q \subseteq A(Y)$. If $\ker \varphi^\ast$ is completely contained in $\mathfrak{m}_q$ then 
$$(\mathfrak{m}_q)_{\mathfrak{m}_q} (\ker \varphi^\ast)_{\mathfrak{m}_q} = (\ker \varphi^\ast)_{\mathfrak{m}_q}.$$
The ring $A(Y)_{\mathfrak{m}_q}$ is local and Noetherian so $(\ker \varphi^\ast)_{\mathfrak{m}_q}$ is finitely generated as a module over this ring. By Nakayama's lemma it follows $(\ker \varphi^\ast)_{\mathfrak{m}_q} =0$. 
Edit: Adeel's answer below shows that under my assumptions we have $\ker \varphi \subseteq \text{nilrad}  A(Y)$, so my proof is complete. 
 A: The map $\varphi^*$ sends $p + I(Y) \longmapsto p\circ \varphi + I(X).$ So the statement that $\varphi^*$ is injective can be reword to: $p\in I(Y)$ iff $p\circ \varphi \in I(X).$ Since $p\circ \varphi \in I(X)$ iff $p\in I( \varphi(X) )$ we have $\varphi^*$ is injective iff $I(Y) = I(\varphi(X))$ i.e the image of $\varphi$ is dense.
A: Proposition: If $X = \mathrm{Spec}(A)$ and $Y = \mathrm{Spec}(B)$ are affine schemes, a morphism $f : X \to Y$ is dominant if and only if the kernel of the corresponding homomorphism $\varphi : B \to A$ is contained in the nilradical of $B$.
Proof: Recall that there is an equality
  $$ V(\varphi^{-1}(I)) = \overline{f(V(I))} $$
for ideals $I \subset A$; in particular,
  $$ V(\varphi^{-1}(0)) = \overline{f(X)} = Y $$
if and only if $f$ is dominant.  This is equivalent to the ideal $\varphi^{-1}(0) = \ker(\varphi)$ being contained in every prime ideal, i.e. in the intersection of all the prime ideals; but this intersection is precisely the nilradical of $B$.
In particular when Y is reduced (e.g. a variety), the homomorphism is injective.
A: The usual definition of dominant would be that the image of $\varphi$ is dense, or, equivalently, contains a non-empty open subset of the target.  
[The equivalence presumes that we are talking about irreducible varieties, so that
non-empty open sets are automatically dense.  The definition in terms of density of the image makes sense, and can be used, even if the source and target are reducible.]
Now this is equivalent to asking that the morphism on coordinate rings be injective, essentially because restricting to a dense subset is injective for continuous functions.  
Again presuming that we are talking about irreducible varieties, this is equivalent to injectivity on stalks, as in the OP, although I've never seen this used as the definition of dominant.  Note that if the source is reducible, than this requirement is different to having dense image; it is equivalent to asking that if $P$ is a point of $X$, then the union of the components through $P$ has dense image in the union of components through $\varphi(P)$.  [So it would count the inclusion of the punctured line into two crossed lines --- the puncture being at the crossing-point --- as dominant, but wouldn't count the inclusion of the whole line into two crossed lines as dominant.]
All this being said, I don't understand the proof given in the OP: where does the claim that $(\mathfrak m_q)_{\mathfrak m_q} (ker \varphi^*)_{\mathfrak m_q} = ker \varphi^*$ come from?  As noted above, the claim that this implies injectivity on coordiante rings is only valid when $Y$ is irreducible, so somewhere in the proof you have to use that $A(Y)$ is a domain. (Actually the way the argment is written it is not even clear how the assumption of injectivity on stalks is being used at all.)
My suggestion would be that you draw some picures to think about this, including the cases of a line/punctured line mapping into two crossed lines that I mentioned above, and some other morphisms between affine algebraic sets, some having dense image and some not, and thinking about how the algebra will reflect the geometry.  The way the OP is written right now, it suggests that you are not thinking about the geometric meaning much at all, but more just manipulating the algebraic formalism.

Added: Here are some exercises to prove the equivalence b/w dominant and injectivity on coordinate rings, for morphisms $\varphi: X \to Y$ between affine algebraic sets over an algebraically closed field $k$.  I realize that a proof of this has already been given in another answer, but these exercises outline a different argument which is more geometric, in the spirit of the rant of the preceding paragraph.


*

*Show that if $\varphi: X \to Y$ is a continuous map of top. spaces with dense image, then the induced map $\varphi^*: \mathcal C(Y,k) \to \mathcal C(X,k)$ is injective.  Here $\mathcal C(S,k)$ is the space of continuous morphisms from a top. space $S$ to the field $k$, where $k$ is given its Zariski topology (i.e. identified as a topological space with $\mathbb A^1$).  

*Note that since $A(X) \subset \mathcal C(X,k)$ when $X$ is an affine algebraic set, and similarly with $A(Y)$, having dense image implies 
that $\varphi^*: A(Y) \to A(X)$ is injective.  

*Show that if $Z$ is any proper closed subset of $Y$, then there exists
a non-zero function $f \in A(Y)$ such that $f$ vanishes on all the points in $Z$.

*Show that if $\varphi: X\to Y$ does not have dense image, then $A(Y) \to A(X)$ has non-trivial kernel, hence is not injective.
The point is that one doesn't need commutative algebra to prove the desired equivalence.  All it uses is the basic relationship between $A(X)$ and the Zariski topology on $A(X)$ for an affine algebraic set $X$, i.e. that elements of $A(X)$ are Zariski continuous, and that closed subsets can be cut out as the zero loci of elements of $A(X)$.  
It's good to learn to think this way, i.e. to argue with geometry or topolology without translating everything into commutative algebra all the time, otherwise it becomes hard to see the geometry of what is going on (the more so as your study of algebraic geometry progresses).  
A: Let be $\varphi:X \longrightarrow Y$ a dominant morphism, then $\varphi_p^{*}:\mathcal{O}_{Y,\varphi(p)} \longrightarrow  \mathcal{O}_{X,p}$ is inyective for all $p\in X$:
Let be $p\in X$, if $[(V,g)]\in Ker(\varphi_p^{*})$ then $g\circ\varphi=0$. We take $q\in V$, we know $V$ is an open set of $Y=\overline{im(\varphi)}$, so $q\in \overline{im(\varphi)}$ and $V$ is an open neighborhood of $q$, so by closure definition:
$$V\cap im(\varphi) \neq \emptyset$$
Then we can take $q_1\in V\cap im(\varphi)$, then exists $p_1\in X$ such that $q_1 = \varphi(p_1)$, then:
$$g(q_1) = g(\varphi(p_1)) = g\circ\varphi(p_1) = 0$$
Then $g_{|W}=0$, where $W:=V\cap im(\varphi)$. If we take an open nonempty subset $W_1$ of $W$, then $W_1$ is an open subset of $V$ and we have again $g_{|W_1}=0$, then $[(V,g)]= 0$ on $\mathcal{O}_{Y,\varphi(p)}$.
A: This proof is shorter:
Let be $\varphi:X \longrightarrow Y$ a dominant morphism, then $\varphi_p^{*}:\mathcal{O}_{Y,\varphi(p)} \longrightarrow  \mathcal{O}_{X,p}$ is inyective for all $p\in X$:
Let be $p\in X$, if $[(V,g)]\in Ker(\varphi_p^{*})$ then $g\circ\varphi=0$, so $g(\varphi(X))=0$. We have to check $g(V)=0$:
$$ V \subseteq Y \Rightarrow g(V)\subseteq g(Y) = g(\overline{\varphi(X)}) =(\hspace{0.1cm}g\hspace{0.1cm}continue)
=\overline{g(\varphi(X))} = \overline{0}=0$$
