Exercise 3.11.d of Chapter II in Hartshorne: How to describe the scheme theoretic image of a reduced scheme? I'm trying to do the final part of Exercise 3.11.d in chapter II of Hartshorne, i.e. that if $(Z,\mathcal{O}_Z)$ is a reduced scheme and $f:(Z,\mathcal{O}_Z)\to(X,\mathcal{O}_X)$ is a scheme morphism, then the scheme theoretic image of $f$ is given by the reduced induced closed subscheme structure on $\overline{f(Z)}$. With the help of this answer by KReiser, I was able to prove that the ideal sheaf $\ker f^{\#}$ defines a closed subscheme $(Y,\mathcal{O}_Y)$ of $X$ (with $Y\subseteq X$), and as $Z$ is reduced, $Y$ carries the reduced induced closed subscheme structure. However, to conclude the solution of the problem, we still need to show that $Y=\overline{f(Z)}$, which one easily reduces to showing that $\overline{f(Z)}\cap U=V(\ker f^{\#}(U))$ for all affine open $U\subseteq X$. And this is where I'm stuck. So how can one show this? Thanks in advance!
 A: Let $U=\operatorname{Spec} A$ be an affine open, and cover $f^{-1}(U)$ by $\operatorname{Spec} B_i$ as $i\in I$ ranges over an index set. Then $\operatorname{Spec} (B_i)_g$ cover $f^{-1}(\operatorname{Spec} A_g)$. If $g\in\ker f^\sharp(U)$, then $(B_i)_g=0$ and so $f^{-1}(\operatorname{Spec} A_g)=\emptyset$ and $\ker f^\sharp(\operatorname{Spec} A_g)=A_g$, so the underlying set of the scheme-theoretic image is a subset of $\overline{f(Z)}$.
On the other hand, the underlying set of the scheme-theoretic image can't be smaller than $\overline{f(Z)}$: if it was, then there exists a point $z$ in $f(Z)$ not in the scheme-theoretic image, and a local function which vanishes on the image but not at $z$ defines a local function on $Z$ which is nonvanishing by pullback. So the underlying sets of $\overline{f(Z)}$ and $\operatorname{im}(f:Z\to X)$ are equal, and both are reduced (check that $\ker f^\sharp(U)$ is radical by the computations in the linked post). By the uniqueness of the reduced induced structure, they must be the same subscheme.
