You have two connected topological spaces $(A,B)$. Prove that $A\times B$ is also connected.
I understand that I have to prove that there is a point in $B$ (call it $b$), that makes $A\times\{b\}$ homeomorphic to $A$ making it connected to $A\times B$. Then prove that $\{a\}\times B$ is connected in $A\times B$. But I don't really know where to being with this. If you could help that would be appreciated.
Hint: Try to write a continuous function $f:A\times B\to \{0,1\}$ and recall that a topological space is connected if and only if every continuous function from it to $\{0,1\}$ is constant.