Question # Consider a relation R on Z — {0} defined by the rule that (z,y) \in R if and only if xy > 0. How many distinct equivalence classes are there?

Discrete math
ANSWERED Consider a relation R on Z — {0} defined by the rule that (z,y) $$\displaystyle\in$$ R if and only if xy > 0. a) Prove that R is an equivalence relation. b) Determine all elements in the equivalence class containing 1. How many distinct equivalence classes are there? 2021-07-31

Given the relation R on Z−{0} defined by
(x,y) $$\displaystyle\in$$ R if and only if xy > 0.
a) A relation R on a set A is an equivalence relation if and only if R is reflexive, symmetric and transitive.
For any x $$\displaystyle\in$$ Z−{0}, x $$\displaystyle\cdot$$ x = $$\displaystyle{x}^{{2}}$$ > 0. So (x,x) $$\displaystyle\in$$ R for all x and hence the relation R is symmetric.
To prove R is symmetric.
Let (x,y) $$\displaystyle\in$$ R. Then xy > 0.
Since Z−{0} is commutative, xy = yx. Then yx > 0 and so (y,x) $$\displaystyle\in$$ R.
Therefore, R is symmetric.
Prove R is transitive.
Let (x,y) $$\displaystyle\in$$ R and (y,z) $$\displaystyle\in$$ R. Then xy > 0 and yz > 0.
Therefore, xy $$\displaystyle\cdot$$ yz = $$\displaystyle{x}{y}^{{{2}}}{z}$$ > 0.
Let y=1. Then xz>0 implies (x,z) $$\displaystyle\in$$ R.
Hence R is transitive. Thus, R is an equivalence relation.
b) Find the equivalence class of 1.
={x $$\displaystyle\in$$ Z−{0} . (1,x) $$\displaystyle\in$$ R}
={x $$\displaystyle\in$$ Z−{0} . 1 $$\displaystyle\cdot$$ x > 0}
={x $$\displaystyle\in$$ Z−{0} . x>0}
$$=Z^+$$
Similarly, [−1]=Z−. There are only two distinct equivalence classes Z+ and Z−.