Can we find a basis such that $[T]_{B^\prime}$ is a diagonal matrix? Let $T:P_2 \to P_2$ be defined by $T(p(x)) = x\frac{dp}{dx} + \frac{dp}{dx}$ and $B = \{ 1,x,x^2 \}$.
We can find that $[T]_B = \begin{bmatrix}0 & 1 & 0 \\ 0 & 1 & 2 \\ 0 & 0 & 2\end{bmatrix}$.
The eigenvalues of $T$ are thus the solutions of $\lambda$ to the characteristic polynomial $\det(\lambda I - [T]_B)=0$ which are $\lambda_1=0, \lambda_2 = 1, \lambda_3 = 2$.
My question is as follows: Considering the eigenvalues of $T$, is it possible for a basis $B^\prime$ for $P_2$ with respect to which $[T]_{B^\prime}$ is a diagonal matrix, to exist?
My instinct tells me that the answer is no, and that $\lambda_1 = 0$ plays a role in that. But to be honest, I am simply grasping this out of the air. Can someone please give me some clarity and reasoning to answer this question?
 A: the eigenvectors corresponding to the eigenvalues $0,1,2$ are the columns $1,2$ and $3$ respectively of $$V=\pmatrix{1&1&1\\0&1&2\\0&0&1}.$$  this can be written as $$AV = V\pmatrix{0&0&0\\0&1&0\\0&0&1}$$ in other words, with respect to the basis consisting of the columns of $V,$ the matrix representing the linear transformation $T$ is the diagonal matrix $$ \pmatrix{0&0&0\\0&1&0\\0&0&1}.$$
$\bf edit:$  the reason $AV = VD$ is we can write the eigenvector relations as $$Av_1=0v_1\,, Av_2 = 1v_2, Av_3 = 2v_3.$$  these three equations can be combined into $$A\pmatrix{v_1&v_2&v_3} =\pmatrix{Av_1&Av_2&Av_3} =\pmatrix{v_1&v_2&v_3}\pmatrix{0&0&0\\0&1&0\\0&0&1}   $$
A: As eigenspaces of any matrices are linearly independent if all the eigen values are unique then it can be diagonalized in some basis. Let $g(\lambda)$ be the geometric multiplicity corresponding to the eigen value $\lambda$ and let $a(\lambda)$ be the algebraic multiplicity then $1 \le g(\lambda) \le a(\lambda)$. As all eigen values are unique, $g(\lambda)=1$ for all eigen values and thus sum of dimensions of all eigen spaces is equal to the dimension of the space the matrix/linear operator acts on. This is a necessary sufficient condition for being diagonalizable. In such a case you can diagonalize the matrix in the way the example depicts here diagonalizable matrix.
