For any $n$-by-$n$ complex matrix $M$, prove that
$$\operatorname{rank}(M) + \operatorname{rank}(M − M^3) = \operatorname{rank}(M − M^2) + \operatorname{rank}(M + M^2)$$
In this problem, I could not find an idea to approach this. Any hint/idea will be appreciated.
One approach is as follows. Denote $$ d_1 = \dim \text{Nul}(M)\\\\ d_2 = \dim \text{Nul}(M- I)\\ d_3 = \dim \text{Nul}(M + I)\\ $$ where $\text{Nul}(M)$ denotes the nullspace of $M$. Argue that $$ \text{rank}(M) = n - d_1\\ \text{rank}(M(M - I)) = n - d_1 - d_2\\ \text{rank}(M(M + I)) = n - d_1 - d_3\\ \text{rank}(M(M - I)(M + I)) = n - d_1 - d_2 - d_3. $$ From there, the conclusion follows.