Let $L$ be the line in $\Bbb R^3$ containing the point $A (0,1,1)$.
Specifically, let $L = \{t[0,0,1]+[0,1,1]\mid t\in\Bbb R\}$.
Let $U=[1,-1,0]$
The question is to find the point on the line which is closet to the point $U$.
And here is the answer:
Let $P$ be the point we are looking for.
Then $AU =[1,-2,-1]$.
We see that $AP=\operatorname{proj}_n (AU)$, where $n$ is the normal vector of the line which is $[0,0,1]$.
My question is why $\operatorname{proj}_n (AU)$ equals $AP$. I think it should be $UP$.