# distance between parametric line and a point $(4,3,s)$

I've tried solving this problem every way I know how and I just can't get it. I've looked at similar problems of this type, and I still cannot get an answer that seems right.

Parametric Equations:

a) Write the distance between the line and the point as a function of s

b) Find the value of s such that the above distance is minimum

$$x = -t+3$$

$$y = \frac{t}{2} +1$$

$$z = 2t - 1$$

Point:

(4,3,s)

The most obvious thing seems to be to use the distance formula, but this gives a function of s and t. I can take partials of this equation to find s and t, but for some reason this seems wrong to me.

$$D = \sqrt{(4-(-t + 3))^2 + (3 - (1/2t + 1))^2 + (s - (2t- 1))^2}$$

$$D^2 = (1 + t)^2 + (2 - 1/2t)^2 + (s - 2t -1)^2$$

$$D^2 = 19/4t^2 + 4t + s^2 - 4st - 2s + 6$$

partial w/ respect to s = 2s - 4t -2

partial w/ respect to t = 19/2t + 4 - 4s

t = 0, s = 1 ???

I've tried all sorts of other methods, including taking the cross product of the two direction vectors to find a normal vector perpendicular to both, as this is the minimum distance from a vector to a point. At this point my head is spinning and I just don't know the right approach. Any hints? Am I on the right track?

In the first part, we are taking $s$ to be some fixed (but unspecified) value. The distance from a point on the parametric line to the given point is indeed $$\sqrt{(1+t)^2+\left(2-\frac12t\right)^2+(s-2t-1)^2}.\tag{\star}$$ To find the distance from the parametric line, itself to the given point, we must minimize this. It suffices to minimize its square. To do this, we will take the partial derivative of its square with respect to $t,$ set it equal to $0,$ solve for $t$, and plug it back into $(\star),$ to give us a function in terms of $s.$

Then, to find $s$ such that the distance is at a minimum, we will square the resulting function and minimize, by taking the derivative with respect to $s,$ setting equal to $0,$ and solving for $s$.

Line: $(x, y, z) = (3, 1, -1) + t(-1, 1/2, 2)$

Point: $(4, 3, s)$

The point must lie in a plane that is perpendicular to the line. So the plane needs to be perpendicular to the vector $(-1, 1/2, 2)$

This would be the plane $-x + \frac 1 2 y + 2z = C.\;$ To find C, we let $(x, y, z) = (4, 3, s)$

$C = -4 + \frac 3 2 + 2s = -\frac 5 2 + 2s$

So the plane is $-x + \frac 1 2 y + 2z = 2s - \frac 5 2.\;$

This plane intersect the line when

$-(3-t) + \frac 1 2 (1 - \frac 1 2 t) + 2(s + 2) = 2s - \frac 5 2.\;$

$t = -8$.

So, the point on the line is at

$(3, 1, -1) + (-8)(-1, 1/2, 2) = (11, -3, -17)$

The distance between $(11, -3, -17)$ and $(4, 3, s)$ is $\sqrt{s^2+34 s+374}$