How to show that X is connected ? Let ∼ be an equivalence relation on a topological space X such that
each equivalence class is connected and the quotient space X/ ∼ is
connected. Show that X is connected.
My  thinking that:  let $p\colon X \to Y$ be a quotient map  as  that if each set $p^{-1}({y})$ is connected, and if $Y$ is connected, then $X$ is connected. 
I don't know the proper proof 
Pliz help me 

Let $D = \{0,1\}$ be the two-point set with the discrete topology. 
A space $X$ is connected iff every continuous function to $D$ is constant, so apply that to our situation:
$q: X \to Y$ onto and quotient and let $f: X \to D$ be continuous.
For every $y \in Y$ the set $q^{-1}[\{y\}]$ is connected and so maps under $f$ to a single point of $D$ which I define to be $g(y)$. This defines a function $g: Y \to D$.
Note that $g \circ q = f$ (because in defining $g(q(x))$ we look at the fibre of $q(x)$ which contains $x$ which is mapped to $f(x)$ in $D$) and so by the universal mapping property of quotient maps $g$ is continuous because $f$ is.
Now, as $Y$ is connected $g$ is constant, and so $f$ is constant as well. 
This shows $X$ is connected.
