# Why a closed subscheme give rise to a closed immersion

G\"ortz and Wedhorn, in their book Algebraic Geometry I'' at page 84, give the following definitions. Let $(X, \mathscr{O}_X)$ be a scheme.

(1) A closed subscheme of $X$ is given by a closed subset $Z \subseteq X$ (let $i : Z \longrightarrow X$ be the inclusion) and a sheaf $\mathscr{O}_Z$ on $Z$, such that $(Z, \mathscr{O}_Z)$ is a scheme, and such that the sheaf $i_*\mathscr{O}_Z$ is isomorphic to $\mathscr{O}_X/\mathscr{J}$ for a sheaf of ideals $\mathscr{J} \subseteq \mathscr{O}_X$.

(2) A morphism $i : Z \longrightarrow X$ of schemes is called a closed immersion, if the underlying continuous map is a homeomorphism between $Z$ and a closed subset of $X$, and the sheaf homomorphism $i^\flat : \mathscr{O}_X \longrightarrow i_*\mathscr{O}_Z$ is surjective.

Then they wrote~: if $Z \subseteq X$ is closed subscheme as in (1), then the morphism $(i, i^\flat)$ is a closed immersion.

I think that the morphism $i^\flat$ is the composition of $\mathscr{O}_X \longrightarrow \mathscr{O}_X/\mathscr{J}$ and the isomorphism $\mathscr{O}_X/\mathscr{J} \simeq i_*\mathscr{O}_Z$. But, I don't see why $(i, i^\flat)$ is a morphism of schemes.

You've done the hard part in understanding the sheaf homorphism $i^{\flat}$. All you need to make the pair an morphism of schemes is check that $i$ is continuous. This is clear because $Z$ is endowed with the subspace topology.
The fact that $Z$ is endowed with the subspace topology is implicit in "... such that $(Z, \mathcal{O}_Z)$ is a scheme ...". A scheme is a locally ringed space, which is a pair of a topological space $Z$ and a sheaf of rings $\mathcal{O}_Z$. That means before $(Z, \mathcal{O}_Z)$ is a conditioned on being a scheme $Z$ is endowed with a topology. The obvious implication is that $Z$ was given the subspace topology.