Let $f:A\to B$ be a surjective function. I am asked to find a relation $R$ such that
$\bar{f}: A/R \to B$
$[a]\mapsto \bar{f}([a]) = f(a)$
My thoughts on this problem are that, for $\bar{f}$ to be well defined, it cannot depend on the representative i.e. if $[a]=[b]$ then $\bar{f}([a]) = \bar{f}([b])$. But I don't know how to keep going.
I have defined $R$ to be $aRb \iff f(a) = f(b)$. I have also proved that $R$ is an equivalence relation, but I don't know how to prove the $\bar{f}$, with $R$ defined like this, is bijective. Does anyone know how?
Hint:
$\bar f$, defined by $\bar f\bigl([a]\bigr)=f(a)$ is injective by construction, and it is not hard to check that it is surjective because $f$ is by hypothesis.