Triangle inequality

theorem

Between any two points in the plane, the straight segment is shortest; any polyline length is at least the straight-segment distance between its endpoints, with equality iff all points are collinear in order.

Triangle inequality — the geometric fact at the core of moving-point optimization.

Statement

Let A,BA, B be fixed points in the plane. For any point PP:

AP+PBABAP + PB \geq AB

with equality iff PP lies on segment ABAB.

Between two points, a polyline degenerates to a straight segment: the minimum occurs at P \in AB

More generally, for a polyline AP1P2PnBA \to P_1 \to P_2 \to \cdots \to P_n \to B:

AP1+P1P2++PnBABAP_1 + P_1P_2 + \cdots + P_nB \geq AB

with equality iff all points lie on the segment ABAB in order.

An n-segment polyline ≥ the straight segment AB, equality when all points are collinear in order

Why it matters

This unassuming inequality powers a huge family of "moving-point minimization" problems: a geometric transformation (reflect, rotate, scale) turns the target into the length of some polyline, after which this inequality squeezes the polyline back down to a straight segment — and that gives the minimum.

Downstream models:

Equality case at a glance

When three points are collinear, the polyline collapses to a straight segment