Projection Matrixes, $A,B$ such that $\text{Id} - (A+B)$ is invertible This question was on an old qual exam and I have been stuck on it:
Let $A,B$ be two real $5x5$ matrices such that $A^2=A , B^2 = B$ and $\text{Id} - (A+B)$ is invertible. Show  Rank($A$)=Rank($B$).
My biggest question is why is $A,B$ being $5x5$ needed? I don't see why this wouldn't generalize to any square matrix with the above properties.
I have tried to use that $\mathbb{R}^5 = \text{Im}(A)\bigoplus\text{Ker}(A)$ and similarly for $B$ and tried to show nullity(A) = nullity(B) to no avail. I believe the strongest assumption given is that $\text{Id} - (A+B)$ is invertible, but I am unsure how to use this to prove Rank($A$) = Rank($B$). 

You don't need $5\times 5$, $n\times n$ works.
You also don't need $\Bbb R$, any field will work.
As you say, consider $\Bbb R^n=\text{im}\,A+\ker A$.
On $\text{im}\, A$, $I-A$ vanishes, so for $I-A-B$ to be invertible,
$B$ must be injective on $\text{im}\, A$. Therefore $\text{rank}\,B\ge\dim
\text{im}\,A=\text{rank}\,A$.
