Suppose $(X,d)$ is metric space. I want to show that $A \subseteq X$ is open iff $A$ is union of open balls.
My attempt. suppose $A$ is open, then for every $x \in A$, there exists $r>0$ such that $B(x,r) \subset A$ by definition. We claim that $A = \bigcup_{x\in A} B(x,r) $. To see this, pick $x \in A$, then can find $r>0$ such that $x \in B(x,r) \subseteq \bigcup B(x,r)$. Conversely, suppose $y \in \bigcup B(x,r) \implies y \in B(x,r) $ for some $x$. But $B(x,r) \subseteq A$ for some $x$, hence $y \in A$. So, our claim is proved.
For the other direction, suppose $A = \bigcup_{\alpha} O_{\alpha} $ where $O_{\alpha}$ is open ball. Take $x \in A$, then $x \in O_{\alpha} $ for some $\alpha$. But $O_{\alpha} \subseteq \bigcup O_{\alpha} = A $. So, we have found an open ball inside $A$, and since $x$ was chosen arbitrary, then $A$ must be an open set by definition.
Is this correct? Any feedback would be greatly appreciated. thanks