How to prove $AB = \{xy \in \mathbb R : x \in A, y \in B\}$ is an open set?

If $0\notin B$, then you don't need $B$ to be open:

For every $b\in B$, the map $x\mapsto xb$ is a homeomorphism in $\mathbb{R}$, so $Ab$ is open. Then

$$AB = \bigcup_{b\in B}Ab,$$

so $AB$ is open.

If $0\in B$, it's a bit tricky. We need $B$ to be open. In that case, $B':= (-\varepsilon,\varepsilon)\subseteq B$ for some $\varepsilon > 0$. Then we can decompose $B = B' \cup B''$ where $B'' = B\setminus B'$. Now $AB = AB' \cup AB''$ and we know that $AB''$ is open. All we need to do is prove that $AB'$ is open.

Now $B'$ is open, so if $0\notin A$, we can use the same argument as before to prove that $AB'$ is open. Otherwise, we make a similar decomposition $A = A' \cup A''$ where $A' = (-\delta,\delta)\subseteq A$ and $A'' = A\setminus A'$. Now

$$AB = A'B' \cup A''B' \cup AB''.$$

We need to prove that $A'B' = (-\varepsilon,\varepsilon)(-\delta,\delta)$ is open. To do that, just note that $A'B' = (-\varepsilon\delta,\varepsilon\delta)$, which is open.


First of all note that for any $a \neq 0$, the set $a B =\{ab \:|\: b \in B\}$ is open if $B$ is open, since multiplication with $a$ is a homeomorphism of $\mathbb{R}$ into itself. Similarly, $Ab = \{ab \:|\: a \in A\}$ is open for every $b \neq 0$.

Now, recall that a set is open if it is a union of open sets, so if $0 \notin A$, then $AB = \bigcup_{a \in A} aB$ is open. If $0 \in A$, then for any $0 \neq b \in B$ you have $AB = (A\setminus\{0\})B \cup Ab$ which is open being the union of two open sets.