Topological space which is not path connected but has a continuous surjection on a Space which is path connected

general-topology

I am trying to learn a bit about topology and I've found a problem, where I have to construct a topological space which is not path connected but has a continuous surjection on a space which is path connected.

My idea was that I could take connected space which is not path connected and map every open set on a single point. This single point should be path connected and the mapping fulfills the requirement.

However, I am not sure if this is right and I need a few hints

Best Answer

Just take $X=[0,1]\times \{ 1,2\}$ and send it to $[0,1]$ by $\pi:X\to [0,1]$ given by $\pi(x,n)= x$. This is a continuous surjection, but the domain is disconnected while the image is path connected.