Whilst working on vectors I have come across a lot of problems like this. I am able to work it out for the shortest distance from a vector to a point, but not from a vector to a vector. Here is my usual method for a question asking the shortest distance from a vector (passing through $A$ and $B$) to a point $C$: $$\vec{OA}=a$$ $$\vec{OB}=b$$ $$\vec{OC}=c$$ Where $O$ is the origin. We know that the equation for a line passing through $A$ and $B$ is: $$\vec{r}=\mu(b-a)+a$$ we also know that at the closest distance a line from $C$ to $\vec{r}$ is perpendicular to $\vec{r}$. I would now define: $$\vec{r}=\begin{pmatrix}\mu(b_1-a_1)+a_1\\\mu(b_2-a_2)+a_2\\\mu(b_3-a_3)+a_3\end{pmatrix}=\begin{pmatrix}d_1\\d_2\\d_3\end{pmatrix}$$ so the distance from $\vec{r}$ to $C$ is: $$l=\sqrt{(d_1-c_1)^2+(d_2-c_2)^2+(d_3-c_3)^2}$$ now find the point at which $\frac{dl}{d\mu}=0$ solving for $\mu$ and subbing into the equation.
However, I am aware that there are much easier methods for find the point $N$ and the shortest distance $|\vec{NC}|$ involving the fact that $\vec{r}\bullet\vec{NC}=0$ or potentially cross product as well. Does anyone have a tutorial for this method? Also, how would I solve this same problem but finding the minimum distance between two vectors? Thanks