# Show that the collection of matrices which commute with every idempotent matrix are the scalar matrices

Show that the collection of $n\times n$ real matrices which commute with every idempotent matrix are the scalar matrices .

Let $\mathcal P$ denote set of all idempotent matrices .

Let $A=\{B:BP=PB\forall P\in \mathcal P\}$.

So I need to show that $A=\{cI:c\in \Bbb R\}$.

I am feeling totally confused on this. Will you kindly give some hints here?

• Think of the idempotents as projections to subspaces, and use that commuting operators must preserve each others' eigenspaces. – freeRmodule Dec 11 '16 at 16:31

Let $B$ be a matrix commuting with every idempotent matrix. Fix any vector $u$, I claim that $u$ and $Bu$ cannot be both nonzero and linearly independent.
If they were, then we could take $P$ to send $Bu$ to $u$, and $u$ to itself. But then $$Bu = B(Pu) = P(Bu) = u,$$ contradicting that $u$ and $Bu$ were linearly independent.
This implies that $Bu = \lambda_u u$ for every $u \in \mathbb{R}^n$. I.e., every vector is an eigenvector of $B$.
Taking $u$ and $v$ to be any two linearly independent vectors, then $B(u + v) = \lambda_u u + \lambda_v v$ has to be a scalar multiple of $u + v$, and we conclude that $\lambda_u = \lambda_v$.
So there is a single scalar $\lambda$ such that $Bu = \lambda u$ for all $u$, which is what we wanted to show.