following must hold:
(i) Reflexivity: a ~ a
(ii) Symmetry: if a ~ b then b ~ a
(iii) Transitivity: if a ~ b and b ~ c then a ~ c.
1) X = R, let a, b and c be in R.
Clearly aRa <-> a-a is an integer but a-a=0 which is an integer so (i) holds
Also if a-b is an integer then so is b-a, so (ii) holds
Now if a-b is an integer, and so is b-c then:
a-c = (a-b) + (b-c)
is the sum of two integers and so is an iteger so aRc, so (iii) holds
Hence we conclude that R is an equivalence relation on R.
2) Same as above just go through checking reflexivity, symmetry and
transitivity if the hold the R is an equivelence relation if not it is not