find the point which has shortest sum of distance from all points?

I want to find a point in the Cartesian plane so that sum of distances from this point to all points in the plane be minimum. For example we have the points: $(x_1,y_1),(x_2,y_2),(x_3,y_3), . . .(x_n,y_n)$. Now find a point - we call this $(X,Y)$ - so that:

$$\sum_{i=1}^n \sqrt {(x_i−X)^2+(y_i−Y)^2}$$ is minimal.

Thanks in advance.


Solution 1:

I think what you are looking for is the Geometric median

I'd recommend having a look at this question at stackoverflow