How to prove this rank inequality? 
Let $n\geq2$ and $A,B\in M_{n}(\mathbb{C})$ such that $B^2=B$. Prove that $$\mbox{ rank }(AB-BA)\leq\mbox{ rank }(AB+BA).$$

If $B$ is zero or the identity matrix, we are done. But $B$ will always be diagonalisable. From this, how we can proceed?
 A: Disclaimers: First of all, I will provide a simple explanation why $B$ is diagonalizable (for those who are interested to see how this can be justified) and then I will explain how one can get the full solution. However, at some point there are "miserable" and simple calculations, that should be done, and I omit them intentionally. I hope this won't be a problem.
$B$ is diagonalizable:
As you observed, $B$ is diagonalizable. Let's see how one can justify this. The minimal polynomial of $B$ should divide the polynomial $x^2-x$, which is vanished by $B$ (recall that the minimal polynomial of $B$ divides every polynomial that vanishes at $B$). Then, the minimal polynomial has only distinct roots (since possible minimal polynomials are $x,\ x-1$ and $x^2-x$) and this means that $B$ is diagonalizable.
The full solution:
Now let's move on to what you need to see in this answer. There exists an invertible matrix $U$ such that $B=UDU^{-1},$ where $D$ is the diagonal matrix with $1$'s at the first diagonal entries (if $1$ is eigenvalue of $B$) and $0$'s at the rest of them (if $0$ is eigenvalue of $B$). Since rank is invariant for similar matrices, we have that
$$\mbox{rank}(AB-BA)=\mbox{rank}(U(AB-BA)U^{-1})=\mbox{rank}(CD-DC)\\
\mbox{rank}(AB+BA)=\mbox{rank}(U(AB+BA)U^{-1})=\mbox{rank}(CD+DC),$$
where $C=UAU^{-1}.$ Thus, we only need to prove that
$$\mbox{rank}(CD-DC)\leq \mbox{rank}(CD+DC)$$
for any $C\in M_n(\mathbb{C}).$ Now write $C=(c_{ij})_{1\leq i,j\leq n}$ and compute the matrices $CD-DC$ and $CD+DC.$ Doing so (and it's extremely easy, because $D$ is a diagonal matrix), you will find that $CD-DC$ and $CD+DC$ are equal to $2\times 2$ block matrices (the blocks are not necessarily square blocks), where the matrices at the blocks $(1,2)$ of $CD-DC$ and $CD+DC$ are opposite, the matrices at the blocks $(2,1)$ and $(2,2)$ are equal (equal matrices at the blocks $(2,1)$ in $CD-DC$ and $CD+DC$ and equal matrices at the $(2,2)$ blocks of those too), while the matrix at the block $(1,1)$ of $CD-DC$ is a zero matrix. Moreover, the $(2,2)$ blocks are the zero matrices. Finding that, it is very easy to prove that whenever $k\in \{1,\ldots,n\}$ rows of $CD-DC$ are linearly independent, the same rows of $CD+DC$ will also be linearly independent (for this we can deduce linear independency by using the definition, which says that the rows $u_1,\ldots ,u_k$ are linearly independent iff ${\lambda}_1u_1+\cdots+{\lambda}_ku_k=0$ implies ${\lambda}_1=\cdots ={\lambda}_n=0$). Of course, the rank of the matrix is equal to the number of its linearly independent rows. Consequently, the aforementioned observation implies that
$$\mbox{rank}(CD-DC)\leq \mbox{rank}(CD+DC)$$
and we are done. 
