Lemma 44.2.3. Let $S$ be a scheme. Let $i : X \to Y$ be a closed immersion of schemes. If $\mathrm{Hilb}^ d_{Y/S}$ is representable by a scheme, so is $\mathrm{Hilb}^ d_{X/S}$ and the corresponding morphism of schemes $\underline{\mathrm{Hilb}}^ d_{X/S} \to \underline{\mathrm{Hilb}}^ d_{Y/S}$ is a closed immersion.

Proof. Let $T$ be a scheme over $S$ and let $Z \in \mathrm{Hilb}^ d_{Y/S}(T)$. Claim: there is a closed subscheme $T_ X \subset T$ such that a morphism of schemes $T' \to T$ factors through $T_ X$ if and only if $Z_{T'} \to Y_{T'}$ factors through $X_{T'}$. Applying this to a scheme $T_{univ}$ representing $\mathrm{Hilb}^ d_{Y/S}$ and the universal object1 $Z_{univ} \in \mathrm{Hilb}^ d_{Y/S}(T_{univ})$ we get a closed subscheme $T_{univ, X} \subset T_{univ}$ such that $Z_{univ, X} = Z_{univ} \times _{T_{univ}} T_{univ, X}$ is a closed subscheme of $X \times _ S T_{univ, X}$ and hence defines an element of $\mathrm{Hilb}^ d_{X/S}(T_{univ, X})$. A formal argument then shows that $T_{univ, X}$ is a scheme representing $\mathrm{Hilb}^ d_{X/S}$ with universal object $Z_{univ, X}$.

Proof of the claim. Consider $Z' = X_ T \times _{Y_ T} Z$. Given $T' \to T$ we see that $Z_{T'} \to Y_{T'}$ factors through $X_{T'}$ if and only if $Z'_{T'} \to Z_{T'}$ is an isomorphism. Thus the claim follows from the very general More on Flatness, Lemma 38.23.4. However, in this special case one can prove the statement directly as follows: first reduce to the case $T = \mathop{\mathrm{Spec}}(A)$ and $Z = \mathop{\mathrm{Spec}}(B)$. After shrinking $T$ further we may assume there is an isomorphism $\varphi : B \to A^{\oplus d}$ as $A$-modules. Then $Z' = \mathop{\mathrm{Spec}}(B/J)$ for some ideal $J \subset B$. Let $g_\beta \in J$ be a collection of generators and write $\varphi (g_\beta ) = (g_\beta ^1, \ldots , g_\beta ^ d)$. Then it is clear that $T_ X$ is given by $\mathop{\mathrm{Spec}}(A/(g_\beta ^ j))$. $\square$

[1] See Categories, Section 4.3

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).