Suppose a function f:A→B is given. Define a relation ~ on A as follows:

a_1~a_2 ⟺ f(a_1 )=f(a_2)

Since ~ is an equivalence relation, it induces a partition of A into equivalence classes. Describe these equivalence classes in each of the following cases. (R is the set of real numbers).

(c) A=B=R, f(x)=x^2

(d) A=B=R, f(x)=|x|

(f) A=R×R,B=R, f(x,y)=x+y

my approach:

(a): the equivalence class contains no elements because the square of different numbers is different.

(b) : the equivalence class contains the set of real numbers.

(c): don’t know about c

Is my approach anywhere near to correct? I am not so sure about the answers. please help!