Lemma 28.11.14. Let $j : Y \to X$ be an immersion of schemes. Assume there exists an open $U \subset X$ with complement $Z = X \setminus U$ such that

$U \to X$ is affine,

$j^{-1}(U) \to U$ is affine, and

$j(Y) \cap Z$ is closed.

Then $j$ is affine. In particular, if $X$ is affine, so is $Y$.

**Proof.**
By Schemes, Definition 25.10.2 there exists an open subscheme $W \subset X$ such that $j$ factors as a closed immersion $i : Y \to W$ followed by the inclusion morphism $W \to X$. Since a closed immersion is affine (Lemma 28.11.9), we see that for every $x \in W$ there is an affine open neighbourhood of $x$ in $X$ whose inverse image under $j$ is affine. If $x \in U$, then the same thing is true by assumption (2). Finally, assume $x \in Z$ and $x \not\in W$. Then $x \not\in j(Y) \cap Z$. By assumption (3) we can find an affine open neighbourhood $V \subset X$ of $x$ which does not meet $j(Y) \cap Z$. Then $j^{-1}(V) = j^{-1}(V \cap U)$ which is affine by assumptions (1) and (2). It follows that $j$ is affine by Lemma 28.11.3.
$\square$

## Comments (0)

There are also: