Suppose $X,Y$ are connected non-empty topological spaces, $A \subset X$, $B \subset Y$ are strict subsets. Show that
$$(X \times Y) \setminus (A \times B)$$
is connected.
My attempted proof. Suppose for a contraction the space were not connected, so that
$$(X \times Y) \setminus (A \times B) = U \cup V$$
for some non-empty open $U,V \subset (X \times Y) \setminus (A \times B)$. Then there must exist some $\{x\} \times Y$ or $X \times \{y\}$ such that its intersection with both $U$ and $V$ are non-empty. Without loss of generality let this set be $\{x\} \times Y$, then since $\{x\} \times Y$ is homeomorphic to $Y$, we see that $\{x\} \times Y$ is connected, but it can be written as a disjoint union of non-empty open sets $(\{x\} \times Y) \cap U$ and $(\{x\} \times Y) \cap V$. $\square$
Feel free to share your comments. Thanks.
Let $f:X\times Y-A\times B\rightarrow\{0,1\}$ be a continuous function. There exists $x\in X-A, y\in Y-B$, suppose $f(x,y)=0$. We have $f(x\times Y)=f(X\times y)=0$ since $x\times Y$ and $X\times y\subset :X\times Y-A\times B$. Let $(u,v)\in :X\times Y-A\times B$. You have $u$ is not in $X$ or $v$ is not in $Y$. If $u$ is not in $X$, then $u\times Y\subset :X\times Y-A\times B$ and $f(u,v)=f(u\times Y)=f(u,y)=f(X\times y)=f(x,y)=0$, if $v$ is not in $Y$ a similar argument shows that $f(u,v)-0$, so $f$ is constant and $X\times Y-A\times B$ is connected.