Equivalence Relation on Integers Modulo 5 induced by Squaring

Theorem
Let $\beta$ denote the relation defined on the integers $\Z$ by:
 * $\forall x, y \in \Z: x \mathrel \beta y \iff x^2 \equiv y^2 \pmod 5$

Then $\beta$ is an equivalence relation.

Proof
Checking in turn each of the criteria for equivalence:

Reflexivity
We have that for all $x \in \Z$:


 * $x^2 \equiv x^2 \pmod 5$

It follows by definition of $\beta$ that:
 * $x \mathrel \beta x$

Thus $\beta$ is seen to be reflexive.

Symmetry
Thus $\beta$ is seen to be symmetric.

Transitivity
Let:
 * $x \mathrel \beta y$ and $y \mathrel \beta z$

for $x, y, z \in \Z$.

Then by definition:

Thus $\beta$ is seen to be transitive.

$\beta$ has been shown to be reflexive, symmetric and transitive.

Hence by definition it is an equivalence relation.