If every pair of points is contained in a connected subset, then the space is connected Suppose for each $a, b \in X$ there exists $A\subset X$ such that $A$ is connected and $a, b\in A$. How to show that $X$ is a connected space?
 A: Consider a continuous function $f:X\to\{0,1\}$. Given a pair of points $a,b\in X$, there is a connected subset $Y$ that contains both. Since $f\mid Y$ is continuous and $Y$ is connected, $f\mid Y$ is constant, so $f(a)=f(b)$. Since $a,b$ were arbitrary, $f$ is constant, so $X$ itself is connected.
A: I will use the following Lemma, the proof of which I leave to you:
Lemma: If $\mathcal C$ is a collection of sets in $X$ with a non-empty intersection, i.e. $\bigcap \mathcal C\neq \varnothing$, then $\bigcup\mathcal C$ is connected.

Theorem: If every pair of points is contained in a connected subset, then the space is connected.
Proof: If $X = \varnothing$, it is trivially connected. Suppose $X\ne \varnothing$. Consider $a\in X$. For every $y\in X$, there exists a connected set $E_{ay}$ such that $a,y\in E_{ay}$. Note that $$X = \bigcup_{y\in X,y\ne a} E_{ay}$$ and $$\bigcap_{y\in X,y\ne a} E_{ay} = \{a\} \neq \varnothing$$ and so $X$ itself is connected. In the last step, I have used the preceding Lemma.
