Let $A$ and $B$ be two $n\times n $ real matrices, satisfying $A^2=A,\,\, B^2=B$. Suppose $A+B-I$ is invertible. Show that $\operatorname{rank}(A)=\operatorname{rank}(B)$.
Since $ A^2=A,\,\, B^2=B$ we see that $A$, $B$ are either singular matrices or matrices with determinant $1$.
Any ideas on how to proceed from here?
If $A^2=A$ we have that the minimum polynomial of $A$ has distinct roots and so $A$ is diagonalizable and its only eigenvalues are $1$ and $0$.
We conclude the geometric multiplicities of eigenvalues $1$ and $0$ add $n$.
So if we suppose $\dim(\ker(A)) < \dim(\ker(B))$ we conclude the eigenspace of $1$ of $A$ and the kernel of $B$ intersect non-trivially.
Any such non-zero vector in this intersection is an eigenvector for the eigenvalue $1$ of $A+B$. Or equivalently, is in the kernel of $A+B-I$.