Infinite products don't exist in the category of schemes (see Jonathan Wise's answer [here](https://mathoverflow.net/questions/9134/arbitrary-products-of-schemes-dont-exist-do-they)). However, all limits of affine schemes exist in the category of schemes (and are affine). I would like to know if affine schemes are the only ones which have this property, thus even sharpening the result. For example, we may ask the following:


Let $X$ be a scheme such that all powers $X^I$ exist in the category of schemes. Can we deduce that $X$ is affine?


I hope that the answer will be "yes". You may work in the category of $k$-schemes for a field $k$ and assume that $X$ is integral. You may also assume that all limits constructed from $X$ exist, for example all equalizers of morphisms $X^I \to X^J$, etc. Feel free to add other assumptions as well.


Jonathan has already made the following comment (which I cannot fill with details):



> 
> I believe the proof can be modified to show that if a product of a collection of quasi-compact schemes is a scheme then the product of some collection of all but finitely many of them is affine. Assuming they are flat over Z or something, I suspect this will be impossible unless all of those schemes are affine. Certainly an infinite product of projective lines is not affine.
> 
> 
> 


Some time ago, I've already proven the following result (see [here](http://maddin.110mb.com/pdf/faserprodukte.pdf)): Assume that $(X\_i)$ is a family of $S$-schemes such that their fiber product $P$ exists in the category of schemes. If $Q$ denotes the fiber product of the $X\_i$ in the category of locally ringed spaces (which exists and can be described explicitly), then the canonical morphism $P \to Q$ is bijective and the stalk maps are isomorphisms. But I don't know how to get the topology of $P$. This would be very helpful to show that $P$ does not exist.


But as a first step one would have to show that $Q$ is not a scheme, which is already hard in general. Here is an idea: Let $X \neq \emptyset$ be a $k$-scheme and assume that the LRS fiber product $Q=X^I$ ($I$ infinite set) is a scheme. Then the explicit construction implies that there are open subsets $U\_i \subseteq X$, such that $U\_i = X$ for almost all $i$, and that $\prod\_i U\_i$ is an *affine* scheme. Let $U$ be the (finite) product of the $U\_i \neq X$. Then $U$ is a scheme, and $U \times X^I$ is an affine scheme. Under suitable finiteness conditions (?), a combination of Serre's criterion and the Künneth formula (see [here](https://math.stackexchange.com/questions/40276/fiber-factors-of-affine-schemes)) would imply that $X^I$ is an *affine* scheme. But then $X^I \cong X \times X^I$ shows with the same argument that $X$ is affine. But this all works only if $X$ and $X^I$ are quasicompact and quasiseparated.



Infinite products exist *only* for affine schemes?
I will try to argue that if an infinite product of quasi-compact schemes is representable by a scheme, then all but finitely many of them must be affine.


**Edit:** I rewrote the argument a little to address the comments. I hope the argument might finally be satisfying...


**Lemma.** If $X\_i$, $i \in I$ are quasi-compact schemes over a field $k$, then $\prod X\_i$ has a closed point (i.e., there is a map from the spectrum of some field $K$ to $X$ that is representable by closed immersions) whose image in each of the $X\_i$ is also closed.


*Proof.* For each $i$, let $x\_i$ be a closed point of $X\_i$ (which exists because the $X\_i$ are quasi-compact). Let $K$ be a compositum of the residue fields of the $x\_i$ (i.e., the residue field at a closed point of $Z = \prod\_i x\_i$, which exists because $Z$ is affine). Let $X$ be the product of the $X\_i$. Then we get a map $\mathrm{Spec} \: K \rightarrow X$, which we have to show is a closed embedding.


It's enough to argue that the map $Z \rightarrow X$ is a closed embedding. But if $Y$ is a scheme over $X$ then $Y\_Z$ can be obtained as the intersection of closed subschemes $Y\_{x\_i} = Y \times\_{X\_i} x\_i$, which is a closed subscheme. $\Box$


Suppose that the product of schemes $X\_i$, indexed by $i \in I$, is representable by a non-empty scheme $X$. Assume that each $X\_i$ is quasi-compact, so that for each $i$, we can find a Zariski cover $Y\_i \rightarrow X\_i$ of $X\_i$ by an affine scheme $Y\_i$. Then we get a map $Y = \prod Y\_i \rightarrow X$ and the source is an affine scheme. Let $x$ be a closed point of $X$. Let $U$ be an affine neighborhood of $x$ in $X$. Let $y$ be a $K$-point of $Y$ above $x$, and let $V$ be a distinguished affine open neighborhood of $y$ in $Y$, contained in the pre-image of $U$, and defined by the invertibility of some $f \in \Gamma(Y, {\cal O}\_Y)$. Since $f$ can be expressed using functions defined on finitely many of the $Y\_i$, the set $V$ must be the pre-image of a distinguished open affine $V' \subset \prod\_{i \in I'} Y\_i$ where $I'$ is a finite subset of $I$. Let $I''$ be the complement of $I'$ in $I$ and let $X' = \prod\_{i \in I'} X\_i$ and define $X''$, $Y'$, $Y''$ analogously. Then $V' \times Y''$ is an affine open neighborhood of $y$ in $Y$, contained in $V$. If $U'$ denotes the image of $V'$ in $X'$ then $U' \times X''$ is an open neighborhood of $x$ in $X$, contained in $U$. Let $x'$ be the projection of $x$ to $X'$, which we can safely assume is a closed point of $X'$, hence a closed point of $U'$, and let $K$ be the residue field of $x'$. Therefore $\{ x' \} \times X''$ is a closed subscheme of $U$ and is therefore affine. But $\{ x' \} \times X'' = K \otimes\_k X''$ so by fpqc descent for affine schemes over $k$ (SGA1.VIII.2) it follows that $X''$ is affine.


Replacing $I$ with $I''$ we can now assume that $X$ is affine. Before proving that each $X\_i$ is affine, I claim that each $X\_i$ is separated. We must show that for any scheme $Y$ and any two maps $Y \rightrightarrows X\_i$, the locus in $Y$ where the maps agree is closed. Let $x$ be a closed $K$-point of $\prod\_{j \not= i} X\_j$ for some extension $K$ of $k$. Then we can extend the maps $Y \rightrightarrows X\_i$ to maps $Y \otimes\_k K \rightrightarrows X$. Since $X$ is separated, the locus in $Y \otimes\_k K$ where these maps agree is closed. But this is the pullback via the map $Y \otimes\_k K \rightarrow Y$ of the locus where the maps $Y \rightrightarrows X\_i$ agree, so this latter subset of $Y$ must be closed by fpqc descent (see SGA1.VIII.4).


If $X$ is affine and non-empty then it is separated, so each $X\_i$ is separated. Therefore $Z := \prod\_{j \not= i} X\_j$ is separated for each $i$. (Note that we don't yet know that $Z$ is representable by a scheme, but it still makes sense to claim that $Z$ is separated as a functor: for any scheme $T$ and any two elements $a$ and $b$ of $Z(T)$, the locus in $T$ where $a$ and $b$ agree is closed.) Let $z$ be a closed $K$-point of $Z$. Then $X\_i \otimes\_k K = X \times\_Z \{z\}$ is closed in $X$, hence is affine because we assumed $X$ to be affine. This implies $X\_i$ is affine by fpqc descent (see SGA1.VIII.2).


