Example of a non-affine scheme whose reduction is affine In Hartshorne Exercise III.3.1, he asks the reader to prove that a noetherian scheme $X$ is affine iff $X_{\bf{red}}$ is affine. I am not sure if Noetherian is needed here (of course I only know the proof for the Noetherian case). So I was wondering if there is an example for a non-affine (non-noetherian) scheme $X$ for which its reduction $X_{\bf red}$ is affine?
 A: This is a community-wiki post recording the accepted answer here on MathOverflow so that this question may be marked as answered.
David Rydh:

No, if $X$ is any algebraic space such that $X_{red}$ is an affine scheme, then $X$ is an affine scheme. This follows from Chevalley's theorem. For $X$ noetherian scheme/alg. space this theorem is in EGA/Knutson. As you noted, this can also be showed using Serre's criterion for affineness or by an even simpler argument (see EGA I 5.1.9, first edition).
For $X$ non-noetherian, the following general version of Chevalley's theorem is proved in my paper "Noetherian approximation of algebraic spaces and stacks" (arXiv:0904.0227):
Theorem: Let $W\to X$ be an integral and surjective morphism of algebraic spaces. If $W$ is an affine scheme, then so is $X$.
Recall that any finite morphism is integral, in particular $X_{red} \to X$. As a corollary, it follows that under the same assumptions, if $W$ is a scheme then so is $X$.

In the comments to that answer, R. van Dobben de Bruyn points out that the result for schemes is already contained in Conrad's note Deligne's notes on Nagata compactification as corollary A.2:

Corollary A.2: If $X\to Y$ is a finite surjection of affine schemes with $X$ affine then $Y$ is affine. In particular, if $Y$ is a scheme so that $Y_{red}$ is affine then $Y$ is affine.

