# Finding The Equivalence Class

Okay, so the question I am working on is, "Suppose that A is a nonempty set, and $f$ is a function that has A as its domain. Let R be the relation on A consisting of all ordered pairs $(x, y)$ such that $f(x)=f(y)$.

a)Show that R is an equivalence relation on A.

b)What are the equivalence classes of R?"

I was able to part a, but I am not certain how to answer part b. I know that the domain is the set A, but what is the range? And when you say that $f(x)=f(y)$, does that mean that a function is equal to its inverse? Like for instance, $\Large y=\frac{1}{x}$

-
We are not defining $y$ in terms of $x$ via the equation $f(x)=f(y)$. Nor are we defining the function in terms of this equation. Rather, the function is already a priori given to us, and we construct the set $R$ out of it, comprised precisely of all ordered pairs $(x,y)$ for which $f(x)=f(y)$ happens to holds true. –  anon Nov 9 '12 at 23:48
So, when I plug in x into the functions f(x) and f(y), I should get the same output, namely, y? And that is the condition for an ordered-pair to be in the relation? –  Mack Nov 9 '12 at 23:52
$f$ is a function that maps elements of $A$ to some other set, and $f(x)$ is the function $f$ evaluated at $x\in A$, i.e. the output of $f$ when the input is $x$. Just as $f(y)$ is the output of $f$ when the input is $y\in A$. You seem to be thinking in a strange mixture of different viewpoints, one of them involving $x$ as input and $y$ as output (often used in, say, graphing equations), which is not what is going on here. We are saying if we take two inputs $x,y$ from the domain $A$, they are in relation to each other ($x\sim y$) if and only if they have the same output under $f$. –  anon Nov 10 '12 at 0:24
Could you read my comment on Peter Smith's response to my question? Because it seems that what I said was correct, even though he thought it was wrong. –  Mack Nov 10 '12 at 0:29
No, f(x) and f(y) are not two different functions. We say either (a) $x\mapsto f(x)$ and $y\mapsto f(y)$ are the same function [sometimes the $\mapsto$ part is suppressed, so we say that $f(x)$ is a function, but clearly having more then one input is confusing you], or (b) neither $f(x)$ or $f(y)$ are functions, but are rather values taken in the codomain, and are in particular the outputs of f corresponding to the inputs x and y respectively. It is not correct that x=y is necessary for f(x)=f(y). (If f is a constant function, for instance, then f(x)=f(y) is true for any pair x,y.) –  anon Nov 10 '12 at 0:45

The equivalence classes are all sets of the form $\{a\in A:f(a)=b\}$ for $b$ in the range of $f$. $f(x)=f(y)$ simply mean that $x$ and $y$ are mapped to the same element, not that the function is its inverse.

-
So, $f(x)=b=f(y)$ when $a$ is substituted into the function $f$? –  Mack Nov 10 '12 at 15:31

Let's say that $f$ discriminates $x$ from $y$ if it maps $x$ and $y$ to different objects, i.e. if $f(x) \neq f(y)$. Then the corresponding $R$ relation is defined to hold between $x$ and $y$ when $f$ doesn't discriminate them.

"When you say that $f(x)=f(y)$, does that mean that a function is equal to its inverse?" Not at all. $f$ can be any function you like here: to repeat, we are just told that the corresponding $R$-relation is defined to hold between $x$ and $y$ just when the function $f$ (whatever it is) happens to map $x$ and $y$ to the same thing, so doesn't discriminate.

So, as you say, that evidently makes $R$ (i.e. being indiscriminable-by-$f$) an equivalence relation. What are its equivalence classes? Well they must be classes such that objects are in the same class when $f$ doesn't discriminate them. It is as simple as that!

-
So, let me see if I understand. As you said, $f(x)$ and $f(y)$ do not have to be inverses of each other--one is just some function of x, and the other is just some function of y. And so, an ordered pair $(x,y)$ can only be in the relation on the set A if, when I plug x into the $f(x)$, and y into $f(y)$, the two functions have the same output value? I am still having trouble seeing how to find part b. In the answer key, they talk about inverse images. –  Mack Nov 9 '12 at 13:33
@EMACK: No, $f$ is the function — just $f$. $f(x)$ is the value given by applying that function to some variable named $x$, $f(y)$ is the value given by applying that same function to $y$, $f(q)$ is the value given by applying the function to $q$, $f(\aleph)$ is the value given by applying $f$ to $\aleph$, and so on. –  Ilmari Karonen Nov 9 '12 at 13:57
By convention, functions are often defined by an expression that gives their value for some argument $x$, such as "$f(x) = x^2 - x + 1$". This just means that, when you apply the function to some value that is not named $x$, you'll get the value of the function by replacing all occurrences of $x$ in the expression with the actual argument of the function, e.g. $f(z/2) = (z/2)^2 - z/2 + 1$. –  Ilmari Karonen Nov 9 '12 at 14:03
@EMACK As Ilmari Karonen is gently pointing out, you do seem to have very fundamentally misunderstood standard function notation. What to do? As always in such a case, read two or three explanations in different textbooks: with luck, reading more than one presentation will help you iron out any bad misunderstandings. –  Peter Smith Nov 9 '12 at 15:09

I will give an example:

Let $f:\mathbb{R}\to \mathbb{R}$ with $f(x)=x^2$.
Then $x$ is equivalent to $-x$ because $f(x)=f(-x)$.
The equivalence classes are $\bar{x} = \{y \in \mathbb{R}:f(x)=f(y)\}=\{x,-x\}$ for $x \in \mathbb{R}$. Thus the equivalence classes are $\{\bar{x}:x\geq0\}$.

Observe that $\{x,-x\}=f^{-1}\left(\{x\}\right)$. In general the equivalence classes are $\{f^{-1}\left(\{y\}\right): \ y \text{ in range of } f\}$.

-
If $f^{-1}$ doesn't exist, you can't write $f^{-1}( y )$ but you can write $f^{-1}( \{ y \} )$ which is the set of the numbers whose image by $f$ is $y$. –  xavierm02 Nov 9 '12 at 13:29
Correct, I will edit. –  P.. Nov 9 '12 at 13:34