Thread: Closest point on line to two points...

1. Closest point on line to two points...

Hy im having problem solving one problem with derivates i think.

I have two points and im looking for closest summed distance point on line.

two points are T1(-1, 2) and T2(1,6) and line is very simple y = x.

2. Originally Posted by PJani
Hy im having problem solving one problem with derivates i think.

I have two points and im looking for closest summed distance point on line.

two points are T1(-1, 2) and T2(1,6) and line is very simple y = x.
since $y = x$ ...

$d = \sqrt{(x+1)^2 + (x-2)^2} + \sqrt{(x-1)^2 + (x-6)^2}$

3. Originally Posted by skeeter
since $y = x$ ...

$d = \sqrt{(x+1)^2 + (x-2)^2} + \sqrt{(x-1)^2 + (x-6)^2}$
Thank you it helped...what about other more extended functions y = k*x +n?

4. Originally Posted by PJani
Thank you it helped...what about other more extended functions y = k*x +n?