I am getting a hard time while trying to prove the following inequality: If $A$ and $B$ are $n \times n$ matrices, then
$rank{(A + B)} \leq rank{(A)} + rank{(B)} - rank{(AB)}.$
I've tried a lot, but I can't insert the rank of $AB$ in the inequality (the others factors appears easily). I will appreciate any help. Thank you all!
When $AB=BA$, you can find a proof here: Proving $\text{rank}(A+B) \leq \text{rank}(A) + \text{rank}(B) - \text{rank}(AB)$ when $A,B$ commute
A counterexample for the non-commutative case is the following. Consider the matrices
$$ A=\left( \begin{array}{cc} 1 & 0 \\ 0 & 0 \end{array} \right)\quad \text{and} \quad % B=\left( \begin{array}{cc} 0 & 1 \\ 0 & 1 \end{array} \right). $$ Then, $$ A+B=\left( \begin{array}{cc} 1 & 1 \\ 0 & 1 \end{array} \right)\quad \text{and} \quad % AB=\left( \begin{array}{cc} 0 & 1 \\ 0 & 0 \end{array} \right). $$ Lastly, $$rank(A+B)=2>1=1+1-1 = rank(A)+rank(B)-rank(AB). $$