Find the matrix $T$ in another basis Let $V=\mathbb R_{\leq 2}[x]$ be the vector space of polynomials of degree at most $2$ over $\mathbb R$. Let $e_1, e_2, e_3$ and $e_1',e_2',e_3'$ be the bases $1,x,x^2$ and $1+x^2,1+2x,(1-x)^2$.
Firstly I'm asked to write down the matrices of linear maps $e_i\mapsto e_i'$ and $e_i'\mapsto e_i$ which I've calculated as $P=\begin{pmatrix}1&0&1\\1&2&0\\1&-2&1\end{pmatrix}$ for the first, and then for the second this is just $P^{-1}=\begin{pmatrix}-1&1&1\\0.5&0&-0.5\\2&-1&-1\end{pmatrix}$
Now I have to write the linear map $T:V\rightarrow V$ given by $T(f(x))=f''(x)$ in the basis $e_1,e_2,e_3$, for which I got $A=\begin{pmatrix}0&0&2\\0&0&0\\0&0&0\end{pmatrix}$.
Now the final part is what I'm struggling on. It says to now write $T$ in the basis $e_1',e_2',e_3'$ using the matrices calculated in the first part.
I tried using the equation $[T]_{e_i'}=S^{-1}[T]_{e_i}S$ where $S$ is the change of basis matrix from $e_i'$ to $e_i$, i.e $S=P^{-1}$ (Not sure if I've used the right matrices)
I calculated $[T]_{e_i'}=\begin{pmatrix}4&-2&-2\\4&-2&-2\\4&-2&-2\end{pmatrix}$ and then to see if it worked I considered the polynomial $x^2+1$, whose second derivative is $2$ and calculated $\begin{pmatrix}4&-2&-2\\4&-2&-2\\4&-2&-2\end{pmatrix}\begin{pmatrix}1\\0\\0\end{pmatrix}$ (in this basis $1+x^2$ corresponds to $\begin{pmatrix}1\\0\\0\end{pmatrix}$), but this gives $\begin{pmatrix}4\\4\\4\end{pmatrix}$ which clearly isn't equal to $2$ in this basis. Can somebody tell me where I'm going wrong? Or what I'm not understanding?
 A: The matrix that transforms from the basis $\alpha = \{e_1, e_2, e_3\}$ to $\beta = \{e'_1, e'_2, e'_3\}$ is incorrectly transposed. So for example, the linear map that takes the vectors of $\alpha$ to the respective vectors in $\beta$ is
$$\begin{bmatrix} 1 &1 &1 \\ 0 & 2 &-2 \\ 1 & 0 &1 \end{bmatrix}$$
(Alternatively, you can view this as the change of basis from a vector $p_\beta$ in the basis $\beta$ to a vector $p_\alpha$ in the basis $\alpha$.) I believe that is the only problem here. The rest of the work seems correct to me.
EDIT: To answer the question, the confusion stems from the fact that the polynomials $e_1, e_2, e_3$ are to be treated like vectors, not scalars. For example, if $\{1, x, x^2\}$ is the basis, then we should think of the polynomial $f(x) = 1$ as the vector $(1, 0, 0)^T$ and the polynomial $g(x) = 1 + 5x + 2x^2$ as the vector $(1, 5, 2)$. So when looking for the matrix that takes $e_1 \to e'_1$, $e_2 \to e'_2$, $e_3 \to e'_3$, you should think of finding the matrix that takes $(1, 0, 0)^T \to (1, 0, 1)^T, (0,1,0)^T \to (1, 2, 0)^T$, and $(0, 0, 1)^T \to (1, -2, 1)^T$.
