Computing the matrix of $Tp(x) = p'(x) + x^2 p''(x)$ relative to the basis $\{1, x, x^2\}$ 
Show that the operator $T \colon P_2(\mathbb{R}) \to P_2(\mathbb{R})$ given by
  $$
  Tp(x) = p'(x) + x^2 p''(x)
$$
  is a linear operator.
Compute the matrix $[T]_{B,B}$ of $T$ relative to the standard basis $B = \{1, x, x^2\}$ for $P_2(\mathbb{R})$.

So I know that a polynomial in $P_2(\mathbb{R})$ is of the form $ax^2 + bx + c$, and $P'(x) = 2ax + b$, $P''(x) = 2a$.
So $Tp(x) = 2ax+b + 2ax^2 = b + 2ax + 2ax^2$.
But I am having trouble expressing it in terms of a matrix. 
Just to make sure I understand it, I have tried the question with a new basis $B=(1,x,x^2+x+\frac{1}{2}$) and I get the matrix:
$$
        \begin{pmatrix}
        0 & 1 & 0 \\
        0 & 0 & 0 \\
        0 & 0 & 2 \\
        \end{pmatrix}
$$
Applying the operator $x^2+x+\frac{1}{2}$ gives me $2x^2+2x+1$, which is 2 lots of the basis.
Comments:
-A linear operator is always unique.
-Since the only basis that changed was the last one, that means I can borrow the first 2 columns from my first matrix.  
 A: We have the operator $T \colon P_2(\mathbb{R}) \to P_2(\mathbb{R})$ given by
$$
  Tp(x) = p'(x) + x^2 p''(x)
$$ and basis $\beta=\{1,x,x^2\}$. Now first consider $p(x)=1$, from the basis. Then $p'(x)=0=p''(x)$. So $T(p(x))=0=0\times1+0\times x+0\times x^2$. Similarly for $p(x)=x$ and $p(x)=x^2$, we get $T(p(x))=1+0\times x+0\times x^2$ and $T(p(x))=0\times1+2\times x+2\times x^2$ respectively. Hence ,
$$[T]_\beta=\begin{bmatrix}0&1&0\\ 0&0&2\\ 0&0&2\end{bmatrix}$$
A: To show the linearity, you just need to show $T(p(x)+aq(x))=T(p(x))+aT(q(x))$ which is concluded easily since derivative operator is a linear one. 
To find the matrix of operator according to the given basis, you need to compute the operator on the basis's members and make the answers as a linear combination of the basis's members. 
$T(1)=0$ and so the first column of the matrix is $\begin{pmatrix}0\\ 0\\ 0\end{pmatrix}$.
$T(x)=1$ and so the second column of the matrix is $\begin{pmatrix}1\\ 0\\ 0\end{pmatrix}$.
$T(x^2)=2x+2x^2$ and so the third column of the matrix is $\begin{pmatrix}0\\ 2\\ 2\end{pmatrix}$
