I’m prepping for a test and assumed the point that minimizes the total distance to A and B must be the midpoint (e.g., with A=(0,0) and B=(4,0), I chose (2,0)), but is that actually the only minimizer? I tried differentiating d(P,A)+d(P,B) and got stuck, and I’m not sure that calculus is even relevant here.
Welcome to Maths For Fun – where mathematical curiosity meets pure enjoyment for learners of all ages! Founded by a team of lifelong maths enthusiasts, we believe that numbers aren’t just for tests – they’re for exploration, discovery, and delight. Whether you’re eight or eighty, a beginner or a seasoned problem solver, you’ll find a growing collection of logic based games and puzzles that cover every corner of mathematics.
















3 Responses
Short answer: no, it doesn’t have to be the midpoint-every point on the straight segment between A and B minimizes the total distance. Think of d(P,A) + d(P,B) as the length of the broken path A→P→B. By the triangle inequality, any detour is at least as long as going straight from A to B, with equality only when the “broken” path is actually straight-meaning P lies on the line segment AB, between A and B. So the minimum value is the fixed length |AB|, and it’s achieved by all points P on that segment, not just the midpoint. Calculus isn’t really needed here. Simple example: with A=(0,0) and B=(4,0), if P=(t,0) for any t in [0,4], then d(P,A)+d(P,B)=t+(4−t)=4, which equals |AB|. But if P strays off the segment, say P=(0,1), then d(P,A)=1 and d(P,B)=sqrt(17), so the sum is 1+sqrt(17)≈5.12, which is larger than 4. If instead you were minimizing the sum of squared distances, that’s when the unique minimizer is the midpoint-but for plain distances, the whole segment wins.
No, the midpoint is not the only minimizer. For any point P, the triangle inequality gives d(A,P) + d(P, B) ≥ d(A, B), with equality exactly when A, P, and B are collinear and P lies between A and B. So the minimum possible total distance is the fixed length d(A, B), and it is achieved by every point on the line segment AB. If P is off the line through A and B, the inequality is strict, so the sum is larger. Calculus is not needed here. Simple example: with A = (0,0) and B = (4,0), any point P = (t, 0) for 0 ≤ t ≤ 4 gives d(P, A) + d(P, B) = t + (4 − t) = 4, while a point off the segment, say P = (2, 1), gives √5 + √5 ≈ 4.472 > 4.
Great question! Your midpoint guess is a natural instinct, but for the sum of distances d(P,A) + d(P,B), the full set of minimizers is actually every point on the line segment AB, not just the midpoint. Here’s the simple reason: by the triangle inequality, AP + PB ≥ AB for any point P, with equality exactly when A, P, and B are collinear and P lies between A and B. So the minimum possible total is AB, and it’s achieved by any P on the segment [A,B] (including A and B themselves). In your example A = (0,0), B = (4,0), every point (t,0) with 0 ≤ t ≤ 4 gives AP + PB = 4, while any point off the x-axis makes the total bigger-like taking a detour instead of walking straight from A to B. If you do use calculus, you’d find the gradient vanishes precisely for points in the interior of the segment (the unit vectors toward A and B cancel), which matches this picture. Follow-up to chew on: what changes if you minimize AP^2 + PB^2 instead-can you show the unique minimizer is then the midpoint?