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).


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$).

  • $\begingroup$ Differentiate a defining identity ($\stackrel{\operatorname{def}}{=}$, $\equiv$), when something is defined to be equal to something else, and all other sorts of expressions involving $=$. Very often these two are mixed up. In the second case, where it is not a defining identity, the equal sign is used just as a logical predicate (used in equations, for example). Nothing more, nothing less. $\endgroup$
    – dbanet
    Jul 2, 2015 at 22:54
  • 1
    $\begingroup$ This paper might be relevant: math.harvard.edu/~mazur/preprints/when_is_one.pdf $\endgroup$ Jul 3, 2015 at 1:52

4 Answers 4


I think you got the rough idea. We have symbolic expressions and objects, which are two different things. We cannot take the objects themselves and put them on paper, but we can write symbolic expressions that refer to objects, and the objects they refer to are called their values. We might have multiple symbolic expressions that refer to the same object, in which case we say that their values are equal, or that the expressions are equivalent. This is the model-theoretic view, where we have a model that specifies what the value of each expression is.

Based on this view, the properties of equality follow naturally. We write "$x = y$" to mean that the expression "$x$" and "$y$" are equivalent (have equal value). Obviously $x = y$ iff $y = x$. Also, $x = y$ and $y = z$ clearly imply $x = z$.

If your meta-system (the system in which you reason about the meaning of equality in a formal system) is strong enough to let you talk about binary relations, then indeed equivalence of expressions is just an equivalence relation on expressions (which are just a certain subtype of finite strings). There is a one-to-one correspondence between the equivalence classes of expressions and the actual objects to which they refer.

But note that this equivalence relation may not exist within the formal system you are analyzing itself. For example if you are analyzing equality between sets in ZFC, the equivalence relation on expressions (denoting sets) is not a relation in ZFC itself unless you like a contradiction. This issue may not arise in other formal systems, but that is a different topic.

  • $\begingroup$ How does one specify equality as an equivalence relation? Is the reason why the equivalence classes of equality are singletons because each element is equivalent to itself (i.e. It is the only element which shares all and only the same properties with itself and has the same value as itself), but no other elements? $\endgroup$
    – Will
    Jul 3, 2015 at 7:21
  • 1
    $\begingroup$ @Will: I implicitly explained that in my answer. As I said, you must carefully distinguish between expressions and their values. Two expressions may be different but have the same values. Any two expressions with the same value are said to be equivalent, and obviously this is an equivalence relation on expressions. I don't recommend calling it equality unless you are absolutely clear that expressions are simply references to their values and that it is their values that we are calling equal. $\endgroup$
    – user21820
    Jul 3, 2015 at 8:24
  • $\begingroup$ @Will: That is precisely why you have that confusion about equivalence classes under equality. Indeed, the equivalence classes under equality are all singletons because only one object is equal to any given object. What you were asking in your question, however, is about equivalence between two expressions, not their values. In that case clearly the equivalence classes are not singletons! $\endgroup$
    – user21820
    Jul 3, 2015 at 8:26
  • $\begingroup$ @Will: Finally, Rory's answer, while not incorrect, is misleading. He did not make the distinction between objects and expressions clear, and he is not referring to the same notion of equality that people in general (including mathematicians) use, which is the one I described above in my answer. In the general conception of equality, including in mathematical logic, there are no two different objects that are equal. This is so that the size of the model (some world that satisfies a given set of rules) is meaningful. $\endgroup$
    – user21820
    Jul 3, 2015 at 8:36
  • $\begingroup$ I guess I've developed some confusion over the exact meaning/definition of equality between two mathematical objects from trying to understand Leibniz's law as an axiomatic definition of equality. I also struggle to see how equivalence and equality differ, as two quantities $a$ and $b$ are said to be equivalent if they satisfy some equivalence relation, $a\sim b$, however this does not imply that the two quantities are identical... $\endgroup$
    – Will
    Jul 3, 2015 at 9:40

In first-order logic, equality is a binary relation for which these two statements are true:

  1. Any variable or constant is equal to itself. We call this the Reflexive property, and it can be written

$$\text{For all $x$, }x=x$$

or, more formally,

$$\forall x(x=x)$$

  1. If two items are equal, anything we can say about the first item in our logical system we can also say about the other item. If $\mathcal A(u,v)$ stands for any logical statement about items $u$ and $v$, then

$$x=y\implies \left[\mathcal A(x,x)\implies \mathcal A(x,y)\right]$$

I.e. If $x$ and $y$ are equal, and we know some truth about $x$, then we can replace some of the occurrences of $x$ in that truth with $y$ and the statement will still be true.

Equality does not mean that two items are exactly identical in every way, just that they are identical in all the statements we can say in our logical system. If our logical system does not allow us to say something, then the two identical items may act differently in that respect. For example, in our usual axioms of arithmetic, $-0=+0$, even though those two things look different. Most computer CPU's actually allow separate positive and negative zeros, and doing calculations with them can me meaningful in some contexts. However, when we do standard number theory, we have no way of even talking about how $-0$ "looks different from" $+0$. We could say the same about $+i$ and $-i$ in the complex number system being "isomorphic" to each other: in many ways of talking, the two behave just the same.

Equality can also be explained in other ways. The usual laws of equivalence properties, such as reflexitivity ($x=y\implies y=x$) and transitivity ($x=y\text{ and }y=z\implies x=z$) can also be said to be at the root of equality, but those can be proved from the two statements I gave above. There certainly is much more that can be said about equality, but the two statements imply all the rest. For details, see Introduction to Mathematical Logic by Elliot Mendelson, pages 75-82, as well as other parts of the book.

  • $\begingroup$ Good answer on the nature of mathematical equality. I would be intrigued if your answer also touched on material equivalence ($p \iff q$) and logical equivalence ($\theta \dashv\vdash \psi$). $\endgroup$
    – chharvey
    Jul 3, 2015 at 2:01
  • $\begingroup$ Is there a technical reason why in 2. you use a logical statement with two arguments rather than one? $\endgroup$ Jul 3, 2015 at 2:06
  • $\begingroup$ @RoryDaulton Thanks for such a detailed answer. From research that I'd briefly undertaken in the subject the only explanations I could find were things like "two mathematical expressions are equal if they have the same numerical value, or that they represent the same mathematical object", but this didn't seem like a satisfactory explanation to me. $\endgroup$
    – Will
    Jul 3, 2015 at 7:13
  • $\begingroup$ @DavidMyers: That is so we can replace some but not all of the occurrences of $x$ with $y$. For example, we can prove the reflexive property ($x=y\implies y=x$) by taking the statement $x=x$ and replacing only the first occurrence of $x$ with $y$. We can use that and a similar trick to prove the transitive property. $\endgroup$ Jul 3, 2015 at 9:23
  • $\begingroup$ @RoryDaulton Ah that makes sense. Thanks! $\endgroup$ Jul 3, 2015 at 19:14

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.


This may not be formal enough for an answer, but it doesn't seem like you're looking for a purely formal answer.

I would say that $X = Y$ is meant to express that in certain contexts (sometimes explicit and sometimes less explicit), anything that is sufficiently involved in $X$ by some witness can be turned into something sufficiently involved in $Y$ by an analogous witness and vice versa.

For example, in a commutative place $x + y = y + x$, and $2 + 3$ is sufficiently invovled in $x + y$ by the substitution $x \mapsto 2$, $y \mapsto 3$, so we can replace $2 + 3$ by $3 + 2$, which is sufficiently involved in $y + x$ by the same substitution. (Of course, I had to use a notion of sameness to explain a notion of equality...)

Or, if $X$ and $Y$ are isomorphic by some isomorphism $f : X \cong Y : f^{-1}$, then any 'element' $a : A \rightarrow X$ can be turned into an element $f \circ a : A \rightarrow Y$ ('witnessed' by $f$), and vice versa, and any element $b : Y \rightarrow B$ depending on $Y$ can be turned into a element $b \circ f : X \rightarrow B$ depending on $X$. (Note that it might be the case that $X$ and $Y$ are very different mathematical objects --- the set of primes and the set of integers, isomorphic as sets, for example --- but may nevertheless be usefully considered 'equal' in some context.)

Clearly anything sufficiently involved in $X$ can be turned into itself by doing nothing, so this 'relation' is reflexive. And so long as we remain consistent about our criteria for being 'sufficiently involved' and our means of turning witnesses for one involvement into another, this relation will be transitive. Of course, 'consistent' here probably invokes a notion of sameness, so I haven't defined equality so much as used it. I'm not sure there's much of a difference.

Symmetry is also a subtle thing because it constrains the ways we can turn things which are involved in $X$ to things that are involved in $Y$. If instead of an isomorphism between $X$ and $Y$ I just had two functions $f$ and $g$ going opposite ways, then I could still turn things involved in $X$ into things involved in $Y$ and vice versa, but I would not be guaranteed to get the same (there it is again!) thing when I did these processes one after another. Where in a general case I might not have $g \circ f \circ a = a$ (where $=$ here is a prior notion of sameness), I will always have $f^{-1} \circ f \circ a = a$. Careful relaxation of these constraints gives us notions of equivalence and adjunction which can be quite expressive (e.g. models and theories may be interchanged, but at a cost).

About that pesky recurrence of synonyms (same, similar, analogous) when trying to define equality: We could say that "Equality is the smallest equivalence relation on a set", or "Equality is the graph of the identity function", both of which are true (and give the same relation) but of course both depend on a prior notion of sameness. The second wears this prior notion on its sleeve in the definition of the identity function $x \mapsto x$. The first seems like it might not invoke any prior notion at all, except that without a prior notion of sameness it isn't clear that there is any smallest equivalence relation on a set. Whatever the smallest equivalence relation might be, it will be nothing more (and, of course, nothing less) than whatever we thought it would be. Usually we take this to be some kind of syntactic equality, or something of similar context independence (definitional $:=$, as dbanet says above, or judgemental $\equiv$). But even this is not free from issue because sometimes people have terrible handwriting, or are making notes and changed their use of a symbol halfway through the page, or whatever other shenanigans the world can throw in the way of honest mathematics.

Ultimately, equality is done. We make things equal by treating them as such, whether it be two differently scrawled $x$s on a blackboard or two quantities coming from widely different fields. Generally, however, we don't have the kind of freedom that statement might suggest. We try not to wreck our so-far-consistent edifices with indiscriminate equalities. And, more importantly, we are often led, coaxed, or even commanded by the things we talk about to treat apparently different things as equal. We can't really do mathematics without doing equality, and how we do mathematics tells us how to do equality.

On a less bloviating note, I think what you may need about equality is a notion of context dependence. If we just take the equality relation on a set we know nothing about and are doing nothing in particular with, then the equivalence classes can only be singletons because that kind of equality is presumed no matter what. But if we are working not just with any set but with the numbers, and we're adding them, then $1 + 1 = 2$. Or, perhaps a bit more precisely, if we're working with formal sums of numbers (call this set $S$), then the equivalence classes will be quite large. But $S/\sim$ will be the numbers, and again equality here will be singletons. So it depends where we are and what we're doing.

  • $\begingroup$ I see some 'vague' hints of dependent type theory and homotopies... But I really don't get where you are going with all this. I'm not sure the asker will really understand or appreciate much of it, since you said that you can't define equality without knowing equality (which is true), but it's hard to figure out what other things you are saying. Am I just missing something? (I suspect the asker is completely unfamiliar with formal systems in general.) $\endgroup$
    – user21820
    Jul 3, 2015 at 8:44

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .