Matrix of a linear transformation. In $\mathbb{R^3}$ we consider the following vectors $v_1 = (1,0,1), v_2=(-2,2,1), v_3=(0,1,1)$
Let $V$ be a vector space , $V=\{(x,y,z) \in \mathbb{R^3}\mid x+y-z=0\}.$
Let $W = \operatorname{span}(v_2)$.
$B =\{ (v_1,v_3)\}$ is a basis for $V$
Let $P$ be the projection on $V$ parallel to $W$.
Determine the matrix of $P$ with respect to the standard basis of $\mathbb{R^3}$ and $B$.
The problem is I've only dealt so far with determining matrices where they give out the linear transformation such that $f(x,y,z)=f(x+2y,x+y+z)$. And I'm clueless on how to approach this question.
Hints and advice are appreciated!
Thanks in advance!
 A: find $P$ such that $v_2$ is in the kernel of $P.$ $v_1, v_3$ are the column space of $P.$
In the basis $B, P = \begin{bmatrix} 1&0&0\\0&0&0\\0&0&1\end{bmatrix}$
In the standard basis.
$P = \begin{bmatrix}1&-2&0\\0&2&1\\1&1&1\end{bmatrix}\begin{bmatrix} 1&0&0\\0&0&0\\0&0&1\end{bmatrix}\begin{bmatrix}1&-2&0\\0&2&1\\1&1&1\end{bmatrix}^{-1}$
$\begin{bmatrix}-1&-2&2\\2&3&-2\\1&1&0\end{bmatrix}$
A: The concept of projection to V  parallel to W is easily understandable if one digs into  the geometric (or optics) etymology of the word projection.
We have seen powerpoint projectors sending images to a screen on the wall.
 Instead imagine a screen where parallel beam of light from the sun  (from a source at infinity as physicists  describe) fall onto a screen casting shadows of objects on its way.
A dot (which light cannot penetrate) occupying a position $v\in \mathbf{R}^3$ casts a shadow at a position $p(v)$ in the plane (of the screen).
Now remember sun's position is not fixed so the beam of light can be in any direction, not necessarily falling perpendicular to the screen.
So that is what a projection is: it is specified by  a target plane and a direction of approach towards that screen. Well it is a special kind of projection a $3\times3$ matrix of rank 2 satisfying $P^2=P$.
In general algebraically a projection in a vector space $V$ has a target space $V_1\subset V$ and a "direction subspace" $V_2\subset V$ which are complements of each other (that is they together span the whole space, and have just the zero vector in common).
So any vector $v\in V$ has a unique decomposition $v=v_1+v_2$ with $v_1\in V_1,\ v_2\in V_2$. The corresponding projection is $p(v) = v_1$.
That is all vectors in the direction subspace form the kernel, and for all vectors in the target space the projection does nothing (acts as identity on them).
