# Scheme Theoretic Image (Hartshorne Ex.II.3.11.d)

The exercise asks to establish that given a morphism of schemes $f: Z \rightarrow X$, there is a unique closed subscheme $Y \rightarrow X$, such that 1) $f$ factors through $Y$, and 2) whenever $Y'$ is another closed subscheme of $X$ such that $f$ factors through $Y'$, then $Y \rightarrow X$ factors through $Y'$.

Most of the treatments of this problem i came across use a sheaf-of-ideals approach. Instead, i have been thinking about two more direct approaches (direct in the sense that Hartshorne poses this problem prior to introducing sheaves of ideals).

First Aproach: As a topological space, let $Y$ be the topological closure in $X$ of the image of $f$. Let $i: Y \rightarrow X$ be the inclusion map, and assign to $Y$ the sheaf $i^{-1} \operatorname{im}f^{\#}$, where $f^{\#}: \mathcal{O}_X \rightarrow f_* \mathcal{O}_Z$. Then the morphism of sheaves $\mathcal{O}_X \rightarrow i_* \mathcal{O}_Y$ is the one given by composing $f^{\#}$ with the canonical morphism $\operatorname{im}f^{\#} \rightarrow i_* i^{-1} \operatorname{im}f^{\#}$, and it is surjective by construction. Denoting by $f'$ the morphism $f$ with target $Y$, one gives a morphism $\mathcal{O}_Y \rightarrow f'_* \mathcal{O}_Z$, by starting with the inclusion $\operatorname{im}f^{\#} \rightarrow f_* \mathcal{O}_Z$, and then passing to $\mathcal{O}_Y=i^{-1}\operatorname{im}f^{\#} \rightarrow i^{-1} f_* \mathcal{O}_Z = f'_* \mathcal{O}_Z$. One similarly checks the commutation of the diagram on the level of sheaves and the universal property of $Y$. Do you agree with this approach?

Second Aproach: If $X = \operatorname{Spec} A$ is affine, then we can cover $Z$ by open affines $\operatorname{Spec} B_i$ and the morphism $f$ is given locally by ring homomorphisms $\phi_i : A \rightarrow B_i$. Then we can take $Y$ to be $\operatorname{Spec} (A/\cap_i\operatorname{ker} \phi_i)$. If $X$ is not affine, then it is reasonable to cover it by open affines $X = \bigcup \operatorname{Spec} A_j$, define $Y$ locally at each $\operatorname{Spec} A_j$ as above, and then glue the $Y_j$. However, this might be problematic because the union of all $Y_j$ might not even be a closed set of $X$. How can this difficulty be surpassed?