Let $X$ be a topological space. Declare $x\sim y$ in $X$ whenever $x$ and $y$ are contained in some connected subspace of $X$. Then it's easily seen to be an equivalence relation. I am trying to show that any equivalence class $C$ is connected. I came up with the following argument. I'd be grateful if anyone can validate it.
Proof: Let $C$ be a disjoint union of the sets $U\cap C$ and $V\cap C$ ($U$, $V$ open in $X$). We need to show that one of these is empty. If possible, choose $x\in U\cap C$ and $y\in V\cap C$. Now, take a connected subspace $Y$ that contains both $x$ and $y$, and observe that $Y\subseteq C$ so that $Y = Y\cap C$, getting that $Y$ is a disjoint union of nonempty opens $U\cap Y$ and $V\cap Y$, contradicting the connectivity of $Y$.