# Show if $A^2 = A$ then $\textrm{rank}(A) + \textrm{rank}(A - I) = n$

suppose $$n \in \mathbb{N}$$ and $$A$$ is a $$n \times n$$ idempotent matrix, meaning $$A^2 = A$$.

show that:

$$\textrm{rank}(A) + \textrm{rank}(A - I) = n$$

I think we should first use rank-nullity theorem: $$\textrm{rank}(A) + \textrm{dim}(\textrm{null}(A)) = n$$

then show that: $$\textrm{dim}(\textrm{null}(A)) = \textrm{rank}(A - I)$$

but I don't know how to show the second phrase.

Since $$A(A-I) = 0$$, the eigenvalues of $$A$$ are $$0,1$$, and the matrix is diagonalizable. The rank of $$A$$ is the number of non-zero eigenvalues, which is the multiplicity of the eigenvalue $$1$$. Similarly, the rank of $$A-I$$ is the number of eigenvalues different from $$1$$, which is the multiplicity of the eigenvalue $$0$$. The sum of these multiplicities must be $$n$$.

• If $M=\left[\begin{smallmatrix}0&1\\0&0\end{smallmatrix}\right]$, then $\operatorname{rank}M=1$. However, $M$ has no non-zero eigenvalues. Oct 31, 2021 at 22:55
• Fortunately, in our case the matrix is diagonalizable, so this problem is avoided. Oct 31, 2021 at 22:57
• Yes, I know that. But you did not mention it in your answer. Oct 31, 2021 at 22:59
• No. I am calling your attention to the fact that your answer is incomplete. Oct 31, 2021 at 23:01
• The converse is also true. For any matrix A if rank A + rank (A-I)=n, then A is idempotent, where A is n by n. Nov 1, 2021 at 8:08

It can be shown that $$F^n\cong \text{im}(A)\oplus\text{im}(I-A)$$ (where $$F$$ is the base field, and $$\text{im}$$ stands for image.) Then the rank property folows directly.

To show this for any $$v\in F^n$$, $$v = A(v) + (I-A)(v)$$, hence $$F^n\cong \text{im}(A)+\text{im}(I-A)$$. Now it's enough to show the two images have trivial interection.

If $$A(x) = (I-A)y$$, then apply $$A$$ to both sides, $$A^2(x) = A(I-A)y$$, $$A(x) = (A-A^2)y = (A-A)y = \vec 0$$.

We can also show the second phrase directly. It's enough to show that $$\text{im }(I-A)=\ker A$$. Indeed, if $$x = (I-A)y\in\text{im }(I-A)$$, then $$A(x) = A(I-A)(y) = 0$$, so $$x\in\ker A$$. If $$x\in \ker A$$, then $$(I-A)(x) = Ix-Ax = x$$, hence $$x\in\text{im }(I-A)$$.

If $$v\in Range(I-A)$$, $$v=(I-A)w$$, then $$Av=A(I-A)w=0$$ so $$Range(I-A)\subseteq Null(A)$$. Conversely if $$v\in Null(A), Av=0$$ then $$(I-A)v=v$$ and $$v\in Range(I-A)$$. Thus $$Range(I-A)=Null(A)$$. Hence $$rank(I-A)=dim(Range(I-A))=dim(Null(A))=nul(A).$$