Say I have n points on a plane which are not collinear. What's the most efficient way to translate each point so that all points are collinear? I want to minimize the sum of the distances traveled.
I'm guessing that taking a linear regression using https://en.wikipedia.org/wiki/Least_absolute_deviations and then moving each point to the line along a perpendicular path is at least a close approximation. Is that the optimal solution though? I'm worried that it may be inaccurate since LAD seems to focus on the y-axis rather than my "distance traveled" metric.
I feel like this must be a solved problem, but maybe I don't have a good enough vocabulary to search for it. No urgency here, I'm just curious.
Edit: an interesting variation is minimizing the max distance, i.e. how does a crowd of people line up ASAP if they're all equally speedy.