# Geometric median of two disjoint sets of points lies on line between their respective medians

I was working on a problem about geometric medians and I had an idea for a divide and conquer solution, but it would only work if a set of points, when split into two disjoint sets, and those sets respective geometric medians calculated and a line passed between, it holds that the geometric median of the overall set of points lies on that line. When graphing it and visualizing it, seems possible, and when I used existing algorithms and experimented, it seems to be very close but not quite on the same line. I am not sure if this is due to error in calculation of the geometric median or not.

I have some example Python code demonstrating how close the numbers are here: Geometric Median comparison

Any expertise in this matter would be appreciated.

## 1 Answer

If $$A$$ and $$B$$ are two set of points, the geometric median of $$A \cup B$$ does not necessarily lie on the line passing between the geometric mean of A and the geometric mean of $$B$$.

In the following example the points of $$A$$ are red and the one in $$B$$ is blue. The geometric median of $$A$$ is the red square. The green line connects the geometric means of $$A$$ and $$B$$. The black square is the geometric mean of $$A \cup B$$, i.e., the Fermat point of the triangle whose vertices are in $$A \cup B$$.

• Oh wow...how did I miss such an obvious case. Thank you!
– hLk
Jun 7, 2019 at 1:41
• Doing some more testing and it looks like the more points you have the closer it falls to the line. Never quite on it though
– hLk
Jun 7, 2019 at 3:04