Find a point of the plane which distance to a line minimal is Let be $P \subseteq R^3$ (P is a plane)and $X_1, X_2 \subseteq R^3$ two lines given by:
$P = \Bigg\langle \begin{pmatrix} 2   \\ 0 \\ 1\end{pmatrix},\begin{pmatrix} 0   \\ 2 \\ 1\end{pmatrix} \Bigg\rangle$,
$X_1 = \Bigg\langle \begin{pmatrix} 2   \\ 0 \\ 1\end{pmatrix}\Bigg\rangle$,
$X_2 = \Bigg\{\begin{pmatrix} 0   \\ -2 \\ 5\ \end{pmatrix} +s  \begin{pmatrix} 0 \\ 2 \\ 1 \end{pmatrix}\Bigg \}$, where $s \in \mathbb{R}$
(a) Let be $T_s=(0,-2+2s,5+s) \in X_2$. Determine a point $T_s^{*} \in P $ that $||T_s-T_s^{*}|| = min||T_s-T||$
as I understand the problem $T_s^{*}$is a point of the plane $P$ which distance to $T_s \in X_2$ minimal is. I guess that I have to work with some kind of orthogonal projection but I still don't have no idea how does it work. Thank you very much for your help in advance.
 A: Your guess is right. Note that$$\{e_1,e_2\}=\left\{\begin{bmatrix}\frac2{\sqrt5}\\0\\\frac1{\sqrt5}\end{bmatrix},\begin{bmatrix}-\frac1{\sqrt{30}}\\\frac5{\sqrt{30}}\\\frac2{\sqrt{30}}\end{bmatrix}\right\}$$is an orthonormal basis of $P$ (which I got applying Gramm-Schidt to the given basis). Therefore, the point of $P$ which is closer to $T_s$ is$$\langle T_s,e_1\rangle e_1+\langle T_s,e_2\rangle e_2=\begin{bmatrix}2\\2s\\s+1\end{bmatrix}.$$
A: A bit late answer but I think worth mentioning it because it doesn't need any Gram-Schmidt:
Note that the direction vector $\begin{pmatrix} 0 \\ 2 \\ 1 \end{pmatrix}$ of $X_2$ is also a spanning vector of $P$. Hence, the line $X_2$ is parallel to $P$.
The line $X_2$ passes through point $(0  , -2 , 5)$. So, you need to find the orthogonal projection of this point onto $P$.
Since $P$ contains point $(0,0,0)$, you only need to project $\begin{pmatrix} 0   \\ -2 \\ 5\ \end{pmatrix}$ onto a normal vector of $P$ in order to find the component of $\begin{pmatrix} 0   \\ -2 \\ 5\ \end{pmatrix}$ which is normal to $P$.
A normal vector of $P$ is quickly found to be, for example, $\begin{pmatrix} -1   \\ -1 \\ 2\ \end{pmatrix}$. Hence, the position vector of such a point you are looking for is
$$\begin{pmatrix} 0   \\ -2 \\ 5\ \end{pmatrix}- \frac{\begin{pmatrix} 0   \\ -2 \\ 5\ \end{pmatrix}\cdot\begin{pmatrix} -1   \\ -1 \\ 2\ \end{pmatrix}}{\left|\begin{pmatrix} -1   \\ -1 \\ 2\ \end{pmatrix}\right|^2}\begin{pmatrix} -1   \\ -1 \\ 2\ \end{pmatrix} = \begin{pmatrix} 2 \\ 0 \\ 1\ \end{pmatrix}$$
