TITLE: Explaining the meaning of equality
QUESTION [13 upvotes]: I've been tasked with explaining to a group of people what the notion of equality means in mathematics, I've come up with a working explanation, but would appreciate some input, suggestions etc.
Mathematical equality $X=Y$ is a binary relation between two mathematical expressions $X$ and $Y$ which is essentially the statement that the two expressions represent the same mathematical object ($X$ and $Y$ define the same mathematical object) if the equality holds for any value of $X$ and any value of $Y$ (in other words, they share all and only the same properties). If the equality doesn't hold for all values of $X$ and $Y$ then the relation $X=Y$ is a conditional statement that holds for a certain set of values of $X$ and $Y$.
I was then hoping to move on to the notion of equivalence relations and how equality is the archetypal example. How does one define equality as an equivalence relation? Also, is the reason why the equivalence classes of equality (as an equivalence relation) contain only a single element (in each class) simply because the only element which satisfies all the conditions of equality with another element (i.e. shares all and only the same mathematical properties) is the element itself (i.e. each element is equal to itself and only itself).
Hope this is clear enough, apologies if it isn't (I feel like I've confused myself a bit through trying to explain the concept).
$\underline{\textbf{Edit}}$:
Would it be correct to define the notion of equality in terms of equality of sets, i.e. given two sets $A$ and $B$, then $A=B$ if and only if, for every $x\in A$ we have that $x\in B$, and for every $x\in B$ we have that $x\in A$? If this is the case then I can see how equality of (natural) numbers follows, as if we define them as $$0=\emptyset,\;1=\lbrace\emptyset\rbrace,\;2=\lbrace\emptyset,\lbrace\emptyset\rbrace\rbrace,\ldots,n=\lbrace 0,\ldots,n-1\rbrace$$ then it is obvious that $1=0$ is not true because $\emptyset =\lbrace\emptyset\rbrace$ is not true (as $\emptyset\in\lbrace\emptyset\rbrace$, but $\emptyset\notin\emptyset$).

REPLY [3 votes]: It's known at least since Heraclitus $2,500$ years ago that sameness and difference are inseparable.  He famously said "In the same river, ever different waters flow."  Mathematically, Heraclitus' statement is encapsulated in the fact that equality of distinct things can only be conceived using projections.  The projections we use to define two things as the same, define the differences we will overlook in doing so.
A projection is a translation from some set of properties to a subset of those properties, for example we can project some ordered pair $(x,y)$ down to $(x)$.
Two things are considered equal, when some projection of their properties down to a certain domain, coincides exactly.  Equality of some equation in the conventional sense of $1+2=3$ states that these two sentences, projected down to the domain of numeric value, coincide exactly.  This is an equivalence relation.  Of course the string of characters $1+2$ isn't the same as the string $3$.
But even $3=3$ isn't an equality in the ideal sense we might imagine.  No two distinct things are truly equal in the ideal sense of the word, because if they were identical in every way, they would be one thing.  $3\neq3$ because one is the $3$ on the left, was typed first and comprises a certain set of pixels while the other is the $3$ on the right etc.  But generally it's not helpful to maintain that degree of precision in our equality.  But the crux of equality is this: Sameness and difference are one.  The set of differences you are willing to overlook in order to consider two things the same, defines the nature of their equality.