Prove convexity of set

convex optimizationconvex-analysis

I've had a hard time proving this statement. The objective is to prove that the set $M$ is convex where $f(y)$ can be any function. The task is to prove it using triangle inequality. I've looked at threads like Proving Convexity of an Open Disk but i still can't wrap my head around it. If anyone could give me a hint in the right direction i would be very grateful.

$$M = \{\, x\,\big| \, ||x-y|| \leq f(y) \, \text{ for all } y \in S\,\} \quad \text{where } S \subseteq \mathbb{R}^n$$

Best Regards

Best Answer

Hint: If $x_1, x_2 \in M$ and $0 < \lambda < 1$ then for all $y \in S$ $$ |\lambda x_1 + (1-\lambda) x_2 - y| = |\lambda(x_1-y) + (1-\lambda)(x_2 - y)| \, . $$ Now use the triangle inequality to conclude that this is $$ \le \lambda| x_1-y| + (1-\lambda)|x_2 - y| \le \lambda f(y) + (1-\lambda) f(y) = f(y) \, , $$ which means that $\lambda x_1 + (1-\lambda) x_2 \in M$.

Related Question