Lemma 29.13.4. The composition of quasi-affine morphisms is quasi-affine.

Proof. Let $f : X \to Y$ and $g : Y \to Z$ be quasi-affine morphisms. Let $U \subset Z$ be affine open. Then $g^{-1}(U)$ is quasi-affine by assumption on $g$. Let $j : g^{-1}(U) \to V$ be a quasi-compact open immersion into an affine scheme $V$. By Lemma 29.13.3 above we see that $f^{-1}(g^{-1}(U))$ is a quasi-compact open subscheme of the relative spectrum $\underline{\mathop{\mathrm{Spec}}}_{g^{-1}(U)}(\mathcal{A})$ for some quasi-coherent sheaf of $\mathcal{O}_{g^{-1}(U)}$-algebras $\mathcal{A}$. By Schemes, Lemma 26.24.1 the sheaf $\mathcal{A}' = j_*\mathcal{A}$ is a quasi-coherent sheaf of $\mathcal{O}_ V$-algebras with the property that $j^*\mathcal{A}' = \mathcal{A}$. Hence we get a commutative diagram

$\xymatrix{ f^{-1}(g^{-1}(U)) \ar[r] & \underline{\mathop{\mathrm{Spec}}}_{g^{-1}(U)}(\mathcal{A}) \ar[r] \ar[d] & \underline{\mathop{\mathrm{Spec}}}_ V(\mathcal{A}') \ar[d] \\ & g^{-1}(U) \ar[r]^ j & V }$

with the square being a fibre square, see Constructions, Lemma 27.4.6. Note that the upper right corner is an affine scheme. Hence $(g \circ f)^{-1}(U)$ is quasi-affine. $\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).