Find a projection \(E\) which projects \(\RR^2\) onto the subspace spanned by \((1, -1)\) along the subspace spanned by \((1, 2)\).
Solution
The required projection is \[ \boxed{ E(x,y)=\left(\frac{2x-y}{3},\frac{-2x+y}{3}\right), \qquad [E]=\frac13\begin{pmatrix}2&-1\\-2&1\end{pmatrix}.} \]
1. Decompose an arbitrary vector along the two prescribed lines.
The vectors \[ u=(1,-1), \qquad v=(1,2) \] are linearly independent, since \[ \det\begin{pmatrix}1&1\\-1&2\end{pmatrix}=3\ne0. \] Thus they form a basis of \(\mathbb R^2\). Write \[ (x,y)=au+bv=(a+b,-a+2b). \] Then \[ x=a+b, \qquad y=-a+2b. \] Adding the equations gives \(x+y=3b\), so \[ b=\frac{x+y}{3}, \qquad a=x-b=\frac{2x-y}{3}. \]
2. Keep the component on \(\operatorname{span}(1,-1)\).
Projection onto \(\operatorname{span}(u)\) along \(\operatorname{span}(v)\) means \[ E(au+bv)=au \] [@HK71]. Using the coefficient \(a\) from step 1, \[ E(x,y) =\frac{2x-y}{3}(1,-1) =\left(\frac{2x-y}{3},\frac{-2x+y}{3}\right). \] This formula is linear and has the displayed matrix.
It also verifies the required properties directly: \[ E(u)=u, \qquad E(v)=0. \] Hence the image is \(\operatorname{span}(u)\) and the kernel is \(\operatorname{span}(v)\). Since \(E\) fixes its image, \(E^2=E\), so it is indeed the desired projection.