Projection matrix and orthonormal. Let be $U=${$(x,y,z) \in \mathbb{R}^3 | x-2y+3z=0$} Find $P_u(1,1,1)$
This is what i did.
If $(x,y,z) \in U$ then $x=2y-3z$. That can be expressed by $(x,y,z)=(2y-3z,y,z)=(2,1,0)y+(-3,0,1)z$
So $U=<(2,1,0),(-3,0,1)>$
Using Gram-Schmidt and the orthonormal form.
$w_1=\frac{1}{\sqrt{5}}(2,1,0)$
$w_2=\frac{5}{\sqrt{70}}(\frac{-3}{5}, \frac{6}{5},1)$
So $A=\begin{bmatrix}
    \frac{2}{\sqrt{5}} & -\frac{3}{\sqrt{70}}\\
    \frac{1}{\sqrt{5}} & \frac{6}{\sqrt{70}}\\
    0 & \frac{5}{\sqrt{70}}\\
\end{bmatrix}
$
And using this: $P=A(A^TA)^-A^T$
Then $P=\begin{bmatrix}
    \frac{13}{14} & \frac{1}{7} & -\frac{3}{14}\\
    \frac{1}{7} & \frac{5}{7} & \frac{3}{7}\\
   -\frac{3}{14} & \frac{3}{7} & \frac{5}{14}\\
\end{bmatrix}
$
So $P_u=(\frac{6}{7}, \frac{9}{7},\frac{4}{7})$
Am i doing this right? I'm currently learning this in class.
 A: The answer is correct and the method you used is sound, although I’d say that it’s overkill for this particular problem. If you were going to project a lot of vectors, then finding the projection matrix would be worthwhile, but you can compute the projection of a single vector with a lot less work.  
First, if you’re going to compute the projection matrix via the formula $P=A(A^TA)^{-1}A^T$, then there’s no reason to go through the Gram-Schmidt process to compute an orthonormal basis for $U$. This formula works for any basis. So, once you had your initial basis for $U$, you could’ve simply applied the formula to $A=\begin{bmatrix}2&1&0\\-3&0&1\end{bmatrix}^T$ instead.  
On the other hand, once you’ve gotten an orthonormal basis for $U$, you can take advantage of the fact that the projection onto $U$ is the sum of the individual projections onto those basis vectors. So, setting $v=(1,1,1)^T$, compute ${w_1^Tv\over w_1^Tw_1}w_1+{w_2^Tv\over w_2^Tw_2}w_2$. If you need the matrix $P$ for some reason, then it is ${w_1w_1^T\over w_1^Tw_1}+{w_2w_2^T\over w_2^Tw_2}$, which is a lot easier to calculate than the expression in the previous paragraph. (Note the order of the multiplicands in the numerators: those aren’t inner products. They’re the outer products of a vector with itself, which is a $3\times3$ matrix.).  
Since $U$ is two-dimensional, the easiest way by far to compute a projection onto $U$ is to compute the orthogonal rejection, which is the projection onto a vector orthogonal to $U$, and then subtract that from the original vector. In this case, we read from the defining equation of $U$ that $w=(1,-2,3)^T$ is orthogonal to $U$, so the projection of $v=(1,1,1)^T$ onto $U$ is $$v-{w^Tv\over w^Tw}w=(1,1,1)^T-\frac2{14}(1,-2,3)^T=\left(\frac67,\frac97,\frac47\right)^T,$$ just as you got.
