The rational numbers
\(\mathbb{Q}\text{,}\) with the subspace topology from
\(\mathbb{R}\text{,}\) are neither connected nor path-connected.
We first show that \(\mathbb{Q}\) is disconnected. Fix any irrational number, say \(\alpha = \sqrt{2}\text{,}\) and set
\begin{equation*}
U = \mathbb{Q}\cap (-\infty,\alpha), \qquad V = \mathbb{Q}\cap (\alpha,\infty).
\end{equation*}
Both \(U\) and \(V\) are nonempty (e.g., \(1\in U\) and \(2\in V\)), and they are open in \(\mathbb{Q}\) since each is the intersection of \(\mathbb{Q}\) with an open interval. Since \(\alpha\notin\mathbb{Q}\text{,}\) we have \(U\cup V = \mathbb{Q}\) and \(U\cap V = \varnothing\text{,}\) so this is a separation of \(\mathbb{Q}\text{.}\)
Since
\(\mathbb{Q}\) is disconnected, it is not connected. It therefore cannot be path-connected, by
LemmaΒ 2.8.3(3).