TITLE: Necessary and sufficient condition for diagonalizable matrix
QUESTION [6 upvotes]: Let $A\in M_n(\mathbb R)$ and $B=\begin{pmatrix}A & A\\0 & A\end{pmatrix}$. Prove that $B$ is diagonalizable if and only $A = 0$.

We see that for any polynomial $P$,
$P(B) = \begin{pmatrix}P(A) & AP'(A)\\0 & P(A)\end{pmatrix}$ where $P'$ is the derivative of P
$B$ is diagonalizable $\iff \exists P$ a polynomial with single roots which annihilates B
Then B diagonalizable if and only if A diagonalizable because $P(A)=0$. 
A annihilates the polynomial $XP'$ too.
From there, I don't see how to prove that $A=0$

REPLY [5 votes]: Here's an alternative approach: let $\lambda$ be any non-zero eigenvalue of $A$, and let $x$ be a corresponding eigenvector.  We see that
$$
(B - \lambda I) \pmatrix{0\\x} = \pmatrix{Ax\\ 0} \neq 0\\
(B - \lambda I)^2 \pmatrix{0\\x} = 0
$$
So we see that $B$ fails to be diagonalizable.
Thus, $A$ must have $0$ as its only eigenevalue.  However, since $B$ is block upper triangular with $A$s on the diagonal, we see that if $A$ has $0$ as its only eigenvalue, then so does $B$.  For $B$ to be diagonalizable with $0$ as its only eigenvalue, we must have $B = 0$.
If $B = 0$, then $A = 0$, as required.