# General Triangle Inequality, distance from a point to a set

I am trying with no luck to prove:

Let (X,d) be a metric space and A a non-empty subset of X. For x,y in X, prove that

d(x,A) < d(x,y) + d(y,A)

-
You won't be able to prove this with strict inequality; for instance, take $A = \{y\}$. You need $\leq$. – William Feb 12 '12 at 0:49
Try drawing a picture of a set A with two points x and y outside it. – Stefan Smith Feb 12 '12 at 0:49
It will help if you have sitting in front of you the definition of distance from a point to a set. – Gerry Myerson Feb 12 '12 at 0:53
I've drawn all the pictures. But doesn't it come down to some creative trick or using a fact about infimum? I can't see it. – student's u Feb 12 '12 at 0:53

If you have $\leq$ instead of $<$, then you have:

$d(x,A) = \inf_{z\in A} d(x,z)$. Now, say $z_0\in A$ and $y\in X$. Then $d(x,z_0)\leq d(x,y) + d(y, z_0)$. Taking infimum over all $z\in A$ of the left hand side, we obtain:

$$d(x, A) = \inf_{z\in A}d(x,z) \leq d(x,z_0) \leq d(x,y) + d(y, z_0).$$

Observe that $d(x, A)$ is now independent of $z_0$. Hence taking the infimum over all $z$ in $A$ of the right hand side, we get:

$$d(x,A) \leq d(x,y) + \inf_{z\in A}d(y,z) = d(x,y) + d(y, A).$$

-
Isn't there the possibility that d(y,A) < d(y,z0), in which case your last inequality doesn't necessarily hold? – student's u Feb 12 '12 at 0:59
@student'su if $a\le b_\alpha$ for all $\alpha$, then $a\le \inf_\alpha b_\alpha$. – David Mitra Feb 12 '12 at 1:03
I have a constant on the left, which is not smaller than the right hand side for ANY choice of $z_0\in A$. Now try proving rigorously that this is enough to conclude the proof as I did it above (hint: you can always chose a sequence $\{z_n\}_{n\in\mathbb{N}}$ in $A$ such that $d(y,z_n)\rightarrow \inf_{z\in A}d(y,z)$ as $n\rightarrow\infty$). – William Feb 12 '12 at 1:03
@student : The definition itself of the infimum is the following ; the infimum is a lower bound which is greater than or equal to any other lower bound. Since $d(x,A)$ is a lower bound of $\{ d(x,y) + d(y,z_0) \, | \, z_0 \in A \}$, then it is less than or equal to the infimum. In other words, it's a triviality you shouldn't be worrying about. – Patrick Da Silva Feb 12 '12 at 1:24
Thanks all. I understand. I have no idea why this was hard for me. – student's u Feb 12 '12 at 1:55