INAIO Guide Stage 1 10Coordinate Geometry and Vectors
10.5 Geometry of minimising distance
Extend distance optimization from a number line to the coordinate plane, and locate the best point when a geometric constraint applies.
In Module 5.5, we chose a point on a line to minimize total distance to fixed observations. A median minimized total absolute distance; a mean minimized total squared distance. What if the possible locations are points in a plane, or a device can only be placed on a particular road? The same optimization question now has a geometric interpretation.
This is intermediate coordinate geometry and optimization. Review Euclidean and Manhattan distance and the one-dimensional distance objective. OpenStax's coordinate lesson is a starting point for the distance formula.
A basic idea: choose a point in the plane
Suppose three locations are , , and . We may place a hub at any point . If the cost is the sum of squared straight-line distances, each location contributes its horizontal difference squared plus its vertical difference squared. So the choice of controls one part of the cost, while the choice of controls another.
The best horizontal coordinate is the mean of the locations' coordinates: . The best vertical coordinate is the mean of their coordinates: . Together they give the centroid . It balances the three squared-distance penalties, even though no location lies there.
A quick tour of the geometry
For fixed locations and a proposed point , write the squared-distance cost as
The and terms separate. As in Module 5.5, completing the square in each coordinate gives
where does not depend on the chosen point. Thus is the unrestricted minimum. Every move away from it adds times the squared Euclidean distance of that move. If placement is restricted to a line or region, any allowed point closest to the centroid in Euclidean distance minimizes the cost. This is a geometric way to apply the feasible-region idea from Module 5.4.
The result depends on the cost. Total Manhattan distance separates into absolute horizontal and vertical differences, so coordinate-wise medians minimize it. Total ordinary Euclidean distance does not separate this way; its minimizer is called a geometric median, and finding it in general needs methods beyond this module. Do not replace either objective with squared distance unless the question says to do so.
Application 1: a hub for three sites
Sites are at , , and . Where should an unrestricted hub go to minimize total squared Euclidean distance?
- Average coordinates separately: and , so choose .
- Its squared distances are , , and , totaling .
- For comparison, gives . The identity above shows that every other point costs more than , not just this one.
Application 2: a device fixed to a rail
Targets are at and , but a device must lie on the vertical rail . Minimize the sum of its squared distances to the targets.
- Without the rail, the centroid is . The closest point to it on the rail is , one unit to the left.
- To check algebraically, any allowed point is and its cost is .
- Because , the minimum is at . The rail changes the best location from to .
Resources
| Source | Title | Why read it |
|---|---|---|
| OpenStax | The rectangular coordinate systems and graphs | Review coordinate distance before optimizing it. |
Finished this module? Mark it done.
Comments
Stuck on something, spotted a mistake, or found a resource that helped you? Tell us below.
Loading comments