Point that is at the shortest total distance from multiple points

• Jun 1st 2010, 11:12 AM
BigC
Point that is at the shortest total distance from multiple points
This question is purely for curiosity's sake:

Suppose I have a collection of points on a 2D plane {P1, P2,..., Pn}

How would I find the point X such that the sum of the magnitude of all vectors (||PnX||) is the smallest possible.
• Jun 1st 2010, 11:34 AM
dwsmith
Quote:

Originally Posted by BigC
This question is purely for curiosity's sake:

Suppose I have a collection of points on a 2D plane {P1, P2,..., Pn}

How would I find the point X such that the sum of the magnitude of all vectors (||PnX||) is the smallest possible.

The line of best fit.
• Jun 1st 2010, 12:05 PM
BigC
Quote:

Originally Posted by dwsmith
The line of best fit.

I thought it would involve a least-squares approximation. Could you be more clear on how to use the line of best fit to find my point X?

The points {P1,...,Pn} could be completely randomly placed.
• Jun 1st 2010, 12:44 PM
dwsmith
Quote:

Originally Posted by BigC
I thought it would involve a least-squares approximation. Could you be more clear on how to use the line of best fit to find my point X?

The points {P1,...,Pn} could be completely randomly placed.

The line of best fit uses least-squares. If your points are in a linear fashion, you can come up with a line, y=mx+b, where the magnitude is minimized. The line you achieve will be the line of best fit. Of course, we could do this for circles, quadratics, polynomials, etc.
• Jun 1st 2010, 12:59 PM
BigC
Quote:

Originally Posted by dwsmith
The line of best fit uses least-squares. If your points are in a linear fashion, you can come up with a line, y=mx+b, where the magnitude is minimized. The line you achieve will be the line of best fit. Of course, we could do this for circles, quadratics, polynomials, etc.

Bah, this is way simpler than I thought it was. Just clicked that all I need is the average of the points.
• Jun 1st 2010, 01:07 PM
dwsmith
Quote:

Originally Posted by BigC
How would I find the point X such that the sum of the magnitude of all vectors (||PnX||) is the smallest possible.

By this, do you mean to say: how would I find the point X such that the sum of all magnitudes of points are the smallest from the point X?