Linear Algebra Change of Basis problem So, $\mathbb{P}_2$ is the vector space of all polynomials with degree less than or equal to 2 and that $E=\{1,t,t^2\}$ is a basis for $\mathbb{P}_2$
We define
$p_1(t)=1+2t$
$p_2(t)=t-t^2$
$p_3(t)=t+t^2$
$B=\{p_1,p_2,p_3\}$ is a basis for $\mathbb{P}_2$
Let $T: \mathbb{P}_2 \to \mathbb{P}_2$ be a transformation $T(p(t))=p'(t)-p(t)$. (Where $p'(t)$ denotes the derivative of $p(t)$). Find the matrix of $T$ relative to the basis $B$.
Our method was to take $p_1,p_2,p_3$, and turned it into a $3x3$ matrix, which makes
 \begin{bmatrix}
       1 & 0 & 0 \\[0.3em]
       2 & 1   & 1 \\[0.3em]
       0 & -1 & 1
     \end{bmatrix}
Then, we found the $T(p_1(t)), T(p_2(t)), T(p_3(t))$, which gives us
\begin{bmatrix}
       1 & 1 & 1 \\[0.3em]
       -2 & -3   & 1 \\[0.3em]
       0 & 1 & -1
     \end{bmatrix}
And we have absolutely no idea where to go from there.
The final answer in the book was that the matrix of $T$ relative to the basis $B$ is
 \begin{bmatrix}
       1 & 1 & 1 \\[0.3em]
       -2 & -3   & 0 \\[0.3em]
       -2 & -2 & -1
     \end{bmatrix}
 A: The error appears to be with your first matrix. Consider the case where $T$ is the identity transformation; then your procedure makes the first and second matrices the same (as the first matrix). But clearly this is not the identity matrix. However, it is a representation of the identity transformation: if the domain is interpreted with basis $B$ and the codomain is interpreted with the standard basis.
Here are two conceptual answers to your question, although there may be better methods for computation. 

Since you know the action of the derivative in the standard basis, you can compute $T$ with respect to the standard basis $S$:
$$
[T]_{S\leftarrow S} = \begin{bmatrix}
       -1 & 1 & 0 \\[0.3em]
       0 & -1 & 2 \\[0.3em]
       0 & 0 & -1
     \end{bmatrix}
$$
If we now right-multiply by the change of basis matrix $[I]_{S\leftarrow B}$ and left-multiply by the change of basis matrix $[I]_{B\leftarrow S}$, we have $[I]_{B\leftarrow S}[T]_{S\leftarrow S}[I]_{S\leftarrow B}$. What does this matrix do? 


*

*The rightmost matrix takes a set of coordinates in $B$ and rewrites it as a set of coordinates in $S$ without changing the abstract vector being represented. 

*Then the inner matrix interprets the output of that operation (correctly) as a set of coordinates in $S$ and applies the abstract transformation $T$ to it and produces the result as a set of coordinates in $S$.

*Finally, the leftmost matrix interprets the output of that operation (correctly) as a set of coordinates in $S$ and rewrites it as a set of coordinates in $B$ without changing the abstract vector being represented.


We conclude, therefore, that this matrix takes a set of coordinates in $B$, and produces the set of coordinates in $B$ which one would obtain after applying the linear transformation $T$ to the abstract vector. This is exactly what we want!

(This is an abstraction of Paul's answer)
The alternative option is to figure out the action of the derivative with respect to $B$; then you add this to the identity matrix to get the matrix of $T$ with respect to $B$. In general, doing this is equivalent to the above operation but using $D$ instead of $T$. But in practice, since this basis has only three elements, you may just be able to figure out the answer by guessing and then prove it by checking your guess.
A: It is helpful to calculate first that
$$1 = p_1 - p_2 - p_3$$ $$t = \frac{1}{2}(p_2 + p_3)$$ $$t^2 = \frac{1}{2}(p_3 - p_2)$$
Now calculate the derivatives of $p_1, p_2, p_3$, and use the expressions above to write those derivatives in terms of $p_1, p_2, p_3$. From those, expressions for $T(p_1), T(p_2), T(p_3)$ are easy to obtain, which will give you the elements of the matrix.
