Here is the question:
Show that if $f: X \rightarrow Y$ is surjective continuous function, and if $X$ is connected, then $Y$ is also connected.
Where we have the following:
we say a space $X$ is connected if the only separations that $X$ has are trivial separations.
A separation of a space $X$ is a continuous function $f: X \rightarrow Z,$ where $Z$ is the discrete two-point space. we say that a separation $f: X \rightarrow Z,$ of the space $X$ is a trivial separation if it is a constant function.
Still I do not know how to prove the question, could anyone help me please?
Hint: Suppose $Y$ is not connected, i.e. there exists a continuous surjection $g\colon Y\to Z$. Is $g\circ f\colon X\to Z$ a trivial separation?