# Distance between a point and a line! [duplicate]

I have a big problem with geometry. How I do calculate the distance between the vectorial line $r:(x,y,z)=(2,1,0)+\lambda(0,4,-3)$ and the point $A=(2,4,4)$? I tried to solve the problem but nothing...

• pick a point $P$ on the line so that $AP$ is orthogonal to $(0, 4, -3)$ – abel Jan 24 '15 at 16:01

One way you can calculate it is by taking the distance from $A=(2,4,4)$ to an arbitrary point on the line and then minimizing it.
We let $B_\lambda=(2,1,0)+\lambda(0,4,−3)=(2,1+4\lambda,-3\lambda)$ be an arbitrary point on the line, so using the Euclidean distance formula, we have
\begin{align} d(A,B_\lambda)&=\sqrt{(2-2)^2+(4-(1+4\lambda))^2+(4-(-3\lambda))^2} \\&=\sqrt{(3-4\lambda)^2+(4+3\lambda)^2} \\&=\sqrt{9-24\lambda+16\lambda^2+16+24\lambda+9\lambda^2} \\&=\sqrt{25+25\lambda^2} \\&=5\sqrt{1+\lambda^2} \end{align} Since $\lambda^2\ge0$, this is minimized when $\lambda=0$, which gives a distance of exactly $5$.
Note that we have also found the closest point on the line to $A$ which is $B_0=(2,1,0)$.
• that's awsome, your result is exactly as mine, but the problem is that my professor said that the distance is $3$ not $5$, maybe an error? – Ali Mostafa Jan 24 '15 at 16:11