TITLE: Trouble understanding equivalence relations and equivalence classes
QUESTION [6 upvotes]: I've read up a bit on equivalence relations and equivalence classes, but I'm a bit unsure on the whole concept.
From what I've read and equivalence relation, ~, between two mathematical objects $a$ and $b$ is a binary operation satisfying reflexivity, symmetry and transitivity.
Does this mean, that if two objects satisfy a given relation that satisfies the above properties, then these two objects can be considered equivalent (with respect to this relation)? For example, in physics if I have two Lagrangians that differ by a total derivative then they both lead to the same equations of motion, and thus describe the dynamics of the same physical system (correct?!), so would it be correct to say that these to Lagrangians are equivalent under the relation that they lead to the same equations of motion, i.e. $$\mathcal{L}:=\mathcal{L}+\frac{df}{dt} \quad\iff\quad \delta S_{1}= \delta S_{2}$$ where $S_{1}=\int \mathcal{L}\;dt$ and $S_{2}=\int [\mathcal{L}+\frac{df}{dt}]\;dt$.
Using the same example, could one then define a Lagrangian for a particular theory as the equivalence class of Lagrangians that lead to the same equations of motion?
I guess my real issue is that the definition that I've read seems very abstract and I'm unsure how to relate it to specific examples?! I get that two objects that satisfy a particular equivalence relation aren't actually equal, but is the idea that if we define a particular equivalence relation, we can then form a set of objects that satisfy this relation, which we call an equivalence class, and then if we have a particular problem that utilises this relation, then we can use any element of the equivalence class as they all satisfy this particular relation, so relative to a problem involving this particular relation, they are equivalent. (Is it kind of like a restricted equality relation? For example, saying that $y=x^{2}$ for $0<x<1$)?!
Sorry if this isn't worded very well, just trying to explain what my thoughts are on the subject so far.

REPLY [4 votes]: Following is an elaborate example that will help solidify the concept of  partitions, equivalence classes and equivalence relations.
A mathematician has quite a bit of stuff in his garage (in an objective assessment, some of it would be called junk). In fact, it has been so long since he has even stepped inside it, that he realizes that the items form an amorphous set that he denotes by $J$, and he can only classify the items with the coarsest partition, $\{J\}$. Not much to say about all that junk in the garage.
One day he decides to tackle this problem. He starts by labeling the items with stickies and indexing the labels with $\{1,2,\dots,n\}$. He also write down on a piece of paper a descriptions for each index,
$\quad 1: \text{Dull screwdriver with blue handle}$
$\quad 2: \text{Empty coffee can}$
$\quad etc.$
He now feels comfortable by defining the 'finest' partition consisting of all the singleton sets $\{1\}$, $\{2\}$, $\dots$, and $\{n\}$. He also starts to use colored markers on the list to group items together that exhibit some affinity, at least in his mind.
Weeks later he has finished his goal. He hires a carpenter to put up five shelves, $A, B, C, D, E$ in his garage. When the work is completed he goes into the garage and puts every item on his list on one of the five shelves.
Of course since he is mathematician he looks at the equivalence relation he has created,
$\quad j \sim k \text{ iff } k \text{ is on the same shelf as } j$
He goes back to thinking about more interesting things, but years later he needs a screwdriver. Unfortunately he can't find that marked up paper and has no idea what shelf the screwdriver is on.