# Is it true that for every $x,y\in O, x\neq y,$ there exists an infinite compact subset $K$ of $O$ such that $x,y\in K?$

Question: Let $n\in\mathbb{N}.$ Suppose that $O\subseteq \mathbb{R}^n$ is an open connected subset. Is it true that for every $x,y\in O, x\neq y,$ there exists an infinite compact subset $K$ of $O$ such that $x,y\in K?$

My attempt: Since $x\neq y,$ by Hausdorfness of $\mathbb{R}^n,$ there exist two disjoint open neighbourhoods $U$ and $V$ of $x$ and $y$ respectively. We can assume both $U$ and $V$ are bounded. Then there exists closed subsets $A\subseteq U$ and $B\subseteq V$ that contain $x$ and $y$ respectively. Let $K = A\cup B.$ Then $K$ is a compact subset of $O$ such that $x,y\in K.$

Is my proof correct?

• Did you leave a condition off your statement of the problem? Seems to me that $\{x,y\}$ is compact & contains both. – Lubin Aug 5 '18 at 4:44
• @Lubin I have added the condition that $K$ must be infinite. – Idonknow Aug 5 '18 at 7:06

Since $O$ is connected, for any $x,y \in O$, we can find a path $\gamma : [0,1] \to O$ that is continuos from $x$ to $y$, and the image of this path contains both $x$ and $y$, which is compact since $[0,1]$ is compact and $\gamma$ is continuos.

Hence take $K := \gamma ([0,1])$.

Actually, the question would be much more interesting if it was asking a compact and connected subset $K$ of $\mathbb{R}^n$.

• Yes. I am interested in your second question. But I have no idea how to prove it. Any hint? – Idonknow Aug 5 '18 at 9:45
• @Idonknow If you're talking about K being also connected, the set $K$ that I have given is already connected since $[0,1]$ is connected and $\gamma$ is continuous. – onurcanbektas Aug 5 '18 at 10:41
• Have you studied continuos function in a topological space ? – onurcanbektas Aug 5 '18 at 10:42
• Yes, you are right, as continuity preserves connectedness. – Idonknow Aug 5 '18 at 12:57
• @Idonknow if you are satisfied with the answer, please consider accepting it as an answer by clicking the "tick" sign that is on the left of the answer. – onurcanbektas Aug 6 '18 at 12:54

Too many examples to count. Since $O$ is open and $x\in O$, there is $\varepsilon>0$ such that the ball $B(x,\varepsilon)$ of radius $\varepsilon$ centered at $x$ is contained in $O$. Now take the closure of $B(x,\varepsilon/2)$, also contained in$O$, and compact, since closed and bounded. Finally, take $B(x,\varepsilon/2)\cup\{y\}$.

Is there any typo?

Simply let $K=\{x,y\}$. Then $K$ is a compact subset of $O$ and $x,y\in K$.

• Yes, you are right. I added the condition that $K$ must be infinite. – Idonknow Aug 5 '18 at 7:11