[Math] $5 \mid n^2 – m^2$ is an equivalence relation

elementary-set-theoryequivalence-relationsrelations

How can I show this is an equivalence relation:

$$
n \operatorname{R} m \Longleftrightarrow n^2 – m^2 \textrm{ is divisible by } 5
$$

I know equivalence relations are symmetric, reflexive and transitive. I'm just not sure how to use this knowledge to prove it.

Best Answer

We need to show that for all integers $x, y, z$, the relation $$R = \{(m, n): m^2 - n^2 \;\;\text{is divisible by 5}\}$$ is reflexive, symmetric, and transitive.

We will use the notation $\;5 \mid m^2 - n^2$ to denote "$m^2 - n^2$ is divisible by $5$."

Let $x, y, z \in\mathbb{Z}$

Reflexive:
We need to show that for any $x \in \mathbb Z$, $x\,R\, x$. Now $x^2-x^2=0$. Since $0$ is divisible by every integer, it is also divisible by 5, so the relation is reflexive.

Symmetric
We need to show that for any $x, y \in \mathbb Z$, if $x\,R\,y$ then $y\,R\,x$. So, suppose $x\,R\,y$. This would mean that $\,5 \mid x^2 - y^2$. Then $\,5 \mid -(x^2-y^2)=y^2-x^2$. So $\,5\mid y^2 - x^2\,$, hence $y\,R\,x$ and the relation $R$ is therefore symmetric.

Transitive
We need to show that if $x\,R\,y\,$ and $\,y\,R\,z\,$, then $x\,R\,z.\,$ So: suppose $x\,R\,y$ and $y\,R\,z$. It follows that $\,5\mid (x^2 - y^2)$ and $\,5\mid y^2 - z^2$. But then $$5 \mid \left[(x^2 - y^2) + (y^2 - z^2)\right] = x^2 - y^2 + y^2 - z^2 = x^2 - z^2.$$ So $5 \mid x^2 - z^2$, which means $x\,R\,y$, and the relation is therefore transitive.

Since our choice of $x, y, z \in \mathbb Z$ was arbitrary, it holds that $R$ is an equivalence relation on the set of integers, since it is reflexive, symmetric, and transitive.

Related Question