Hypersurfaces of degree $d$ in $\mathbb{P}^n_k$ that contain a given closed $X$ Let $k$ be an algebraically closed field and consider $\mathbb{P}^n_k$, the be the $n-$dimensional projective space over $k$. 
It is known that, for any integer $d>0$, there is a bijection between the hypersurfaces of degree $d$ and $\mathbb{P} H^0(\mathbb{P}^n_k, \mathcal{O}_{\mathbb{P}^n_k}(d))$.
Now, let $X\subseteq \mathbb{P}^n_k$ be a closed subscheme and let $\mathcal I_X$ be the corresponding sheaf of ideals. Intuitively I can say that there is a bijection between the hypersurfaces of degree $d$ containing $X$ and $\mathbb{P} H^0(\mathbb{P}^n_k, \mathcal{I}_X(d))$. How can I show this fact formally?
 A: Consider the exact sequence $$ 0 \to \mathcal{I}_X \to \mathcal{O}_{\Bbb P^n} \to \mathcal{O}_X \to 0.$$
After twisting by $\mathcal{O}(d)$, this sequence becomes $$ 0 \to \mathcal{I}_X(d) \to \mathcal{O}_{\Bbb P^n}(d) \to \mathcal{O}_X(d) \to 0$$ and remains exact (we're tensoring with an invertible sheaf).
Taking cohomology/global sections, we see that the exact sequence becomes $$ 0 \to H^0(\mathcal{I}_X(d)) \to H^0(\mathcal{O}_{\Bbb P^n}(d)) \to H^0(\mathcal{O}_X(d))$$
and now we may notice several things. First, the global sections of $\mathcal{O}(d)$ are the degree $d$ homogeneous polynomials. Second, those degree $d$ homogeneous polynomials in $H^0(\mathcal{O}(d))$ coming from $H^0(\mathcal{I}_X(d))$ must vanish on $X$, by the exactness of the above sequence. So we may conclude that $H^0(\mathcal{I}_X(d))$ is precisely the vector space of degree $d$ polynomials vanishing on $X$, and after taking the projectivization, we may say that $\Bbb PH^0(\mathcal{I}_X(d))$ is exactly the set of hypersurfaces of degree $d$ containing $X$.
