# $\varepsilon$ - closeness property

I'm studying Analysis from Terence Tao's book 'Analysis 1' and in an exercise he asks to prove seven properties regarding the notion of '$\varepsilon$ - closeness', which is defined as follows:

Def: Let $\varepsilon>0$, $x$, $y$ be rational numbers. We say that $y$ is $\varepsilon$-close to $x$ iff we have $d(y,x)\leq \varepsilon$.

I've managed to prove six out of the seven properties; the only one which I haven't been able to prove is the following one:

"Let $\varepsilon>0$. If $y$ and $z$ are both $\varepsilon$-close to $x$, and $w$ is between $y$ and $z$ (i.e. $y\leq w\leq z$ or $z\leq w \leq y$), then $w$ is also $\varepsilon$-close to $x$."

So, I would appreciate any hints about proving this property.

Best regards,

lorenzo.

Drawing a picture helps with this one. For one case, let's assume $y \leq w \leq z \leq x$.
$$x - w \leq x - y$$ So then $|x - w| \leq |x - y| \leq \epsilon$. You can then run through the other possibilities in a similar way.
Suppose $$y \leq w \leq z$$. We need to show that $$d(x, w) \leq \epsilon$$. By definition it suffices to show that $$|x - w| \leq \epsilon$$, i.e. that, $$-\epsilon \leq x - w \leq \epsilon$$ or that $$w \leq x + \epsilon$$ and $$x - \epsilon \leq w$$. To prove the claim, we show that these last two inequalities hold.
Since $$d(x, y) \leq \epsilon$$, we have $$-\epsilon \leq x - y \leq \epsilon$$. From the last inequality we have that $$x - \epsilon \leq y$$, and since $$y \leq w$$, by transitivity, $$x - \epsilon \leq w$$, which shows that the second inequality holds.
On the other hand since $$d(x, z) \leq \epsilon$$, $$-\epsilon \leq x - z \leq \epsilon$$. It follows that $$z \leq x + \epsilon$$ and since $$w \leq z$$, by transitivity again, we conclude that $$w \leq x + \epsilon$$, which shows that the first inequality also holds and proves the claim for the case where $$y \leq w \leq z$$. The other case can be proved similarly.