Is the restriction map of structure sheaf on an irreducible scheme injective?

Suppose $X$ is an irreducible scheme, $U \subset V$ open subsets of $X$, does it hold that $\rho_U^V:O(V)\to O(U)$ injective? Generally under what conditions does it hold?

Actually it is related to an exercise in Liu Qing's book p67,Ex4.11:

Let $f：X\to Y$ be a morphism of irreducible schemes, show that the following are equivalent:

(2)$f^{\#}:O_Y \to f_*O_X$ is injective

(3)for every open subset $V$ of $Y$ and every open subset $U\subset f^{-1}(V)$, the map is injective.

to deduce (3) from (2) I had hoped the restriction map should be injective.

But now I don't know how to deal with it..

-
Isn't $\rho^V_U$ going in the opposite direction? – a.r. Nov 9 '13 at 11:24
I edited it, thanks – mqx Nov 9 '13 at 13:08
The morphism in (2) doesn't make sense. – Georges Elencwajg Nov 9 '13 at 13:29
Sorry I corrected it, thanks – mqx Nov 9 '13 at 13:31
In the book, $X, Y$ are integral ! – Cantlog Nov 9 '13 at 18:12

Let $k$ be a field, $A$ the ring $A=k[X,Y]/(Y^2,XY)=k[x,y]$ and $S=\operatorname {Spec} (A)$ the corresponding affine scheme.
The restriction morphism from $U=S$ to $V=D(x)$$\rho:\mathcal O(S)=A \to \mathcal O (D(x))=A_x$$ is not injective because it sends$y\neq 0\in \mathcal O(S)=A$to$y|D(x)=\frac {y}{1}=0\in \mathcal O (D(x))=A_x$. [Why is$\frac {y}{1}=0\in A_x$? Because$xy=0$and$x$is invertible in$A_x$] The existence of the nontrivial nilpotent$y$in this example is not coincidental: in a scheme that is irreducible and reduced (such schemes are called integral) all restriction maps between open subsets are indeed injective. Edit In answer to a request of the OP in his comment below, the quickest way to prove that the restriction map$\rho_U^V:O(V)\to O(U)$is injective in the integral case is to compose it with the canonical morphism$\mathcal O(U)\to O_{X,\xi}$into the generic stalk and to remark that the composition$\mathcal O(V)\to O_{X,\xi}$is injective as a consequence of Qing Liu's Proposition 4.18 (b), page 65. [Some kid on the block will remind you that$v\circ u$injective$\implies u$injective] - If X is integral,$s \in \Gamma(V)$is mapped to$0\in \Gamma(U)$How do we get a contradiction? Could you explain your last claim a little bit? Thanks! – mqx Nov 9 '13 at 13:29 Dear mqx: since my example is not integral you can't use the notation in it to ask questions about integral schemes! The best I can say is that the corresponding reduced scheme$S_{red}=\operatorname {Spec} (A_{red})$with$A_{red}=k[X,Y]/(Y,XY)=k[X,Y]/(Y)=k[x,y]$has$y=0\in \mathcal O_{S_{red}}(S_{red})=A_{red}$and the obstruction mentioned in my post to the restriction being injective no longer applies . – Georges Elencwajg Nov 9 '13 at 13:38 I am sorry that I used unclear notations..could you help me with the case when X is an integral scheme, to show the restriction map is injective? – mqx Nov 9 '13 at 13:48 Dear mqx, your notation was not unclear: I was finishing editing my answer while you wrote your second comment! I hope the edit answers your question. – Georges Elencwajg Nov 9 '13 at 14:00 Does the equivalence in exercise still hold for just irreducible case? – mqx Nov 9 '13 at 14:04 Think of the affine case. So let$X= Spec\, A$for some ring$A$. Then the basic open sets are the sets of the form$D_f = Spec \, A_f$. The restriction map$O(X) \to O(D_f)$is precisely the localization map$A \to A_f$. This is injective precisely when$f$is a non-zero divisor. This argument could be globalized to the case when$X$is a scheme. So at least when$X$is an integral scheme, the restriction maps should in general be injective. Edit: Of course, as Zhen Lin points out, if$U=\emptyset$, then the restriction map is just the zero map$A \to 0$, so it is not injective in that case. - Except if$U = \emptyset\$... – Zhen Lin Nov 9 '13 at 11:28