Let $n$ be a positive integer and let $d(x,y)$ be the distance of two points $x=(x_1+...+x_n)$ and $y=(y_1+...+y_n)$ of $\mathbb{R}^n$. \begin{align*} d(x,y)= \sqrt{(x_1-y_1)^2 +...+ (x_n-y_n)^2} \end{align*} For a non-empty subset $A$ of $\mathbb{R}^n$ the function $f: \mathbb{R}^n \xrightarrow{}{} \mathbb{R}$ is defined by, \begin{align*}f(x)= \inf_{z\in A} d(x,z)\end{align*} Show that $|f(x)-f(y)|\leq d(x,y)$ holds for any two points $x,y$ of $\mathbb{R}^n$
Here we have, \begin{align*}|f(x)-f(y)|&=|\inf_{z\in A} d(x,z)- \inf_{z\in A} d(y,z)|\\&=|\inf(\sqrt{(x_1-z_1)^2+...+(x_n-z_n)^2})-\inf(\sqrt{(y_1-z_1)^2+...+(y_n-z_n)^2}|\\&\leq |\sqrt{(x_1-z_1)^2+...+(x_n-z_n)^2}- \sqrt{(y_1-z_1)^2+...+(y_n-z_n)^2}| \end{align*}
I have done some steps on my paper but could not reach desired solution. Is my process right, if not any hints or a solution would be appreciated.
This is just a fact of geometry; before proving something, always make sure you understand what you're proving. You don't need to utilize the rather messy coordinate expression.
The function $f$ measures the distance from $x$ to $A,$ and reports this as $f(x).$ Your desired inequality is equivalent to $-d(x,y) \leq f(x) - f(y) \leq d(x,y).$ To prove that $f(x) \leq f(y) + d(x,y),$ this is just the triangle inequality: The distance from $x$ to $A$ is at most the distance from $y$ to $A$ plus $d(x,y).$ And indeed, take any $z$ in $A.$ Then you have $d(x,z) \leq d(y,z) + d(x,y)$ by the triangle inequality. We know $d(x,z) \geq f(x),$ and so $f(x) \leq d(y,z) + d(x,y)$ for all $z\in A.$ Letting $z\in A$ very, this implies $f(x) \leq f(y) + d(x,y).$ Conclude the other inequality similarly.