A problem about a rank's inequality of a complex matrix Let $X,Y \in M_{n\times n}(\mathbb{C})$ such that $X^{2}=Y^{2}=I_{n}$. Prove that
$$\operatorname{rank}((X+I_n)(Y-I_n))+\operatorname{rank}((X-I_n)(Y+I_n))=\operatorname{rank}(X-Y)$$
My approach: Using the well-known inequality: $\operatorname{rank}(X)+\operatorname{rank}(Y)\geq \operatorname{rank}(X+Y)$, we can see that $$\operatorname{rank}(X-Y)=\operatorname{rank}(X-XY+XY-Y)\leq \operatorname{rank}(X-XY)+\operatorname{rank}(XY-Y)$$
but, how can I continue from here?
 A: As $X$ and $Y$ are involutions we have that
$$
P_x=\frac12(X+I)\qquad\text{and}\qquad P_y=\frac12(Y+I)
$$
are idempotent (projections). It is straightforward to see that the rank identity is equivalent to
$$
\operatorname{rank} P_x(I-P_y)+\operatorname{rank}(I-P_x)P_y=\operatorname{rank}(P_x-P_y)
$$
which follows easily from the fact that
$$
P_x-P_y=P_x(I-P_y)-(I-P_x)P_y
$$
together with the standard result that the images of $P_x$ and $I-P_x$ are complementary.
A: You can show one of the inequalities using your approach, by adding and subtracting $XY$ and $I$ in your expression. For the other inequality to achieve equality is trickier. So I will approach it in a different manner. We will show instead the direct sum decomposition of their images:
$$Im(X-Y) = Im(X+I)(Y-I) \oplus Im(X-I)(Y+I),$$
which implies $rank(X-Y) = rank(X+I)(Y-I) + rank(X-I)(Y+I)$.
To show this direct sum decomposition, we show the sum spaces are equal with trivial intersection.
Part 1: $Im(X-Y) \subset Im(X+I)(Y-I) + Im(X-I)(Y+I).$
Indeed, any vector in $Im(X-Y)$ is of the form $(X-Y)v$ for some $v\in \bf C^n$. Note
$$ (X-Y)v = (XY + Y - X -I)(v/2) + (XY-Y+X-I)(-v/2)\\
=(X+I)(Y-I)(v/2) + (X-I)(Y+I)(-v/2)\\
\in Im(X+I)(Y-I) + Im(X-I)(Y+I).$$
Part 2: $Im(X-Y) \supset Im(X+I)(Y-I) + Im(X-I)(Y+I).$
Indeed, an element in $Im(X+I)(Y-I) + Im(X-I)(Y+I)$ is of the form $(X+I)(Y-I)v + (X-I)(Y+I)w$ for some $v,w\in \bf C^n$. Next, we use the fact that $Y^2 = I$, so
$$(X+I)(Y-I)v + (X-I)(Y+I)w \\ 
=(XY-X+Y-{\color{blue} I})v +(XY +X -Y -{\color{blue} I})w\\
= (XY-{\color{blue} Y^2} -(X-Y))v + (XY - {\color{blue} Y^2} +(X-Y))w\\
= (X-Y)(Y-I)v + (X-Y)(Y+I)w\\
= (X-Y)[(Y-I)v+(Y+I)w]\\
\in Im(X-Y).$$
Part 3: $Im(X+I)(Y-I) \cap Im(X-I)(Y+I) =(0)$.
Suppose $z$ is in the intersection, so we have $z=(X+I)(Y-I)v = (X-I)(Y+I)w$ for some $v,w$. Then multiply $(X-I)$ from the left to both sides, giving
$$(X-I)(X+I)(Y-I)v = (X-I)(X-I)(Y+I)w \\
\implies (X^2 -I)(Y-I)v = (X-I)^2(Y+I)w\\
\implies 0 = (X-I)^2(Y+I)w
$$ since $X^2 = I$. But
$$(X-I)^2(Y+I)w = (X^2 -2X+I)(Y+I)w \\
 =(2I-2X)(Y+I)w = -2(X-I)(Y+I)w = 0 $$
so $(X-I)(Y+I)w= z=0$. Hence the intersection is trivial.
