# Given p_1=(1,1), p_2=(6,3), p_3=(4,5) and the straight y = 1.5-(x-4) what is the point p=(x,y)  pertaining to the straight, minimizing norm(p_1-p) + norm(p_2-p)+norm(p_3-p)?

## Given ${p}_{1} = \left(1 , 1\right) , {p}_{2} = \left(6 , 3\right) , {p}_{3} = \left(4 , 5\right)$ and the straight $y = 1.5 - \left(x - 4\right)$ what is the point $p = \left(x , y\right)$ pertaining to the straight, minimizing $\left\lVert {p}_{1} - p \right\rVert + \left\lVert {p}_{2} - p \right\rVert + \left\lVert {p}_{3} - p \right\rVert$?

Sep 6, 2016

$p = \left(0.696452 , 6.19645\right)$

#### Explanation:

The line $y = 1.5 - \left(x - 4\right)$ can be represented in parametric form

$L \to p = {p}_{4} + \lambda \vec{v}$. The sought distance is given by

$\delta = \left\lVert {p}_{4} + \lambda \vec{v} - {p}_{1} \right\rVert + \left\lVert {p}_{4} + \lambda \vec{v} - {p}_{2} \right\rVert + \left\lVert {p}_{4} + \lambda \vec{v} - {p}_{3} \right\rVert$. Here

$\left\lVert {p}_{4} + \lambda \vec{v} - {p}_{k} \right\rVert = \sqrt{{\left\lVert {p}_{4} - {p}_{k} \right\rVert}^{2} - 2 \lambda \left\langle{p}_{4} - {p}_{k} , \vec{v}\right\rangle + {\lambda}^{2} {\left\lVert \vec{v} \right\rVert}^{2}}$

The minimum distance obeys the condition

$\frac{d \delta}{d \lambda} = 0$ and

$\frac{d}{d \lambda} \left\lVert {p}_{4} + \lambda \vec{v} - {p}_{k} \right\rVert = \frac{\lambda {\left\lVert \vec{v} \right\rVert}^{2} - \left\langle{p}_{4} - {p}_{k} , \vec{v}\right\rangle}{\left\lVert {p}_{4} + \lambda \vec{v} - {p}_{k} \right\rVert}$ for $k = 1 , 2 , 3$

Solving for $\lambda$ we get

$\lambda = {\lambda}_{0} = 0.696452$ and the point is

${p}_{0} = {p}_{4} + {\lambda}_{0} \vec{v} = \left(0.696452 , 6.19645\right)$