# Proving transitivity on relation: $aRb=7\mid |a-b|$

Proving transitivity on relation: $$aRb=7|(|a-b|)$$, so $$aRb\, \wedge bRc\implies aRc$$

What I tried:

$$7k =|a-b|$$ $$7l=|b-c|$$ $$l,k\in\mathbb{Z}$$

Now I squared the two equations and subtracted the top one from the bottom one: $$49(l^2-k^2)=(b-c)^2-(a-b)^2 =c^2-2b(a-c)-a^2\neq|a-c|^2$$

I see that this approach does not work, since I can't get the square root of the distance between $$a$$ and $$c$$, so that $$\sqrt{49(l^2-k^2)}$$ would be a rational number for all $$l$$ and $$k$$ (for instance we could have $$l=3$$ and $$k= 2,$$ and we get $$7\cdot\sqrt{5}\notin\mathbb{Q}$$), so my equation above does not imply that transitivity does not exist.

My question is what would be the best way to prove if it does or doesn't exist?

• You can make your work a little easier by writing $7k = (a-b)$ and $7l = (b-c)$, i.e. dropping the absolute values. It's still correct because $k,l$ can be positive or negative. Nov 14, 2021 at 13:38
• @ElchananSolomon So then I suppose if $k,l \in \mathbb{Z}^+$, it would be way more difficult to prove. Do you know how we would prove it in that case ?
– VLC
Nov 14, 2021 at 13:45
• Dupe of Show that conguence $\bmod m\,$ is an equivalence relation and many others. Nov 18, 2021 at 3:38

You want to see that $$aRc$$, that is $$7$$ divides $$|a-c|$$. By hypothesis $$7k=a-b$$ and $$7l=b-c$$ (you can do this choosing $$k,l$$ from $$\mathbb{Z}$$). Then: $$a-c=a-b+b-c=7k+7l=7(k+l)\rightarrow |a-c|=7|k+l|$$

• Please strive not to add more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. Nov 18, 2021 at 3:54

Alternative approach:

You want to prove that

$$\{ ~( ~7 ~| ~|a-b| ~) ~~\wedge~~ ~( ~7 ~| ~|b-c| ~) ~\} ~~\implies ~~ ~( ~7 ~| ~|a-c| ~).$$

Note that

• Either $$~~~~~|a - b| = (a-b)~~~~~$$ or $$~~~~~|a - b| = (-1) \times (a-b).$$
• Either $$~~~~~|b - c| = (b-c)~~~~~$$ or $$~~~~~|b - c| = (-1) \times (b-c).$$
• Either $$~~~~~|a - c| = (a-c)~~~~~$$ or $$~~~~~|a - c| = (-1) \times (a-c).$$

By assumption, there exists $$r,s \in \Bbb{Z}$$ such that

• $$7r = |a - b|.$$
• $$7s = |b - c|.$$

Define $$R$$ so that:

• $$R = (r)~~$$ if $$~~|a - b| = (a-b)$$.
• $$R = (-r)~~$$ Otherwise.

Define $$S$$ so that:

• $$S = (s)~~$$ if $$~~|b - c| = (b-c)$$.
• $$S = (-s)~~$$ Otherwise.

Then,

$$\{ ~[ ~7R = (a-b) ~] ~~\wedge~~ ~[ ~7S = (b-c) ~] ~\} ~~\implies$$

$$[ ~7(R+S) = (a-c) ~: ~(R+S) \in \Bbb{Z} ~].$$

Define $$T$$ so that:

• $$T = (R+S)~~$$ if $$~~|a - c| = (a-c)$$.
• $$T = [-(R+S)]~~$$ Otherwise.

Then, $$~~T \in \Bbb{Z}~~$$ and $$~~7T = |a - c|.$$

Therefore, $$~7 ~| ~|a - c|.$$

• Please strive not to add more (dupe) answers to dupes of FAQs, cf. recent site policy announcement here. Nov 18, 2021 at 3:39
• @BillDubuque My answer, which occurred after Marcos posted his answer, was in response to what I considered an analytical error in Marcos' answer. That is, he confused (for example) $|a-b| + |b-c|$ with $(a-b) + (b-c)$. I think that you and I have debated this issue before. When an answer is posted that I disagree with, then I think it is important to post a rebuttal answer, directly, rather than linking to a different article. Nov 18, 2021 at 3:47
• You can comment (and vote) on incorrect answers. That's not a good excuse to post further duplicate answers (this topic is a big FAQ) - as should be clear to any experienced user. Nov 18, 2021 at 3:55
• @BillDubuque For one thing, the situation is fairly rare, so it will not present itself very often. For another, you are looking at the situation from the viewpoint of site maintenance, while I am looking at the situation from the viewpoint of the effect on the OP. Again, labeling the situation as a vanilla dupe, is, in my mind, iffy. Besides that, we already have one dead horse pending. Nov 18, 2021 at 4:01
• Rampant duplication is one of the biggest problems the site faces. Keep in mind that most of your answers will have limited value if no one can find them in the future because they are buried among hundreds (or thousands) of (mostly) useless dupes. Nov 18, 2021 at 4:04