# How to prove that the equality relation is an equivalence relation?

Fraleigh's algebra book presents the following

Definition. Let $$X$$ be a set. The equality relation in $$X$$ is the subset $$\{(x,x);\;x\in X\}\subset X\times X.$$

and also

0.19 Example of Fraleigh's algebra book says

For any nonemtpy set $$X$$, the equality relation $$=$$ defined by the subset $$\{(x,x);\;x\in X\}\subset X\times X.$$ is an equivalence relation.

I tried to prove that the equality relation is an equivalence relation. and I failed.

but Tao's analysis1 says in the appendix that equality just obeys the following four $$axioms$$

reflexive, symmetry, transitive, and substitution axioms.

so what is the truth?

Is the equality relation just an equivalence relation by axioms?

or

Is the equality relation provable that it is an equivalence relation?

• Both. You prove equality is an equivalence relation by showing it is reflexive, symmetric and transitive. Don't overthink this. It should be easy. Aug 9, 2021 at 15:14
• After you ask a question here, if you get an acceptable answer, you should "accept" the answer by clicking the check mark $\checkmark$ next to it. This scores points for you and for the person who answered your question. You can find out more about accepting answers here: How do I accept an answer?, Why should we accept answers?, What should I do if someone answers my question?. Aug 12, 2021 at 1:11
• @Shaun sorry.. I appreciate your answer but it is not good enough. Aug 12, 2021 at 4:11
• @Shaun nobody talked about how it's not circular Aug 12, 2021 at 4:12

Is the equality relation just an equivalence relation by axioms?
or
Is the equality relation provable that it is an equivalence relation?

I think the answer depends on the precise meaning of "equality".

Definition 1. We say that "$$x$$ equals $$y$$" and write "$$x=y$$" provided that "$$x$$ is $$y$$", that is, "$$x$$ is identical with $$y$$", that is, "$$x$$ and $$y$$ designate the same entity". In this case, the expression $$x=y$$ is called an "equality" or an "identity".

In this context, reflexivity, symmetry and transitivity are axioms. In view of the given definition, they are quite natural because it is clear (from our intuition) that:

• everything is identical with itself.
• if $$x$$ is identical with $$y$$, then $$y$$ is identical with $$x$$.
• if $$x$$ is identical with a thing that is identical with $$z$$, then $$x$$ is identical with $$z$$.

This idea of equality (identity) arises when we are defining our rules of inference, which are the rules that allow us to prove our theorems. Specifically, at this level of the theory, we have to introduce the

Rule Governing Identities: If $$S$$ is an open formula, from $$S$$ and $$t_1=t_2$$, or from $$S$$ and $$t_2=t_1$$ we may derive $$T$$, provided that $$T$$ results from $$S$$ by replacing one or more occurences of $$t_1$$ in $$S$$ by $$t_2$$. Moreover, the identity $$t=t$$ is derivable from the empty set of premises. (Suppes book, Chapter 5)

This rule (at least according to the Suppes approach, which I believe is the most elementary and usual) is considered as part of our basic first-order predicate logic, where the symbol $$=$$ is treated as a universal logical symbol.

On the other hand, we have the

Definition 2. Given a set $$X$$ and $$x,y\in X$$, we say that "$$x$$ equals $$y$$" and write "$$x=y$$" provided that $$xRy$$, where $$R$$ is the relation defined by $$R=\{(x,x)\mid x\in X\}$$ and called "equality relation".

Here, the fact that the equality (equality relation) is reflexive, symmetric and transitive is a theorem. However, in order to prove it we need the rule governing identity (in particular, we need reflexivity, symmetry and transitivity of identity). It is allowed to use it because it is part of our basic inference rules. And the reasoning is not circular because we are using different ideas of "equality".

Reflexivity: For $$x\in X$$, we have $$(x,x)$$ in the equality relation by definition.

Symmetry: Suppose $$(x,y)$$ is in the equality relation. Then, by definition, $$x=y$$, so $$y=x$$; thus $$(y,x)=(x,x)$$ is in the equality relation.

Transitivity: Suppose $$(x,y), (y,z)$$ are in the equality relation. Then $$x=y$$ and $$y=z$$, so $$x=z$$. Hence $$(x,z)=(x,x)$$ is in the equality relation.

Thus the equality relation is an equivalence relation.

You can prove that the equality relation is an equivalence relation by proving that it fulfill reflexivity, symmetry and transitivity axioms.

• I tried, but I think it's circular. for example, when you proving transitivity, if x=y and y=z then (x, y) = (a, a) for some element $a$ of $X$, (y, z) = (b, b) for some element $b$ of $X$. then x=a, y=a and y=b, z=b. but if you want to conclude x=z, you need to use symmetry and transitivity which I should prove. Aug 9, 2021 at 15:26
• @juso $(x,y)=(a,a)$ then $y=a$, but also $y=b$; hence $a=b$ and therefore $x=z$. Aug 9, 2021 at 15:31
• @amrsa but you used symmetry and transitivity. y=a -> a=y -> y=b -> a=b. can we use it before prove it? Aug 9, 2021 at 15:37
• @juso You're overthinking it, as John Douma put it. If you want to use this reasoning of replacing variables with elements of $X$, keep in mind that you can't replace the same variable with two different elements. So if you replaced it with $a$ and with $b$, then it has to be $a=b$, just because it has to be the same element, not because a property of the equality. Aug 9, 2021 at 15:49
• @juso You’ll indeed use transitivity. But transitivity of the equality as a predicate not of the equality relation as a subset of $X \times X$. Aug 10, 2021 at 13:05

Proof. Set $$E=\{(x,x): x\in X\}$$. We show it satisfies the three conditions one bye one.

• Reflexivity. For any $$x\in X$$, by the definition of the equality relation we have $$xEx$$.
• Symmetry. For any $$x,y\in X$$, if $$xEy$$, also by the definition of the equality relation we have $$x=y$$, and so we have $$yEx$$.
• Transitivity. For any $$x,y,z\in X$$, if $$xEy$$ and $$yEz$$, also by the definition of the equality relation we have $$x=y=z$$, and so we have $$xEz$$.

Therefore, it can be seen a provable theorem with no axioms as premises that the equality relation is an equivalence relation!