Castelnuovo's sequence Let $X \subset \mathbb{P}^r$ be a closed subscheme and fix a hyperplane $H \subset \mathbb{P}^r$. The residual scheme $\mathrm{Res}_H(X)$ of $X$ with respect to $H$ is the closed subscheme of $\mathbb{P}^r$ with $\mathcal{I}_X:\mathcal{I}_H$ as its ideal sheaf. For each $d \in \mathbb{Z}$ we will have an exact sequence
$$0 \to \mathcal{I}_{\mathrm{Res}_H(X)}
(d-1) \to \mathcal{I}_X(d) \to \mathcal{I}_{X∩H,H}(d)\to 0$$
which is often called the Castelnuovo’s sequence. But I can't see how the morphisms between them are defined and why the sequence is exact. Could anyone explain this to me? Thanks.
 A: We assume we're working over a field $k$.
Let's take a peek at the local picture on some standard affine open to see if we can understand things there. Consider $D_+(x_0)$, and suppose on this patch that our closed subscheme $X$ is cut out by an ideal $I$ and our hyperplane is cut out by a linear equation $r$. 
The first ideal sheaf in the sequence on this open set is (the sheaf associated to) $(I:(r))$, which as we are working in an integral domain, is equal to $\frac{1}{r}(I\cap(r))$, and the map $(I:(r))\to I$ is clearly multiplication by $r$ (which is injective as we're in an integral domain). This globalizes in to an honest morphism $\mathcal{I}_{\operatorname{Res}_H(X)}(-1)\to \mathcal{I}_X$ which is injective on stalks and thus injective.
The second map is clear in the local picture: we quotient by the image of the first map. This is the same as restricting the functions cutting out $X$ to the hyperplane $H$, where they cut out $X\cap H$ now. This gives us the surjective morphism $\mathcal{I}_X\to \mathcal{I}_{X\cap H,H}$. Putting it all together, we get the desired short exact sequence of sheaves after twisting by $d$.
