Let $n$ be a fixed integer greater than $2$. Find a pair $(A,B)\in M_n(\mathbb C)^2$ such that the rank of $AB-BA-I_n$ is $1$.
I'm not sure how to approach this. I tried to think of $A,B$ as matrices of linear operators on some $n$-dimensional vector space, but I don't even know what ideas I should use to find the corresponding operators.
Let $E_{i,j}$ denote the $n$-by-$n$ matrix with $0$ everywhere except one $1$ for the $(i,j)$-entry, where $i,j\in\{1,2,\ldots,n\}$. Set $$A:=\sum_{i=1}^{n-1}\,E_{i,n}\text{ and }B:=A^\top=\sum_{i=1}^{n-1}\,E_{n,i}\,.$$ Thus, $$A\,B=\sum_{i=1}^{n-1}\,E_{i,i}=I-E_{n,n}\text{ and }B\,A=(n-1)\,E_{n,n}\,.$$ Consequently, $$A\,B-B\,A-I=-n\,E_{n,n}\,.$$