matrix representation Consider a linear operator $L:P_2 \to P_2$ defined by:($P_2$ denote the space of polynomials with degree $\le2$)
$L(f)=2f '+f$
Let $E=\{-2+2x^2,2-x,2+x-2x^2\},\ F=\{1+x+x^2,1+x,1\}$
Find the matrix $A$ representing $L$ with resepect to $E$ and $F$.
I tried two methods, but the results are different
My attempt


*

*I send the each element in $E$ to $L$ and express in terms of $F$
\begin{pmatrix} 2x^2+8x-2\\  -x\\  -2x^2-7x+4 \end{pmatrix}= \begin{pmatrix} 2 & 6 & -10\\  0 & -1 &1\\  -2 & -5 &11 \end{pmatrix}\begin{pmatrix} x^2+x+1\\  x+1\\ 1\end{pmatrix}
Then the middle one should be the matrix A.


But if I use another method


*$A=[id]_{stb,F}[L]_{stb,stb}[id]_{E,stb} $ where I denote $[id]_{stb,F}$ be the change of basis matrix with respect to standard basis and F,$[L]_{stb,stb}$ be the matrix representing $L$ with respect to standard basis


Then I compute the matrix and it differs from the first one.
I'm not sure which one is correct, or both of them are wrong.
 A: The polynomial $2x^2-2$ can be written as the vector $(2,0,-2)^T$, storing the coefficients before $x^2$,$x$ and $1$, respectively. Furthermore E and F are linear spans of polynomials and I assume the meaning of "with respect to" means how the spaces are mapped under $L$. If we store polynimials as column vectors with coefficients as mentioned before. $L = 2f'+f$ since it's linear nature can be split into representing matrices for $2f'$ and for $f$.
Let us start with $R(f)$: it is simply the identity: $$R(f) = \left(\begin{array}{ccc}1&0&0\\0&1&0\\0&0&1\end{array}\right)$$
Now for the other term:
$$R(2f') = 2R(f') = 2\left(\begin{array}{ccc}0&0&0\\2&0&0\\0&1&0\end{array}\right)$$. The first row being all 0 is natural since none of the monomials become the highest order monomial after differentiation. So L is represented by $$R(L) = 2R(f')+R(f) = \left(\begin{array}{ccc}1&0&0\\4&1&0\\0&2&1\end{array}\right)$$
Now just use this matrix on all of the basis vectors for E and F and see what happens.
