Shortest distance between two lines in 3-dimensional space Can someone explain to me how to solve this question?
Find the shortest distance between the lines 
$L_1 = \left\{t \begin{bmatrix} 1\\ 1\\ 1\end{bmatrix} : t \in \mathbb{R}\right\}$ and $L_2 = \left\{s \begin{bmatrix} 1\\ 2\\ 3\end{bmatrix} + \begin{bmatrix} 1\\ 0\\ 0\end{bmatrix}: s \in \mathbb{R}\right\}$
Thanks

The Euclidean distance between the two lines is
$$\left\|s \begin{bmatrix} 1\\ 2\\ 3\end{bmatrix} - t \begin{bmatrix} 1\\ 1\\ 1\end{bmatrix} + \begin{bmatrix} 1\\ 0\\ 0\end{bmatrix}\right\| = \left\|\begin{bmatrix} 1 & -1\\ 2 & -1\\ 3 & -1\end{bmatrix} \begin{bmatrix} s\\ t\end{bmatrix} - \begin{bmatrix} -1\\ 0\\ 0\end{bmatrix}\right\|$$
Minimizing this Euclidean distance is a least-squares problem. The mininimizer of $\| A x - b\|$ is given by the solution to the so-called normal equations $A^T A x = A^T b$. Since
$$\begin{bmatrix} 1 & -1\\ 2 & -1\\ 3 & -1\end{bmatrix}^T \begin{bmatrix} 1 & -1\\ 2 & -1\\ 3 & -1\end{bmatrix} = \begin{bmatrix} 14 & -6\\ -6 & 3\end{bmatrix}, \qquad{} \begin{bmatrix} 1 & -1\\ 2 & -1\\ 3 & -1\end{bmatrix}^T \begin{bmatrix} -1\\ 0\\ 0\end{bmatrix} = \begin{bmatrix} -1\\ 1\end{bmatrix}$$
the normal equations give us the following system of equations
$$\begin{bmatrix} 14 & -6\\ -6 & 3\end{bmatrix} \begin{bmatrix} s\\ t\end{bmatrix} = \begin{bmatrix} -1\\ 1\end{bmatrix}$$
whose solution is $\begin{bmatrix} s\\ t\end{bmatrix} = \begin{bmatrix} \frac{1}{2}\\ \frac{4}{3}\end{bmatrix}$. The minimum Euclidean distance between the two lines is, thus,
$$\left\|\frac{1}{2} \begin{bmatrix} 1\\ 2\\ 3\end{bmatrix} - \frac{4}{3} \begin{bmatrix} 1\\ 1\\ 1\end{bmatrix} + \begin{bmatrix} 1\\ 0\\ 0\end{bmatrix}\right\| = \left\|\begin{bmatrix} \frac{1}{6}\\ -\frac{1}{3}\\ \frac{1}{6}\end{bmatrix}\right\| = \frac{1}{\sqrt{6}}$$
