Product of two algebraic varieties is affine... are the two varieties affine?

Let $X_1$ and $X_2$ two algebraic varieties such that their product $X_1\times X_2$ is affine. Are $X_1$ and $X_2$ affine then?

If this is not true, could you give a counterexample?


Solution 1:

I'll assume you are in the classical context of varieties over an algebraically closed field.
If $a_2\in X_2$ is an arbitrary point, the subvariety $X_1\times \{a_2\}\subset X_1\times X_2$ is closed in the affine variety $X_1\times X_2$ and is thus affine.
Since $X_1$ is isomorphic to $X_1\times \{a_2\}$, $X_1$ is affine too.

Solution 2:

Let $X,Y$ be two $k$-schemes. If $X \times_k Y$ is affine and $X \neq \emptyset$, then $Y$ is affine.

Proof: Assume $x \in X$ is a $k$-rational point. The two morphisms $\mathrm{id}_{X \times_k Y}, (x,\mathrm{id}_Y) : X \times_k Y \to X \times_k Y$ have equalizer $Y$. But affine schemes are closed under finite limits of schemes, so that we are done. If $X$ has no $k$-rational point, then $X_K$ has a $K$-rational point for some field extension $K/k$ and we conclude that $Y_K$ is affine. But then $Y$ is also affine by fpqc descent. $\square$