Set is Open iff Union of Open Balls

Theorem
Let $M = \left({A, d}\right)$ be a metric space.

Let $U \subseteq A$.

Then $U$ is open in $M$ iff it is a union of open balls.

Necessary Condition
Let $U$ be open in $M$.

Let $a \in U$.

Then by definition of open set:
 * $\exists \delta_a \in \R_{>0}: B_{\delta_a} \left({a, d}\right) \subseteq U$

where $B_{\delta_a} \left({a, d}\right)$ is the open $\delta_a$-ball of $a$ in $M$.

Therefore:
 * $\displaystyle U = \bigcap_{a \mathop \in U} B_{\delta_a} \left({a, d}\right)$

and so $U$ is a union of open balls.

Sufficient Condition
Let $U$ be a union of open balls of $M$.

Let the centers of these open balls be the elements of an indexing set $I$.

Then $U$ can be written as:
 * $\displaystyle U = \bigcap_{a \mathop \in I} B_{\delta_a} \left({a, d}\right)$

where $\delta_a \in \R_{>0}$ is the radius of the open ball of $a$.

Let $x \in U$.

Then by definition of union:
 * $\exists a \in I: x \in B_{\delta_a} \left({a, d}\right)$

From Open Ball is Neighborhood of all Points Inside, $B_{\delta_a} \left({a, d}\right)$ is a neighborhood of $x$.

By Set is Subset of Union:
 * $B_{\delta_a} \left({a, d}\right) \subseteq U$

From Superset of Neighborhood in Metric Space is Neighborhood, it follows that $U$ is a neighborhood of $x$.

Since $x$ is arbitrary, it follows that $U$ is a neighborhood of each of its points.

Hence by definition, $U$ is open in $M$.