TITLE: Injectivity of Homomorphism in Localization
QUESTION [14 upvotes]: Let $\alpha:A\to B$ be a ring homomorphism, $Q\subset B$ a prime ideal, $P=\alpha^{-1}(Q)\subset A$ a prime ideal. Consider the natural map $\alpha_Q:A_P\to B_Q$ defined by $\alpha_Q(a/b)=\alpha(a)/\alpha(b)$. Suppose that $\alpha$ is injective. Then is $\alpha_Q$ always injective? 

I think so, but I'm clearly being too dense to prove it! My argument goes as follows.
Let $\alpha(a)/\alpha(b)=0$. Then $\exists c \in B\setminus Q$ s.t. $c\alpha(a)=0$. If $B$ is a domain we are done. If not we must exhibit some $d\in A\setminus P$ s.t. $da=0$. Obviously this is true if $c =\alpha(d)$. But I don't see how I have any information to prove this!
Am I wrong and this is actually false? If so could someone show me the trivial counterexample I must be missing? 
Many thanks!

REPLY [2 votes]: The question is right,isn't it? Actually,see an exercise (2.18b) of chap.2 of algebraic geometry by Hartshorne.Given a ring homomorphism $f:A \to B$,let $g:SpecB \to SpecA$ be the induced morphism.Then f is injective iff the map of sheaves$g^\sharp:O_{SpecA} \to g_*O_{SpecB}$ is injective.Note that $g^\sharp $ is injective iff for any $ a \in A$,$ g^ \sharp(D(a)):O_{SpecA}(D(a)) \to g_*O_{SpecB}(D(a))$ is injective i.e. for any $ a \in A$,$ g^ \sharp_a:A_a \to B_{f(a)}$ is injective .So the question becomes f is injective iff $g^\sharp_a$ is injective for any $a\in A$.The proof as follows: "if"part,assume $g^\sharp $ is injective,taking global section (note that taking global functor is left exact) we have $f：A \to B $ is injective."only if"part,if $f:A \to B $ is injective ,and $g^\sharp_a(c/a^n)=f(c)/f(a^n)=0 \in B_{f(a)}$,then there exists some intrger $m$ such that $ f(c)f(a)^m=0$ which implies $ f(ca^m)=0 $,since f is injective, $ ca^m=0$, so $c/a^n=0$.Q.E.D.By this conclusion, a ring homomorphism f is injective iff for any $p\in SpecB$,the induced map $g^\sharp_p:O_{SpecA,f^{-1}(p)} \to O_{SpecB,p}$ is injective.In the language of category,this fact states that since the category of affine schemes is equivalent to the opposite category of the category of commutative rings with identity,so injectivity of ring homomorphisms is equivalent to injectivity of morphisms of affine schemes,note that injectivity of morphisms of sheaves is equivalent to injectivity of morphisms of sheaves on stalks,hence the result is not strange.