TITLE: Does closed immersion induce surjection of global section
QUESTION [6 upvotes]: Let $X$ be a projective scheme and $Y \subset X$ be a projective subscheme. Assume $X, Y$ are connected. Denote by $i:Y \hookrightarrow X$ the closed immersion. Is it always true that the induced morphism $H^0(\mathcal{O}_X) \to H^0(i_*\mathcal{O}_Y)$ surjective?

REPLY [2 votes]: Suppose $\mathcal{I}$ is the ideal sheaf of $\mathcal{O}_X$ that defines $Y$.That is, $i_*\mathcal{O}_Y=\mathcal{O}_X/\mathcal{I}$. Then we have a short exact sequence of sheaves
$$0\rightarrow\mathcal{I}\rightarrow\mathcal{O}_X\rightarrow i_*\mathcal{O}_Y\rightarrow0.$$
This gives us a long exact sequence of cohomology
$$0\rightarrow H^0(X,\mathcal{I})\rightarrow H^0(X,\mathcal{O}_X)\rightarrow H^0(X,i_*\mathcal{O}_Y)\rightarrow H^1(X,\mathcal{I})\rightarrow H^1(X,\mathcal{O}_X)\rightarrow\ldots.$$
Clearly, what you want is equivalent to the map $H^1(X,\mathcal{I})\rightarrow H^1(X,\mathcal{O}_X)$ being injective (thanks MB!), which is not necessarily true under the conditions you specified.