morphisms on topological spaces In the category of topological spaces: 
1.) Show that a morphism is monic IFF it is injective 
2.) Show that a morphism is epic IFF it is surjective
3.) Are there any morphisms that are monic and epic but not invertible? Prove.
4.) Show that every idempotent splits. 
NOTE: A morphism $f: A \rightarrow A $ is idempotent if $ f \circ f = f$.  An idempotent splits if there exits $g$ and $h$ such that $f = hg$ and $gh = 1_{A}$
I understand that in general category theory, a monomorphism can be defined as:
$f: X \rightarrow Y$ such that for all $g_{1}, g_{2} : Z \rightarrow X$
$f(g_{1})=f(g_{2}) \Rightarrow g_{1}=g_{2}$
can I then, just say, therefore $f$ is injective, and then the reverse is simple.  
Or have I over simplified the problem?
I would go the same route for 2.)  I don't know how to approach 3.) and 4.)
 A: *

*Yes, basically that's it. But spell it out, in both directions: If $f$ is injective, then $f\circ g_1=f\circ g_2$ means $f(g_1(z))=f(g_2(z))$ for all $z\in Z$, but then $g_1(z)=g_2(z)$ follows. For the other direction, choose $Z$ to be the one point space.

*If $f:X\to Y$ is surjective, of course $g_1\circ f=g_2\circ f \implies g_1=g_2$. For the converse, if $f$ omits the value $y$, we can let $Z$ be the two point antidiscrete space $\{z_1,z_2\}$, and let $g_1$ be constant $z_1$ and let $g_2(y):=z_2$ but let it be $z_1$ everywhere else.

*Take the identity from the two point discrete space to the two point antidiscrete space, for example.

*If $f:A\to A$ is an idempotent, its range is $B\subseteq A$, then $f|_B=id$. Then let $h$ be the inclusion $B\hookrightarrow A$ and let $g:A\to B$ be the same as $f$ (it makes sense as the range of $f$ is $B$).

A: 1.) Assume that $f$  is not injective. Can you find two distinct maps $g_1,g_2$ such that $f\circ g_1=f\circ g_2$? This would prove that $f$ is not a monic.
2.) Now assume that $f:X\to Y$ is not surjective. Here you have to find two distinct maps $g,h:Y\to Z$ into a space $Z$ of your choice such that $g$ and $h$ coincide on $f[X]$. HINT: A constant map is always continuous.
3.) Once you have shown that the monics are the injections and the epics are the surjection, you just have to find a continuous bijection that is not a homeomorphism.
