TITLE: Can $ABA-BAB=I$?
QUESTION [6 upvotes]: Let $A,B\in M_{n\times n} (\mathbb{C})$. Is it possible that $ABA-BAB=I$?

I came across this interesting problem as I was studying for an exam.  I guess in the case when $A$ and $B$ commute we have $A(A-B)B=I$ and I am not sure if it can happen.
Any ideas?

REPLY [7 votes]: Yes. Let
$$A_n = \mathrm{diag}\left(\frac{1}{2}(1 + \sqrt{5}), \dots, \frac{1}{2}(1 + \sqrt{5})\right)$$
and
$$B_n = \mathrm{diag}(1, \dots, 1).$$
This example will work for any $n$.
Edit: Now, for a general solution in the noncommutative case, combine my commutative general solution with Robert Israel's $2 \times 2$ noncommutative solution, taking the block diagonal matrices
$$\tilde{A}_n = \begin{pmatrix} A_{n-2} & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1 \end{pmatrix}$$
and
$$\tilde{B}_n = \begin{pmatrix} B_{n-2} & 0 & 0 \\ 0 & -\frac{1}{2} & 1 \\ 0 & -\frac{7}{2} & 3 \end{pmatrix}.$$