Let $f: X\rightarrow Y$ be a morphism of affine varieties and $f^*: A(Y)\rightarrow A(X)$ the corresponding homomorphism of the coordinate rings. The question is whether this is true or false:
$f$ is injective if and only if $f^*$ is surjective.
The "only if" part is false. Here is a counterexample:
$$X=\mathbb{A^1}, Y=V(x^2-y^3)\\ f: X\rightarrow Y, t \rightarrow (t^3,t^2)\\ f^*: A(Y)\rightarrow A(X), (\bar{x},\bar{y})\rightarrow (t^3,t^2)$$ In this example $f$ is bijective, but $f^*$ is not surjective, since it does not map anything to $t$.
I cannot prove the "if" part or construct a counterexample of it. Thanks for any help!