Product of affine varieties

I was presented with a proof of the following fact and am hung up on a detail which I think is in fact wrong. Also I think I can fill the detail myself but need a bit of help.

Let $X\subset k^{m}$ and $Y\subset k^{n}$ be affine varieties(Assumed irreducible). Show that the product $X\times Y\subset k^{m+n}$ (equipped with the Zariski topology on $k^{m+n}$) is irreducible.

This is the "proof". Assume $X\times Y$ is reducible. Then there exists $Z_{1}$ and $Z_{2}$ closed such that $X\times Y=Z_{1}\cup Z_{2}$. Define $X_{i}=\{x|x\times Y\subset Z_{i}\}$. The proof shows $X=X_{1}\cup X_{2}$ then says $X_{i}$ is closed because projection is a closed map.

I don't think projection of the product under the zariski topology is a closed map. So can someone possibly explain that to me?

My idea on showing $X_{i}$ was closed was to show that $X_{i}=\cap_{y\in Y}\{x|(x,y)\in Z_{i}\}$ is a closed set. Which amounts to showing $\{x|(x,y)\in Z_{i}\}$ is closed in $X$.


Solution 1:

Fix $y \in Y$. The map $X \to X \times Y, x \mapsto (x,y)$ is continuous (in fact it is a morphism). Hence, the preimage $\{x : (x,y) \in Z_i\}$ is closed. Since closed sets are stable under arbitrary intersections, it follows that $\{x \in X : x \times Y \subseteq Z_i\}$ is closed.