Lemma 69.17.2. Let $S$ be a scheme. Let $X$ be a quasi-compact and quasi-separated algebraic space over $S$. Assume that every proper closed subspace $Z \subset X$ is a scheme, but $X$ is not a scheme. Then $X$ is reduced and irreducible.

Proof. We see that $X$ is reduced by Lemma 69.15.3. Choose closed subsets $T_1 \subset |X|$ and $T_2 \subset |X|$ such that $|X| = T_1 \cup T_2$. If $T_1$ and $T_2$ are proper closed subsets, then the corresponding reduced induced closed subspaces $Z_1, Z_2 \subset X$ (Properties of Spaces, Definition 65.12.5) are schemes and so is $Z = Z_1 \times _ X Z_2 = Z_1 \cap Z_2$ as a closed subscheme of either $Z_1$ or $Z_2$. Observe that the coproduct $Z_1 \amalg _ Z Z_2$ exists in the category of schemes, see More on Morphisms, Lemma 37.65.8. One way to proceed, is to show that $Z_1 \amalg _ Z Z_2$ is isomorphic to $X$, but we cannot use this here as the material on pushouts of algebraic spaces comes later in the theory. Instead we will use Lemma 69.15.1 to find an affine neighbourhood of every point. Namely, let $x \in |X|$. If $x \not\in Z_1$, then $x$ has a neighbourhood which is a scheme, namely, $X \setminus Z_1$. Similarly if $x \not\in Z_2$. If $x \in Z = Z_1 \cap Z_2$, then we choose an affine open $U \subset Z_1 \amalg _ Z Z_2$ containing $z$. Then $U_1 = Z_1 \cap U$ and $U_2 = Z_2 \cap U$ are affine opens whose intersections with $Z$ agree. Since $|Z_1| = T_1$ and $|Z_2| = T_2$ are closed subsets of $|X|$ which intersect in $|Z|$, we find an open $W \subset |X|$ with $W \cap T_1 = |U_1|$ and $W \cap T_2 = |U_2|$. Let $W$ denote the corresponding open subspace of $X$. Then $x \in |W|$ and the morphism $U_1 \amalg U_2 \to W$ is a surjective finite morphism whose source is an affine scheme. Thus $W$ is an affine scheme by Lemma 69.15.1. $\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).