For the relation $R = \{(x, y) : (x - y) \in \mathbb{Z}\}$ over $\mathbb{Q}$, how do I prove transitivity in this case?
For any number $n \in \mathbb{Q}$, it's going to contain a fractional part (any rational is just an integer plus a fractional part). If $(a, b) \in R$, then both $a$ and $b$ share a fractional part $\delta_1$, and if $(b, c) \in R$, then $b$ and $c$ share a fractional part $\delta_2$. But since both statements include $b$, then $\delta_1 = \delta_2$.
More declaratively, for $\{a, b, c\} \in \mathbb{Q}$ there is an $\{m, n, p\} \in \mathbb{Z}$ and fractional parts $\{\delta_1, \delta_2, \delta_3\} \in \mathbb{Q}/\mathbb{Z}$ such that $m+\delta_1 = a, n+\delta_2 = b, p+\delta_3 = c$:
$$(a, b) \in R \implies (m+\delta_1, n+\delta_2) \in R \implies \delta_1 = \delta_2 \\ (b, c) \in R \implies (n+\delta_2, p+\delta_3) \in R \implies \delta_2 = \delta_3 \\ \therefore \delta_1 = \delta_3 \implies (m + \delta_1, p+\delta_3) \in R \implies (a, c) \in R$$
Thus the relation is transitive.
Is there a better way to get this idea across of using fractional parts of rational numbers?
Suppose $(a,b), (b,c)\in R $. Then $a-c=(a-b)+(b-c)\in\mathbb Z $, because $\mathbb Z $ is closed under addition. So $(a,c)\in R $.