I am struggling with this Linear Algebra course. I attempted these questions but am not confident in my answers. Can someone verify?
Let W = span{1 + x + x$^2$,−x + x$^2$} be a subspace of P2(R) Let us define the inner product <·,·> : V x V → R through = p(−1)q(−1) + p(0)q(0) + p(1)q(1)
Find the orthogonal projection operator [PW]$^a_a$ where α is the standard basis for P2.
Diagonalize [PW]$^a_a$
EDIT: My Incorrect Solution what is wrong with this approach?
W$_1$ = $a_1$ = 1
W$_2$ = $a_2$ - $\frac{(<1+x, 1>)}{(<1, 1>)}$ (1)
W$_2$ = x
W$_3$ = 1 + x + x$^2$ - $\frac{(<1 + x + x^2, x>)}{<x, x>}$(x) - $\frac{(<1 + x + x^2, 1>)}{<1, 1>}$(1)
W$_3$ = -2/3 + x$^2$
I used the Gram-Schmidt method for finding the orthogonal projection operator and came up with the matrix being
$\begin{bmatrix}1 & 0 & 0\\0 & 1 & 0\\-2/3 & 0 & 1\end{bmatrix}$
For the diagonalization part I found the eigenvalues of this matrix to be 1 with multiplicity of 3. Which would mean the eigenspace would be made up of 3 vectors which I compiled of it being the span{(1, 0, 0), (-1, 1, 0) and (-1, 0, 1)}.
I really think the last part is incorrect but not sure where I made an error in finding [PW]$^a_a$
Thanks!
So $W=\mathrm{span}\{1+x+x^2, -x+x^2\}$. Let me choose a slightly different vectors to represent this space: let $f_1=(x^2-x)/2$ and $f_2=(x^2+3x+2)/(2\sqrt{10})$.
Edit: How did I come up with $f_1, f_2$? The idea is to start with one of vectors, I chose $x^2-x$, and let $f_1=a(x^2-x)$ be such that $\langle f_1, f_1\rangle =1$. Now, for the next part, let $f_2=A(x^2-x)+B(x^2+x+1)$. We have two conditions: $\langle f_1, f_2\rangle = 0$ and $\langle f_2, f_2\rangle = 1$. By doing some algebra, you find $A,B$ and as a result you find $f_2$. This is actually exactly what Gram-Schmidt process does, I just cut-out the middleman.
It is easy to see that $W=\mathrm{span}\{f_1, f_2\}$ but furthermore $\langle f_1, f_1\rangle = \langle f_2, f_2\rangle =1$ and $\langle f_1, f_2\rangle = 0$, i.e. $f_1, f_2$ is an orthonormla basis for $W$.
Now the projection operator $P_W$ sends $v\in P_2(\mathbb{R})$ to $$ \begin{aligned} v\mapsto \langle v, f_1\rangle f_1+\langle v, f_2\rangle f_2 \end{aligned} $$ you can see why it is crucial that 1) both $f_1, f_2$ are actually unit (otherwise $f_1$ is not sent to itself, but a multiple) 2) $f_1, f_2$ have to be orthogonal. In particular $1\mapsto (8+2x+14x^2)/20$ and $x\mapsto (6+19x-7x^2)/20$ and $x^2\mapsto (6-x+13x^2)/20$, making the matrix $$ P_W=\frac{1}{20}\begin{pmatrix} 8 & 6 & 6\\ 2 & 19 & -1\\ 14 & -7 & 13 \end{pmatrix} $$ Once you diagonalize this matrix, it becomes $\mathrm{diag}(1,1,0)$, as it should be. Actually the orthonormal basis $f_1, f_2$ can be extended by $f_3=(-7 x^2-x+6)/(2\sqrt{10})$ making a full orthonomal basis of $P_2(\mathbb{R})$ in which the projection operator is diagonal.
Now, I don't have all of the information about your calculation. But what you found is not the projection matrix. Note that I have essentially used the Gram-Schmidt method in finding my $f_1,f_2$ too. I'm not sure whether you actually checked that your vectors should be unit or not, however.