If product of two sets $A\times B$ is closed, are $A$ and $B$ closed? If $A\times B$ is closed in $X\times Y$, then are $A$ and $B$ closed in $X$ and $Y$ respectively?
 A: HINT: Suppose that $x$ is a limit point of $A$ in $X$, and let $b$ be any point of $B$. Let $p=\langle x,b\rangle$, and show that $p\in\operatorname{cl}_{X\times Y}(A\times B)$. Conclude that $p\in A\times B$ and hence that $x\in A$.
Added: Note that as Henno points out in the comments, the result is false if $A$ or $B$ is allowed to be empty: $A\times\varnothing=\varnothing$ is closed for all $A$, whether or not $A$ is closed in $X$.
A: We assume $A,B$ to be non-empty. Let $b\in B$. Show that the restriction $p_X^b:=p_X|_{X\times\{b\}}:X\times\{b\}\to X$ of the projection $p_X$ onto $X$ is a homeomorphism. Now, $A=p_X^b[(A\times B)\cap(X\times\{b\})]$ and $(A\times B)\cap (X\times\{b\})$ is closed in the subspace $X\times\{b\}$
Similarly, the restriction of $p_Y$ to $\{a\}\times Y,\ a\in A$ is a homeomorphism. It follows that $B$ is closed.
Alternatively, you could prove the stronger result $\overline{A\times B}=\overline A\times\overline B$ (this is even true for an infinite product!) and use this to obtain the solution.
