Prove equivalence relation

Please critique the following proof and also let me know if I have defined the equivalence classes correctly.

Let $\displaystyle f:A\longrightarrow B$. Define a relation $\displaystyle \equiv$ on A by $\displaystyle a_{1}\equiv a_{2}$ iff $\displaystyle f(a_{1})=f(a_{2})$. Give a quick proof that this is an equivalence relation. What are the equivalence classes? Explain intuitively.

Proof: Test reflexive for $\displaystyle \equiv$. If $\displaystyle a\in A$ then $\displaystyle (a,a)\in A$: Given f is a funcion then $\displaystyle f(a_{1})=f(a_{1})$ implies $\displaystyle a_{1}\equiv a_{1}$ because two different values in the domain cannot be mapped to the same value in the range. Therefore $\displaystyle (a_{1},a_{1})\in A$.

Test symmetric: Let $\displaystyle a_{1}\equiv a_{2}$ where $\displaystyle (a_{1},a_{2})\in A$. Then we know $\displaystyle f(a_{1})=f(a_{2})$. But because = is symmetric we know $\displaystyle f(a_{2})=f(a_{1})$ and since $\displaystyle \equiv$ is defined with iff, we know $\displaystyle a_{2}\equiv a_{1}$ which implies $\displaystyle (a_{2},a_{1})\in A$.

Test transitive: Let $\displaystyle a_{1}\equiv a_{2}$ and $\displaystyle a_{2}\equiv a_{3}$ where $\displaystyle (a_{1},a_{2})(a_{2},a_{3})\in A$. Then we know $\displaystyle f(a_{1})=f(a_{2})$ and $\displaystyle f(a_{2})=f(a_{3})$. Because = is transitive we know $\displaystyle f(a_{1})=f(a_{3})$, but because $\displaystyle \equiv$ is defined with iff, we can conclude that $\displaystyle a_{1}\equiv a_{3}$. So $\displaystyle (a_{1},a_{3})\in A$.QED

The equivalence classes in A would be the sets $\displaystyle \{(a_{i},a_{j})\in A$ such that $\displaystyle a_{i}=a_{j})$.