Find the shortest distance between the point $(8,3,2)$ and the line through the points $(1,2,1)$ and $(0,4,0)$ "Find the shortest distance between the point $(8,3,2)$ and the line through the points $(1,2,1)$ and $(0,4,0)$"
$$P = (1,2,1), Q = (0,4,0), A = (8,3,2)$$
$OP$ = vector to $P$
$$PQ_ = (0,4,0) - (1,2,1)$$
I found that the equation of the line $L$ that passes through $(1,2,1)$ and $(0,4,0)$ is: 
$$L = OP + PQ \, t;$$
$$L = (1,2,1) + (-1,2,-1) \, t .$$
However after this I'm not sure how to proceed. I can find PA_ then draw a line from $A$ to the line $L$... advice?

Any point on the line looks like
$\vec{\rm r}\left(\lambda\right) \equiv \vec{P} + \lambda\vec{n}$ where
$\lambda \in {\mathbb R}$ and $\vec{n} \equiv \vec{Q} - \vec{P}$. The distance
between the point $\vec{A}$ and the point $\vec{\rm r}\left(\lambda\right)$ is given by
${\rm d}\left(\lambda\right)
=
\left\vert\vec{\rm r}\left(\lambda\right) - \vec{A}\right\vert
=
\left\vert\lambda\,\vec{n} + \vec{P} - \vec{A}\right\vert$. So, you have to minimize
\begin{align}
{\rm d}^{2}\left(\lambda\right)
=&
\lambda^{2} + 2\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\,\lambda
+
\left(\vec{P} - \vec{A}\right)^{2}
=
\left\lbrack\lambda + \vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2}
+
\left(\vec{P} - \vec{A}\right)^{2}
-
\left\lbrack\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2} 
\end{align}
Then the shortest distance is given by
$${\large\sqrt{%
\left(\vec{P} - \vec{A}\right)^{2}
-
\left\lbrack\vec{n}\cdot\left(\vec{P} - \vec{A}\right)\right\rbrack^{2}}} 
$$
