A union of finitely many open balls in $X$ is a bounded subset of $X$ I’m working in metric spaces, and I know that I need to find $r>0$ but I don’t know how. I tried the triangle inequality, but nothing seems to be working.
 A: Let $x_k$ and $r_k$ be the center and the radius of the $k$-th ball for $k=1,\dots,n$. Then the set
$$\bigcup_{i=1}^n B(x_i,r_i)$$
is contained  inside the open ball with center $x_1$ and radius
$$R=\max\{d(x_1,x_i)+r_i: 1\leq i\leq n\}.$$
In fact, if $x\in\bigcup_{i=1}^n B(x_i,r_i)$ then $x$ belongs to $B(x_i,r_i)$ for some $i$. Then, by the triangle inequality,
$$d(x_1,x)\leq d(x_1,x_i)+d(x_i,x)<d(x_1,x_i)+r_i\leq R.$$
A: If you have only one ball then this is trivial. Otherwise, let $B(x_{1},\epsilon_{1}),\ldots,B(x_{n},\epsilon_{n})$ be your finite collection of balls. Let $\eta=\max\{d(x_{i},x_{j}):1\leq i,j\leq n\}$. Then $d(x_{i},x_{j})<\eta$ for all $i,j$. Then let $\delta=\max\{\epsilon_{1},\ldots,\epsilon_{n}\}$. Then $B(x_{1},\eta+2\delta)$ contains $\bigcup_{i=1}^{n}B(x_{i},\epsilon_{i})$ and the $B(x_{1},\eta+2\delta)$ is bounded by $2\eta+4\delta$.
Why is $B(x_{1},\eta+2\delta)\supseteq\bigcup_{i=1}^{n}B(x_{i},\epsilon_{i})$ true? Let $x\in\bigcup_{i=1}^{n}B(x_{i},\epsilon_{i})$. Then there is a $i$ such that $x\in B(x_{i},\epsilon_{i})$. Then, by the triangle inequality
$$d(x,x_{1})\leq d(x,x_{i})+d(x_{i},x_{1})<\epsilon_{i}+\eta<2\delta+\eta$$
so $x\in B(x_{1},\eta+2\delta)$.
