# Prove existence of disjoint open sets containing disjoint closed sets in a topology induced by a metric.

Question: Let $(X, d)$ be a metric space. Let $A$ and $B$ be disjoint subsets of $X$ that are closed in the topology induced by $d$. Prove that there exist disjoint open sets $U$ and $V$ such that $A\subset U$ and $B\subset V$.

Is this proof correct? : By assumption, $A\cap B=\emptyset$, so there is no pair like $(x_A,x_B)$ (i.e., $x_A\in A$ and $x_B\in B$), such that $x_A=x_B$. Because every metric space is Hausdorff, so for every pair $(x_A,x_B)$ there are two disjoint open sets $U_A\ni x_A$ and $V_B\ni x_B$; and thus union of all $U_A$s (which is an open set containing A) are disjoint from union of all $V_B$s (which is an open set containing A).

Thanks a lot for any help.

PS In special case of standard metric topology on $\mathbb{R}$, if $[a,b]$ and $[c,d]$ are disjoint (say $c>b$), intuitively it is apparent that there is a 'space' between $c$ and $b$ so we can have two disjoint open sets, each of them containing $[a,b]$ or $[c,d]$.

• I believe a good way to start this is to show that if $A$ consists of just one point $x$, and if $B$ is some closed set not containing $x$, then show the existence of open and disjoint $U$ and $V$, such that $x$ is an element of $U$, and $B$ is contained in $V$. – Mankind Feb 4 '15 at 9:09
• Then for general $A$ and $B$, you know that each point $x\in A$ together with $B$ has two open and disjoint sets $U_x$ and $V_x$, such that $x\in U_x$ and $B\subseteq V_x$. – Mankind Feb 4 '15 at 9:13

If $A=\emptyset$ it's easy; just take $U=\emptyset$ and $V=X$. Likewise, if $B=\emptyset$, we can take $U=X$ and $V=\emptyset$. Hence we may assume that $A$ and $B$ are disjoint nonempty closed sets.

Recall that the distance from a point $x$ to a nonempty set $Y$ is defined as $$d(x,Y)=\inf\{d(x,y):y\in Y\}.$$

Let $U$ be the set of all points nearer to $A$ than to $B$, and let $V$ be the set of all points nearer to $B$ than to $A$; that is, $$U=\{x:d(x,A)\lt d(x,B)\},$$ $$V=\{x:d(x,B)\lt d(x,A)\}.$$

To see that $A\subseteq U$ observe that, if $x\in A$, then $d(x,A)=d(x,x)=0$, while $d(x,B)\gt0$ since $B$ is closed and $x\notin B$; thus $d(x,A)=0\lt (x,B)$.

To see that $U$ is open, observe that $$U=\{x:d(x,A)\lt d(x,B)\}=\bigcup_{r\in\mathbb R^+}\{x:d(x,A)\lt r\lt d(x,B)\}=\bigcup_{r\in\mathbb R^+}(\{x:d(x,A)\lt r\}\cap\{x:d(x, B)\gt r\}),$$ where the sets $\{x:d(x,A)\lt r\}$ and $\{x:d(x,B)\gt r\}$ are open because $x\mapsto d(x,A)$ and $x\mapsto d(x,B)$ are continuous functions.

For similar reasons, $B\subseteq V$ and $V$ is open. Finally, $U\cap V=\emptyset$ is clear from the definitions of $U$ and $V$.

• @bof: Thank you for your answer, but I don't understand anything ! I entirely edit my question; I highly appreciate it if you please let me know if my proof is correct. – user210902 Feb 4 '15 at 12:33
• @LND Your proof is incorrect. Your sets called (in confusing notation) $U_A,V_B$ apparently depend only on the two points $x_A,x_B$. For instance, if $X=\mathbb R$, and if $x_A=5$ and $x_B=8$, you might choose $U_A=(4.9,5.1)$ and $V_B=(7.9,8.1)$. But what if I told you that $A=[4,5.02]$ and $B=[5.05,9]$? Now you've got $U_A\cap B\ne\emptyset$; that's not going to work, is it? – bof Feb 5 '15 at 5:33