Let $A$ and $B$ be $n \times n$ real matrices such that $AB=BA=0$ and $A+B$ is invertible I came across the following problem that says:

Let $A$ and $B$ be $n \times n$ real matrices such that $AB=BA=0$ and $A+B$ is invertible.  Then how can I prove the following:

*

*rank $A$+ rank $B$= $n$


*nullity $A$ + nullity $B$ =$n$


*$A-B$ is invertible.

Can someone point me in the right direction? Thanks in advance for your time.
 A: $BA = 0$ implies that the nullity of $B \geq$ the rank of $A$.
$AB = 0$ implies that the nullity of $A \geq$ the rank of $B$.
$$ n(B) \geq r(A)$$
$$ n(A) \geq r(B)$$
$$ n(A) + r(A) + n(B) + r(B) = 2n$$
The final piece of the puzzle is that $A + B$ is invertible, this means that $r(A) + r(B) \geq n$ since we can't add two sets of vectors together and produce more linearly independent vectors than the sum of the rank of the two sets.  The only conclusion is that $r(A) + r(B) = n$ and $n(A) + n(B) = n$.
To see that $A-B$ is invertible, $(A - B)^2 = A^2 + B^2 = (A + B)^2$ 
A: $\operatorname{rank}(AB) \geq \operatorname{rank} A+\operatorname{rank} B-n$ as $AB=0$ rank of $AB=0$
$$0 \geq \operatorname{rank} A+\operatorname{rank} B-n=0$$
A: (A)Show $\operatorname{rank}(A) + \operatorname{rank}(B) \ge \operatorname{rank}(A+B)$
$$Rank(A+B)\leq Rank (A)+Rank (B)$$
$$Rank(AB) \ge Rank(A)+Rank(b)-n$$
$$Rank(A+B)=n$$
Using these three results,
$$Rank(A)+Rank(B)=n$$
(B) using the Rank-Nullity Theorem, we can easily prove.
(C)using this, $(A-B)^2=A^2+B^2=(A+B)^2$
A: *

*First $AB=0$ means $\mbox{Im}B\subseteq \mbox{Ker}A$, hence $\mbox{rank}B\leq \mbox{null} A=n-\mbox{rank} A$. Now $\mathbb{R}^n=\mbox{Im}(A+B)\subseteq \mbox{Im}A+\mbox{Im}B$, hence $n\leq \mbox{rank}A+\mbox{rank}B\leq \mbox{rank}A+n-\mbox{rank} A=n$. So $\mbox{rank}A+\mbox{rank}B=n$.

*Rank-nullity theorem on $A$ and on $B$.

*Observe that $(A-B)^2=A^2+B^2=(A+B)^2$.
Note: we only need $AB=0$ to obtain 1 and 2.
A: Honestly, the asked conclusion is of no interest. A better writing would have been
Proposition. Let $A,B\in M_n(\mathbb{C})$ s.t. $AB=BA=0$ and $A+B$ is invertible.
Show that $A,B$ are simultaneously similar to
$A'=\begin{pmatrix}0_p&0\\0&U_{n-p}\end{pmatrix},B'=\begin{pmatrix}V_p&0\\0&0_{n-p}\end{pmatrix}$, where $U,V$ are invertible.
Proof. According to previous answers, we know that $rank(A)+rank(B)=n  $. Then $Im(B)= \ker(A),Im(A)=\ker(B)$. Let $x\in \ker(A)\cap \ker(B)$; then $(A+B)x=0$ and therefore, $x=0$. According to the dimensions $p,n-p$ of the considered subspaces, $\mathbb{C}^n=\ker(A)\bigoplus\ker(B)$.
Considering an associated basis, we deduce that $A,B$ are simultaneously similar to
$A'=\begin{pmatrix}0_p&0\\0&U_{n-p}\end{pmatrix},B'=\begin{pmatrix}V_p&0\\0&0_{n-p}\end{pmatrix}$, where $U,V$ are invertible.
