# Why is this set open? (Preimage)

Let $$(M,d)$$ be a complete metric space and $$A$$ be a closed subset of $$M$$. Then the set $$$$B:= \{x\in M: d(x,A) < 1/2\} \quad \text{is open}.$$$$ ($$d(x,A)= \inf_{y\in A} d(x,y)$$)

Why would that be the case? If $$B=\{x\in M:0 then one could argue that B is the preimage of an open set and thus be open since $$d$$ is continous as a metric. But the set above is also containing $$x_0\in M$$ such that $$d(x_0,A)=0$$. So that argument would'nt work right or am I missing something?

• Have you considered $B$ as a union of open balls? Apr 1 at 16:51

Here's another way.

To show that $$B$$ is open, we can take any $$x \in B$$ and show that there exists a ball $$D (x, \varepsilon)$$ such that $$D (x, \varepsilon) \subseteq B$$.

So, take arbitrary $$x \in B$$. Then we have $$d (x, A) < \frac{1}{2}$$. Consider the ball $$C = D \left( x, \frac{1}{2} \left( \frac{1}{2} - d (x, A) \right) \right)$$. We show $$C \subseteq B$$. For take any $$x' \in C$$. Then $$d (x', x) < \frac{1}{2} \left( \frac{1}{2} - d (x, A) \right)$$. By triangle inequality applied over the infimum,

$$d (x', A) \le d(x', x) + d(x, A) < \frac{1}{2} \left( \frac{1}{2} - d (x, A) \right) + d (x, A) = \frac{1}{2} \left( \frac{1}{2} + d(x, A) \right)$$

It follows from the above that $$d(x', A) < \frac{1}{2} \left( \frac{1}{2} + d (x, A) \right) < \frac{1}{2} \left( \frac{1}{2} + \frac{1}{2} \right) = \frac{1}{2}$$, so that $$x' \in B$$. Since $$x'$$ was arbitrary, we have that $$C \subseteq B$$. And since $$x$$ was arbitrary, $$B$$ is open.

Note that we did not have to use the fact that $$A$$ is closed. The proof still applies if $$A$$ is not closed.

For $$A\subset M$$ ( needn't be closed), $$d_A:X\to\Bbb{R}$$ defined by $$d_A(x) =d(x, A)$$

is continuous map ( even uniformly continuous, even Lipschitz map)

$$B_1=d_A^{-1}\{(-\infty, \frac{1}{2})\}$$

$$B_2=d_A^{-1}\{(0, \frac{1}{2})\}$$

Side note: For $$A\subset M$$ closed, $$B_2=(M\setminus A) \cap B_1$$.

• Hey thanks. So B_1 and B_2 are open as they are preimages of open sets and d_A is a continuous function. Then B can be written as the intersection of B_1 and B_2 and therefore as the intersection of open sets again a open set, right? Apr 1 at 17:19
• The set you have defined as $B$ is same as $B_1$ here. Apr 1 at 17:29
• Ah right, thanks! Apr 1 at 17:35