The subspace V in $R^4$ is the span of vectors $u = \frac 1{3} [1, -1, 1, 2]^T$ and $v = \frac 1 {5}[1, 2, 1, 1]^T$. Find the shortest distance from the point $P(1, 1, 1, 1)$ and the subspace.
Don't really know where to start here so would really appreciate some hints and tips. I've looked up similar questions like this: Distance from point $(1,1,1,1)$ to the subspace of $R^4$ but don't really get the idea of it.
A vector $v$ in the subspace $V$ is of the form $v=a(1,-1,1,2)+b(1,2,1,1)$. Now the distance from the point $P(1,1,1,1)$ to the subspace is the minimum distance between the points $P$ and $(a+b,-a+2b,a+b,2a+b)$ for all vales of $a$ and $b$. So the square of the distance $D^2 =2(a+b-1)^2+(-a+2b-1)^2+(2a+b-1)^2$. Now minimum vales of $a$ and $b$ gives required distance.
Minimum values of $a$ and $b$ are obtained by solving $\frac{\partial D^2}{\partial a}=0$ and $\frac{\partial D^2}{\partial b}=0$.