How to prove that $A$ and $B$ are simultaneously diagonalizable Question:

Let $A,B$ be $n\times n$ complex matrices, and let $a$ and $b$ be complex numbers such that $$AB-BA=aA+bB.$$
  Show that $A$ and $B$ are simultaneously diagonalizable.

My Try:
Case 1: If $a=b=0$, then $AB=BA$. This is true. [Editor's note: In this case, the result is well known.]
Case 2: Without loss of generality, we let $a\neq 0$, so we may assume $a=1$ (let $\dfrac{1}{a}B$ replace $B$).
Let $C=AB-BA=A+bB$, then $$CB-BC=C$$ and I can't continue.
Thank you very much!
 A: Edit: The statement is false. Here is a counterexample:
$$
A=\pmatrix{1&0\\ 1&2},\ B=\pmatrix{1&0\\ 0&2},\ AB-BA=\pmatrix{0&0\\ -1&0}=B-A\ne0.
$$
Both $A$ and $B$ here are diagonalisable. However, since $A$ and $B$ do not commute, they are not simultaneously diagonalisable. 
However, under the assumption that $A,B$ and $AB-BA$ are diagonalisable, the statement is true. In this case, your $C$ is diagonalisable and it suffices to show that $C=0$. Without loss of generality, suppose $B$ is a diagonal matrix of the form $(\lambda_1I_{n_1})\oplus\cdots\oplus(\lambda_k I_{n_k})$, where $\lambda_1,\ldots,\lambda_k$ are distinct and they have increasing real parts. Then $CB−BC=C$ implies that with a conforming partition to $B$, $C$ is a block strictly upper triangular matrix and hence $C$ is nilpotent. Therefore $C$ is a diagonalisable nilpotent matrix and it must be zero.
A: I've got a partial answer assuming that $A$ is diagonalizable and the nonzero $b$ is not equal to a difference of any pair of the distinct eigenvalues of $A$. Hope it will help :-)
So let $AB-BA=aA+bB$, $b\neq 0$, and $A$ be diagonalizable. Then there exists a nonsingular $X$ such that $A=X\Lambda X^{-1}$. We can assume that the matrix $A\in\mathbb{C}^{n\times n}$ has $k$ distinct eigenvalues $\lambda_1,\ldots,\lambda_k$ such that
$$
\Lambda = \begin{bmatrix}\lambda_1 I_{n_1} & & \\ & \ddots & \\ & & \lambda_k I_{n_k}\end{bmatrix},
$$
where $I_{n_i}$ is the identity matrix of the dimension $n_i$ and $\sum_{i=1}^k n_i=n$.
From $AB-BA=aA-bB$, we have
$$
\Lambda\tilde{B}-\tilde{B}\Lambda=a\Lambda+b\tilde{B},\tag{1}
$$
where $\tilde{B}=X^{-1}BX$. Assume $\tilde{B}$ to be partitioned to blocks conforming to the partitioning of $\Lambda$:
$$
\tilde{B} = \begin{bmatrix}\tilde{B}_{11} & \cdots & \tilde{B}_{1k} \\ \vdots & \ddots & \vdots \\ \tilde{B}_{k1} & \cdots & \tilde{B}_{kk}\end{bmatrix},
$$
where $\tilde{B}_{ij}\in\mathbb{C}^{n_i\times n_j}$. Now compare both sides of (1) for each block:


*

*diagonal blocks: for $i=1,\ldots,k$, we have
$$
0 = \lambda_i \tilde{B}_{ii} - \lambda_i \tilde{B}_{ii} = a\lambda_i I_{n_i} + b\tilde{B}_{ii} \quad \Rightarrow \quad \tilde{B}_{ii}=\gamma_i I_{n_i}, \quad \gamma_i=\frac{a\lambda_i}{b}.
$$

*off-diagonal blocks: for $i,j=1,\ldots,k$, $i\neq j$, we have
$$
(\lambda_i-\lambda_j)\tilde{B}_{ij}=b\tilde{B}_{ij}.\tag{2}
$$
If $\lambda_i-\lambda_j\neq b$ we have $\tilde{B}_{ij}=0$.


Note that (2) at least implies that for a fixed pair of $i\neq j$, at least one of the blocks $\tilde{B}_{ij}$ and $\tilde{B}_{ji}$ is necessarily zero. I don't know now how to show that they are both zero, but maybe the assumption that $B$ is diagonalizable as well could help.
Also, the assumption that both $A$ and $B$ are diagonalizable seems reasonable. In fact, it is also required to prove that if $A$ and $B$ commute then $A$ and $B$ are simultaneously diagonalizable.
A: EDIT. Of course, the required result is absolutely false! In what follows, I give a way to prove that $A,B$ are simultaneously triangularizable.
If $AB-BA=\lambda{A}+\mu B$ then put $F=(1/\mu)A,G=\mu(\lambda{A}+\mu {B})$.
Thus $FG-GF=G$ and we may assume $AB-BA=A$.
Method 1. We consider the Lie algebra $\mathcal{A}$  (with product $[U,V]=UV-VU$) spanned by $I,A,B$.
$[\mathcal{A}]=\mathrm{span}(I,A)$ as a vector space. $[[\mathcal{A}]]=\{0\}$.
Then, by the Lie theory, $\mathcal{A}$ is triangularizable.
Method 2. i) For every $k$, $A^kB-BA^k=kA^{k}$.
ii) $A$ is nilpotent.
iii) $\ker(A)$ is $B$-invariant.
iv) $A,B$ have a common eigenvector in $\ker(A)$.
v) Reason by recurrence.
