TITLE: Hypersurface in $\mathbb P^{n}$ and an exact sequence
QUESTION [8 upvotes]: Let $X$ be a hypersurface in $\mathbb P^{n}$ defined by the vanishing set of a homogeneous degree $k$ polynomial.
Why is the sequence
$0 \rightarrow \mathcal O(-k) \rightarrow  \mathcal O_{\mathbb P^{n}} \rightarrow i_{*} \mathcal O_{X} \rightarrow 0$ 
(where $i_{*}$ is the inclusion of $X$ into $\mathbb P^{n}$)
exact? 
I have seen this or a very similar statement (slightly more/less general) referenced in several sources including Hartshorne and it is always stated as fact.

REPLY [9 votes]: The ideal sheaf of a degree $k$ hypersurface is isomorphic to $\mathcal O(-k)$.
More precisely, the ideal sheaf $\mathcal I_X$ is a subsheaf of $\mathcal O_{\mathbb P^n}$, and the isomorphism $\mathcal O(-k) \cong \mathcal I_X \subset \mathcal O_{\mathbb P^n}$ is given by multiplication by $f$.  (Note that $f$, being a degree $k$ polynomial, is a global section of $\mathcal O(k)$, and so multiplication by $f$ embeds $\mathcal O(-k)$ into $\mathcal O_{\mathbb P^n}$.)
Now the short exact sequence $0 \to \mathcal I_X \to \mathcal O_{\mathbb P^n} \to i_* \mathcal O_X \to 0$ is the standard short exact sequence that relates the ideal sheaf of the subvariety $X$ to its structure sheaf.