Lemma 30.17.6. Let $i : Z \to X$ be a closed immersion of Noetherian schemes inducing a homeomorphism of underlying topological spaces. Then $X$ is quasi-affine if and only if $Z$ is quasi-affine.

Proof. Recall that a scheme is quasi-affine if and only if the structure sheaf is ample, see Properties, Lemma 28.27.1. Hence if $Z$ is quasi-affine, then $\mathcal{O}_ Z$ is ample, hence $\mathcal{O}_ X$ is ample by Lemma 30.17.5, hence $X$ is quasi-affine. A proof of the converse, which can also be seen in an elementary way, is gotten by reading the argument just given backwards. $\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).