1

Is the distance between two points $(x,y)$, $(a,b)$ convex? $f(x,y) = \sqrt{(x-a)^2 + (y-b)^2} + \sqrt{(x-c)^2 + (y-d)^2}$ Where $(a,b)$ & $(c,d)$ are fixed points and we want to pick $(x,y)$ that minimizes the total distance. Thanks!

Akira
  • 17,367
Juan
  • 35

2 Answers2

1

First, prove that $g(x,y) = \sqrt{x^2+y^2}$ is convex.

Norms are convex because of triangle inequality, since $\lambda \in [0,1]$,

$$\left\|\lambda \begin{bmatrix}x_1\\y_1\end{bmatrix}+ (1-\lambda)\begin{bmatrix}x_2\\y_2 \end{bmatrix}\right\|\le \lambda\left\| \begin{bmatrix}x_1\\y_1\end{bmatrix}\right\|+ (1-\lambda)\left\| \begin{bmatrix}x_2\\y_2 \end{bmatrix}\right\| $$

and note that $g(x-a, y-b)$ is convex, it is just a translation.

Finally, we just have to use the fact that sum of convex functions are convex.

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
0

Let $X=(x,y), \ A=(a,b).\ C=(c,d)$. Triangle inequality $||A-C||=||A-X+X-C||\le ||A-X||+||X-C||$. Equality (which is the minimum) when $X$ is in between $A$ and $C$ and on the straight line connecting $A$ and $C$.

Note: $||A-C||=\sqrt{(a-c)^2+(b-d)^2}$, etc.