Is this set open in the Euclidean topology on $\mathbb{R}^n$, and if so, how can it be represented as a union of open balls? I am working on an exercise in a real analysis book and have come to a point where I'm not sure what to do. In my proof, I have defined sets in $\mathbb{R}^n$ (where $n\in\mathbb{N}$) that have the following form:
\begin{equation}
E(x,\hat{r}) = \prod_{i=1}^{n} \hat{B}(x_{i},\hat{r}_{i}) 
\end{equation}
Here $\hat{B}(x_{i},\hat{r}_{i})$ is an open ball (i.e. open interval)
in $\mathbb{R}$ with center $x_{i}$ and radius $\hat{r}_{i}$. Here
$\hat{r}_{i}$ can equal $\infty$ so that $\hat{B}(x_{i},\hat{r}_{i})$
can be equal to $\mathbb{R}$.
Is it true that every such $E(x,\hat{r})$ is an open set in $\mathbb{R}^{n}$ ?
If so, how do you write a given $E(x,\hat{r})$ as the union of a set of
open balls in $\mathbb{R}^{n}$ ? Since the set of open balls in $\mathbb{R}^{n}$ is
a basis for the Eucldean topology, if $E(x,\hat{r})$ is open shouldn't there be a way to do it ?
 A: Open intervals are open in $\mathbb{R}$ (bounded or otherwise) w.r.t. the metric $d(x,y):=|x-y|$. Your set $E(x,\hat{r})$ is a product of open sets in $\mathbb{R}$, so must be open in the the product topology on $\mathbb{R}^n$, which happens to coincide with the Euclidean topology on $\mathbb{R}^n$.
The open sets in $\mathbb{R}^n$ w.r.t. the Euclidean metric $$d_2(x,y):=\left(\sum_{i=1}^n|x_i-y_i|\right)^{\frac{1}{2}}$$ coincide with the open sets in the Euclidean topology (we say that the Euclidean metric induces the Euclidean topology).
In a metric space, every open set can be expressed as a union of open balls, and $E(x,\hat{r})$ is open in the Euclidean metric. It follows that it can be expressed as a union of open balls. When all of your open intervals are bounded, this amounts geometrically to saying that a 'cube' in $\mathbb{R}^n$ can be expressed as a union of 'spheres' in $\mathbb{R}^n$.
However, there are other well-known metrics on $\mathbb{R}^n$ that induce the Euclidean topology e.g. $$d_1(x,y):=\sum_{i=1}^n|x_i-y_i|$$ and $$d_\infty(x,y):=\max_{1\leq i\leq n}|x_i-y_i|.$$ $E(x,\hat{r})$ can be expressed as a union of open balls in any metric that has the same open sets as for the Euclidean metric, such as $d_1$ and $d_\infty$ above.
On your final question: Every open set in the Euclidean topology can be expressed as a union of open balls in any metric that induces the Euclidean topology. Therefore, the open balls in each of these metrics form a basis for the Euclidean topology. But note that each metric gives different open balls.
A: An equivalent way of stating that $E(x, r)$ is a union of open balls is saying that for every $y \in E(x, r)$, there is an open ball $B$ containing $y$ such that $B \subseteq E(x, r)$. For your set, it is easy to show that it is open using this method. More generally, the same proof shows that if $X_1, \dots, X_n$ are metric spaces, and $U_i \subseteq X_i$ are open, then $U_1 \times \dots \times U_n$ is open in $X_1 \times \dots \times X_n$ equipped with any one of the equivalent product metrics.
