Lemma 29.13.8. Suppose $g : X \to Y$ is a morphism of schemes over $S$. If $X$ is quasi-affine over $S$ and $Y$ is quasi-separated over $S$, then $g$ is quasi-affine. In particular, any morphism from a quasi-affine scheme to a quasi-separated scheme is quasi-affine.

Proof. The base change $X \times _ S Y \to Y$ is quasi-affine by Lemma 29.13.5. The morphism $X \to X \times _ S Y$ is a quasi-compact immersion as $Y \to S$ is quasi-separated, see Schemes, Lemma 26.21.11. A quasi-compact immersion is quasi-affine by Lemma 29.13.6 and the composition of quasi-affine morphisms is quasi-affine (see Lemma 29.13.4). Thus we win. $\square$

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).