So far my proof goes like this. Let $(S, d)$ be a connected subspace of $(X, d)$. By contradiction, suppose $\overline S$ is not connected. Then, we can write $\overline S = A \cup B$, where $A, B$ are non-empty, disjoint, open (in $\overline S$) subsets of $\overline S$. Moreover, since $S \subset \overline S$, then $S = (S \cap A) \cup (S \cap B)$. Take $x \in S$, and assume without loss of generality that $x \in A$. Then it follows that $S\cap A \neq \varnothing$. How can I show that $S \cap B \neq \varnothing$ to get a contradiction?
Prove that the closure of a connected subset is also connected
connectednessreal-analysis
Related Solutions
The topology of $\mathbb{Q}$ is the subspace topology induced from $\mathbb{R}$ and, for instance, $(x, \infty) \cap \mathbb{Q}$ is open in $\mathbb{Q}$, so everything is fine. You can write $(x, \infty) \cap A$ as $(x, \infty) \cap \mathbb{Q} \cap A$. When taking subspace topologies, you can easily check that it makes no difference if you take it in two steps $(\mathbb{R} \to \mathbb{Q}, \mathbb{Q} \to A)$ or in one step $(\mathbb{R} \to A)$. In particular, being connected is a property of the topological space $A$, regardless of what ambient space it is embedded into.
In fact the result is more general and true for any connected topological space $X$, which is the case for $\mathbb R^n$ endowed with the topology induced by the usual distance.
Let’s suppose that $A \neq \emptyset$. We’ll deal with the case $A = \emptyset$ at the end of the answer.
Suppose that $D,E$ are open sets of $X$ with $A \cup B \subseteq D \cup E$ and $D \cap E = \emptyset$. As $A$ is supposed to be connected, we can suppose without loss of generality that $A \subseteq D$. We’ll prove that $U=E \cap (A \cup B)$ is open and closed in $X$ hence empty as in a connected space the only subspaces that are both closed and open are the empty set and the space itself. This will provide the conclusion.
Let’s first notice that $U \subseteq B$ as $D \cap E= \emptyset$ and therefore $U= E \cap B$.
$U$ is open
Take $b \in U$. We have $b \notin \overline{A}$ as $b \in \overline{A}$ would imply the contradiction $E \cap A \neq \emptyset$ as $E$ is open. The hypothesis $B \cap \overline{C}= \emptyset$ allows to state $b \notin \overline{C}$. We also have $b \notin \overline{A \cup C}$ as $\overline{A \cup C} \subseteq \overline{A} \cup \overline{C}$. So $b$ belongs to the open subset $V =X \setminus \overline{A \cup C}$ that is included in $B$. And also to the open subset $E \cap V$ that is included in $U$. This proves that $b$ belongs to the interior of $U$. As this is true for all $b \in U$, $U$ is equal to its interior and is open.
$U$ is closed
Take $x \in \overline{U} = \overline{E \cap B}$. As $\overline{E \cap B} \subseteq \overline{E} \cap \overline{B}$, we have $x \in \overline{B}$ and $x \notin C$ according to the hypothesis $\overline{B} \cap C =\emptyset$. Hence $x \in A \cup B$. $x$ cannot belong to $A$: if that would be the case, $x$ would belong to the open set $D$ and $D$ would intersect $U$ and therefore $E$, a contradiction. We get $x \in B$ and as $x \notin D$, we have $x \in E$ and finally $x \in U$. So $U = \overline{U}$, proving that $U$ is closed.
The case $A = \emptyset$
In that case, the space $X$ is the union of $B$ and $C$. $B$ and $C$ are open and closed subsets of the connected space $X$ and are therefore connected. We’re done!
The result doesn’t hold if $X$ is not connected. Take for example $X=\{1,2,3\}$ endowed with the topology induced by the metric distance and $A=\{1\}$, $B=\{2\}$ and $C=\{3\}$.
Note: this answer is based on following one of the excellent French math site les-mathematiques.net.
Best Answer
I am not sure how to hint more in the comments without giving away the answer, so I guess I should respond with an answer. Also, I should apologize that I made things more complicated than necessary in the comments; in particular, in the end, there was no real reason to introduce another small open $U$. I'm not sure why I thought there was. Anyways...
You can use the following characterization of closures: a point $p\in X$ is in the closure $\bar S$ of $S$ iff every neighborhood of $p$ intersects $S$ (otherwise, if $V$ is a neighborhood of $p$ disjoint from $S$, then $\bar S\cap(X\setminus V)$ would be a smaller closed set containing $S$, a contradiction).
In the present case, we pick $p\in B\subset\bar S$. Since $B$ is open, it is an open neighborhood of a point of the closure, so we must have $B\cap S\neq\emptyset$.