# Math Help - Shortest distance between a point and a line - Vectors

1. ## Shortest distance between a point and a line - Vectors

I'd just like it if someone could tell me where it is I'm going wrong in my calculations.. It might even be at the very beginning, I'm at a loss. ):

'Find the distance from the point P(3,0,-1) to the line with equation $r=2i-j+4k+\lambda(3i+2j+k)$'

Any point on the line I got to be $A(2+3\lambda,-1+2\lambda,4+\lambda)$.

That means that $\overline{PA}=\left(\begin{array}{cc}-1+3\lambda\\-1+2\lambda\\5+\lambda\end{array}\right)$, and the direction vector of the line is $\overline{b}=\left(\begin{array}{cc}3\\2\\1\end{ar ray}\right)$

Then I tried to calculate their scalar product to find when they are perpendicular and thus closest to each other, but then I got $\lambda$ to be 0...

So would someone please tell me where it is I go wrong?
Is it something at the very beginning? ):

And then another question that is very simple!
What is the direction vector of the line 3x-y=4?
A fixed point would be (0,-4), right?

2. Suppose that $P$ is a point not on the line $\ell :Q + \lambda\overrightarrow d$.
Then distance $D(\ell ,P) = \frac{{\left\| {\overrightarrow {QP} \times \overrightarrow d } \right\|}}{{\left\| {\overrightarrow d } \right\|}}$.