Lemma 29.13.2. A quasi-affine morphism is separated and quasi-compact.

Proof. Let $f : X \to S$ be quasi-affine. Quasi-compactness is immediate from Schemes, Lemma 26.19.2. Let $U \subset S$ be an affine open. If we can show that $f^{-1}(U)$ is a separated scheme, then $f$ is separated (Schemes, Lemma 26.21.7 shows that being separated is local on the base). By assumption $f^{-1}(U)$ is isomorphic to an open subscheme of an affine scheme. An affine scheme is separated and hence every open subscheme of an affine scheme is separated as desired. $\square$

Comment #4294 by Xuande Liu on

Without loss of generality we can assume that $S=\mathit{Spec}(B)$ is affine. Let $A=\Gamma(X,\mathcal O_X)$. And hence we can factorize $f$ as $X\to \mathit{Spec}(A)\to\mathit{Spec(B)}$. The former morphism is an open immersion and the latter is morphism between affine schemes. Therefore $f$ is separated.

In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).