TITLE: $AB-BA=A^k$, then $A$ is not invertible
QUESTION [8 upvotes]: Let $k\in\mathbb{N}$ and $A,B\in M_n(\mathbb{R})$ such that $AB-BA=A^k$. Show that $A$ is not invertible.
I can show the claim if $k=1$: Assume that $A$ is invertible. We have $AB=(I_n+B)A$, so $B=A^{-1}(I_n+B)A$. Taking the trace gives a contradiction. 
How can I proceed for the general case?

REPLY [4 votes]: Multiplying on left by $A$ we get
$$A^{k+1}=A^2B-ABA=A^2B-BA^2-A^{k+1}$$
which gives 
$$A^2B-BA^2=2A^{k+1}$$
and then we see by induction that
$$A^{p+1}B-BA^{p+1}=(p+1)A^{p+k}$$
Now assume that $A$ invertible and define the linear map $\varphi: M\mapsto MA^{-k+1}B-BA^{-k+1}M$ then
$$\varphi(A^{p+k})=(p+1)A^{p+k}, \forall p$$
which means that $\varphi$ has an infinite set of eigenvalues in finite dimensional space which is a contradiction.