<s>[INST] How to find the projw(x) Sorry about formatting, new to this. 
Subspace w =
\begin{pmatrix}x_1\\x_2\\x_3\end{pmatrix} such that  $x_1 = x_3$ of R3. 
x = \begin{pmatrix}-2\\1\\3\end{pmatrix}
Question is to find $proj_w (x)$. 
 [/INST] We'll assume it's the projection with respect to the standard inner product. The basis for $w$ is $$\left\{\begin{bmatrix}1\\0\\1\end{bmatrix},\begin{bmatrix}0\\1\\0\end{bmatrix}\right\}.$$
Therefore, omitting details, you have a least squares problem for the system $$\begin{bmatrix}1&0\\0&1\\1&0\end{bmatrix}\begin{bmatrix}\alpha\\ \beta\end{bmatrix}=\begin{bmatrix}-2\\1\\3\end{bmatrix}.$$ Call that system $Ax=b$. The least squares solution is $$x=(A^T A)^{-1}A^Tb$$ or $$\begin{bmatrix}\alpha \\ \beta \end{bmatrix}=\begin{bmatrix}2&0\\0&1\end{bmatrix}^{-1}\begin{bmatrix}1&0&1\\0&1&0\end{bmatrix}\begin{bmatrix}-2\\1\\3\end{bmatrix}=\begin{bmatrix}1/2\\1\end{bmatrix}.$$ These are the coefficients of the project, so the projection itself is $$\begin{bmatrix}1&0\\0&1\\1&0\end{bmatrix}\begin{bmatrix}1/2\\1\end{bmatrix}=\begin{bmatrix}1/2\\1\\1/2\end{bmatrix}.$$
</s>