I've just read the definition of a closed subscheme in Hartshorne's recently and I collected here and there (notes that people put online) the following statement.
Claim. Suppose that $(X,\mathcal{O}_X)$ is a scheme, $Y \subset X$ is a closed subset. Then $Y$ can be equipped with a sheaf $\mathcal{O}_Y$ such that $(Y,\mathcal{O}_Y)$ is a reduced closed subscheme of $X$ with the following universal property: for any reduced scheme $Z$ together with a morphism $f: Z \rightarrow X$ such that $f(Z) \subset X$, $f$ factors uniquely through $i: Y \hookrightarrow X$ ($i^{\#}: \mathcal{O}_X \rightarrow i_{\ast}\mathcal{O}_Y$).
Here are my questions (I expect an answer to either (1) or (2) and an answer to (3). Thanks!
1) Can you provide me some good references for the statement of the result, for a proof or a construction of this result?
2) Since I haven't found a satisfactory description of the above fact in popular texts yet, I came up with my own try. I define an ideal sheaf $\mathcal{I}_Y(U) = \{s \in \mathcal{O}_X(U) \mid s_p \in \mathfrak{m}_{X,p} \text{ for all } p \in U \cap Y\}$ on $X$, and I define $\mathcal{O}_Y = i^{-1}(\mathcal{O}_X/\mathcal{I}_Y)$. I expect $\mathcal{O}_Y$ to be the desired sheaf on $Y$. So far, I have managed to show that $(Y,\mathcal{O}_Y)$ is a reduced subscheme of $X$, but I haven't had any idea how to prove the universal property yet. Do you know whether or not the above construction gives the right sheaf in the claim? If yes, could you provide me some idea how to prove the universal property?
3) Suppose that $\mathcal{F}$ is another sheaf on $Y$ that makes $(Y,\mathcal{F})$ a reduced subscheme of $X$, does this imply that $(Y,\mathcal{F})$ also has the universal property stated in the claim?