I have read about equivalence classes a lot but unable to understand exactly what they are. I know about equivalence relations, but I am having a hard time understanding what equivalence classes are exactly.
Can anyone explain the concept of equivalence classes clearly?
Just in case you wanted a nice example: Consider the following shopping list made into a mathematical set $S$ \begin{equation} S = \{a=\text{apple}, b=\text{banana}, c=\text{chicken}, d=\text{date}, e=\text{elk}\}. \end{equation}
Define the equivalence relation to be \begin{equation} aRb\text{ if and only if a is the same food "type" as b}. \end{equation}
For example $a=$ apple is related to $b=$ banana as they are both fruit or $c=$ chicken is related to $e=$ elk as they are both meats. Now I would like to organise these items into "bags" (equivalence classes) of equivalent "items" (elements of set $S$). To start I'll pick all the items equivalent to $a=$ apple
\begin{equation} \{x\in S\text{ such that }xRa\}=\{a=\text{apple},b=\text{banana}, d=\text{date}\} \end{equation} and now I'll pick all the items equivalent to $c=$ chicken \begin{equation} \{x\in S\text{ such that }xRc\}=\{c=\text{chicken}, e=\text{elk}\}. \end{equation} Now I could pick any other element to create an equivalence class but the result would be a set equal to one of the ones we already have and thus we won't bother, but technically each element creates an individual equivalence class. Note that the equivalence classes above partition the original set and are disjoint (in general the equivalence classes will be either equal or disjoint), and that I could pick any element from each set as a representative of what is inside the "bag" (imagine a picture of a banana on the outside of the bag representing the bag that has fruit in it).