Let $f : A \to B$ be a surjective function. Let us define a relation on $A$ by setting $a_0$ ~ $a_1$ if $f(a_0) = f(a_1)$. This relation is an equivalence relation. Let $A^*$ be the set of equivalence classes. Show that there is a bijective correspondence of $A^*$ with $B$
Now if $E$ is an equivalence class, then $E = A^*$, as two equivalence classes are either equal or disjoint. So $A^* = \{a_i :a_i$ ~ $a_j \} = \{a_i : f(a_i) = f(a_j)\}$
I need to prove that $f$ needs to be both surjective and injective to prove a bijective correspondence between $A^*$ and $B$. But I'm not sure how to go about doing so, in this specific case, Any hints would be appreciated.
Hint: You can define a new function $\overline{f}: A^* \to B$ by $$\overline{f}([a]) = f(a)$$
I claim that $\overline{f}$ is a bijection. To prove this, you'll need to show that: