[example: The Topologist's Sine Curve]
Define the set $S \subset \mathbb{R}^2$ by:
\begin{align*}
S := \left\{\left(x, \sin\frac{1}{x}\right) : x \in (0, 1]\right\} \cup \left(\{0\} \times [-1, 1]\right).
\end{align*}
The first component is the graph of the function $g: (0, 1] \to \mathbb{R}$, $g(x) = \sin(1/x)$, which oscillates with increasing frequency as $x \to 0^+$. The second component is the vertical segment $I = \{0\} \times [-1, 1]$.
Every point of $I$ is a limit point of the graph: for any $(0, y)$ with $y \in [-1, 1]$, there exists a sequence $x_k \to 0^+$ with $\sin(1/x_k) = y$ (since $\sin$ takes every value in $[-1, 1]$ infinitely often on any interval $(0, \varepsilon)$). Therefore $S = \overline{\{(x, \sin(1/x)) : x \in (0, 1]\}}$, and $S$ is the closure of a connected set (the continuous image of the connected interval $(0, 1]$).
However, $S$ is **not** path-connected. Suppose for contradiction that there exists a [continuous](/page/Continuity) path $\gamma: [0, 1] \to S$ with $\gamma(0) = (0, 0)$ and $\gamma(1) = (1, \sin 1)$. Write $\gamma(t) = (\gamma_1(t), \gamma_2(t))$. Let $t_0 = \sup\{t \in [0, 1] : \gamma_1(t) = 0\}$. By continuity of $\gamma_1$ and the fact that $\{t : \gamma_1(t) = 0\}$ is closed, $\gamma_1(t_0) = 0$. For $t > t_0$, we have $\gamma_1(t) > 0$, so $\gamma_2(t) = \sin(1/\gamma_1(t))$.
As $t \to t_0^+$, the values $\gamma_1(t) \to 0^+$, so $\sin(1/\gamma_1(t))$ oscillates between $-1$ and $1$ without settling. But $\gamma_2$ is continuous, so $\gamma_2(t) \to \gamma_2(t_0)$ must exist — a contradiction.
This space therefore demonstrates that the two natural formalisations of "one piece" — connectedness and path-connectedness — genuinely differ.
[/example]