Does a section of a morphism of schemes give a subscheme? Let $f:X\rightarrow Y$ be a morphism of schemes (or algebraic spaces), and $s:Y\rightarrow X$ is a section to $f$, i.e. $fs=1_{Y}$.
Question: Is $s$ an (closed) immersion?
 A: Prop. If $f\colon X\longrightarrow Y$ is a separated morphism of schemes, then every section $\sigma\colon Y\longrightarrow X$ is a closed immersion.
Proof. Let $\sigma\in X(Y)$ be a section of the $Y$-scheme $X$. Let's take the fibered product $\left(X\times_X Y,p_X,q_X\right)$, where we are considering $Y$ as a $X$-scheme endowing it with the structural morphism $\sigma\colon Y\longrightarrow X$. The projections $p_X$ and $q_X$ induce a closed immersion of $Y$-schemes $X\times_X Y\longrightarrow X\times_Y Y$, since $\ast$ $f\colon X\longrightarrow Y$ is separated. In a similar way, the identity map of $Y$ and the section $\sigma$ induce a morphism $Y\longrightarrow X\times_X X$ of $X$-schemes. In other words we have the following commutative diagram.

At this point the solution of the exercise follows by the fact that a composition of closed immersions is a closed immersion  and by the fact that the morphisms $q^{-1}_X$ and $p^{}_Y$ are isomorphisms, then, in particular,  closed immersions.
$\ast$ Let $Y$ be a separated $Z$-scheme. Then for any $Y$-schemes $X_1,X_2$, the canonical morphism $X_1\times_Y X_2\longrightarrow X_1\times_Z X_2$ is a closed immersion. 
The claim above is the Proposition 3.9 (f) at pag.101 of Algebraic Geometry and Aritmetic Curves.
