Suppose that $f : A \to B$ is a surjective function. Define the following relation on $A$: $$ a_1 \sim a_2 \text{ if and only if } f(a_1) = f(a_2).$$ Show that this is an equivalence relation. Denote by $A/\sim$ the set of equivalence classes of $\sim$. Prove that $|A/\sim| = |B|$.
I find it difficult to get started, is there anyone who can help me?