Im trying to do an exercise from the book Algebraic Curves of Fulton (Exercise $\:6.26^{*}$).
It says:
Let $f:X\rightarrow Y$ be a morphism of affine varieties. Show that $f(X)$ in dense in $Y$ if and only if the homomorphism $\tilde{f}:\Gamma(Y)\rightarrow\Gamma(X)$ is one-to-one.
This is not true. The statement is that $f:\text{Spec}(B)\to\text{Spec}(A)$ is dominant (has dense image), if and only if $\ker(A\to B)$ is contained in $\text{nil}(A)$, the nilradical of $A$. Indeed, consider the map $\text{Spec}(k)\to\text{Spec}(k[x]/(x^2))$ coming from the quotient $k[x]/(x^2)\to k$.
Here's an outline:
Let me know if you have trouble!