General Drinking Horse (axial-symmetry shortest path)
Use axial symmetry to turn "sum of distances from a moving point on a line to two fixed points" into a single straight-segment problem between two fixed points.
Axial-symmetry shortest path (General Drinks His Horse) — the standard model for a moving point on a line with an "equal-coefficient two-leg distance sum". Reflect across to get , which straightens the polyline into the segment .
Universal form
Classical model
- Moving point : on a line
- Fixed points : two fixed points on the same side of
- Key constraint: both legs carry weight (use Hu-Bu-Gui (Different-Speed Minimum, sin-Angle Method) for non-unit coefficients); in the opposite-side case, just connect and intersect with — no reflection needed (see "Variants / generalizations" below)

When to use
- A moving point lies on a line (river / road / mirror), and you want to minimize (with two fixed points)
- More generally: a sum of two distances tied to a single moving point, or any "polyline" wrapped around a set of fixed points
- The problem often mentions "General drinks his horse at the river" (将军饮马), "light path", "mirror reflection", or "fetch water from a river then deliver to B"
The core move
Move one of the two points to the opposite side — reflect across . The polyline then straightens out into .

Construction
Given a line in the plane with two fixed points on the same side and a moving point :
-
Reflect: take , the reflection of across (so is the perpendicular bisector of ).

-
Swap distances: for any , , so .
-
Straighten: by [[triangle-inequality]], , with equality when are collinear.
-
Locate : is the intersection of segment with . The minimum equals .
Why it works
Axial symmetry is a distance-preserving isometry (a reflection): every point on has the same distance to as to . So the unmanageable distance "from the moving point to " can be replaced, with no loss, by "from to ". After the swap, both legs start at , so the triangle inequality (polyline straight segment) applies directly.
Worked examples
- [[0001-shortest-path]] — the canonical "General drinks his horse" problem
- Light leaves , reflects off a mirror , and reaches — find the shortest light path (Fermat's principle = General Drinking Horse)
Variants / generalizations

- Opposite-side case: if lie on opposite sides of , just connect and intersect with — no reflection needed.

- Two lines + one moving point each: a moving point on and another on ; minimize — reflect across , across , then connect with a straight line.
- One line + several moving points: chain reflections to "unfold" the path into a single straight segment.
- Weighted variant: when has unequal coefficients, reflection no longer applies — switch to Hu-Bu-Gui (Different-Speed Minimum, sin-Angle Method) / Weighted Fermat Point (rotation + scaling lemma).