Let L be the line in 3-space that passes through the points $(1, 4, 3)$ and $(3, 3, 5)$. Determine the (minimum) distance from (−1, 5, 2) to L. So far, I've gotten the vector equation for $L$ to be:
$$L = (1, 4, 3) + t\,(2, -1, 2)$$
For this (not-for-marks) homework problem, we're also not allowed to use cross product. I've worked on it for a couple hours and am thoroughly lost. Can someone walk me through the solution? (I suspect the solution may use projections/perps?)
Thanks!
 A: First of all the equation of $l$ is the following one
$l: x=t(\begin{pmatrix}3 \\3 \\5\end{pmatrix}-\begin{pmatrix}1 \\4 \\3\end{pmatrix})+ \begin{pmatrix}1 \\4 \\3\end{pmatrix} =t \begin{pmatrix}2 \\-1\\2 \end{pmatrix}+ \begin{pmatrix}1 \\4 \\3\end{pmatrix} $
Set $v= \begin{pmatrix}2 \\-1 \\2\end{pmatrix}$, $A= \begin{pmatrix}1 \\4 \\3\end{pmatrix}$ and $P= \begin{pmatrix}-1 \\5 \\2\end{pmatrix}$
Now you have to impose that the vector $P-Q$ is orthogonal to the director vector $v$ of $l$, where $Q$ is a general point of $l$. Thus you get
$\langle P-Q, v\rangle=\langle P-tv-A, v\rangle= \langle P-A, v\rangle -t||v||^2=0$
and so
$t=\frac{\langle P-A, v\rangle }{||v||^2}=\frac{-4-1-2}{9}=-1$
Now you have $Q=\begin{pmatrix}-1 \\5 \\1\end{pmatrix}$
And the minimum distance is equal to
$d(l, P)=||PQ||=1$
In general the formula will be
$d(l,P)^2= ||PQ||^2=\langle P-Q,P-tv-A\rangle$
$=\langle P-Q, P-A\rangle=||P-A||^2-t\langle v,P-A\rangle$
$=||P-A||^2-\frac{\langle v, P-A\rangle^2}{||v||^2}$
So
$d(l,P)= \frac{\sqrt{||P-A||^2||v||^2- \langle v, P-A\rangle^2}}{||v||}$
You can observe that the formula it makes always sense because of Cauchy-Schwartz inequality
$ \langle v, P-A\rangle\leq ||v|| ||P-A||$
The formula holds for every dimension $n$. In particular for $n=2$ you get the usual formula
$d(l,P)= \frac{|ax_P+by_P+c|}{\sqrt{a^2+b^2}}$
where $l: ax+by+c=0$ , $v=(-a,b)$, $P=(x_P,y_P)$, and $A$ is some point of $l$
A: If $a$ is a point not on the line $L$ and $b$ is a point on the line $L$ such that $||b-a||$ realizes the distance from $a$ to $L$, I assume that you know that $b-a$ is orthogonal to the direction vector of the line (and that $b$ is uniquely determined by this property).
So if $L$ is given by $\{x|x= c +t v, t\in \mathbb{R}\}$ you want to choose $t$ sucht that
$$\langle c+tv -a,v\rangle=0$$
The rest is just a simple calculation.
If $a$ happens ot lie on $L$ there is nothing to do (apart from confirming this).
