# Commuting block diagonal matrices

Suppose we have the $n \times n$ block matrix $$M = [M_{i,j}] = M_{1,1} \oplus \cdots \oplus M_{n,n}$$ such that each $M_{i,i}$ is also square and has exactly one eigenvalue $\lambda_i$ and $\lambda_i = \lambda_j \implies i=j$. I need to show that the only matrices which commute with $M$ are also block diagonal with the same block sizes as $M$.

My approach so far was to try and write out a general matrix $A$ in the same block form as $M$ and assume it commutes with $M$. Then compute the multiplication on the left and right and equate the blocks, with the goal of showing that all the non-diagonal blocks must be zero. I didn't make much progress with this approach.

Do you have any suggestions?

-
A special case of this (where $M$ is diagonal) appeared in a previous question. –  Jonas Meyer Feb 16 '12 at 1:12
I was assuming an algebraically closed field, so we don't have the possibility of things like $M_1=\begin{bmatrix}0&-1&0\\1&0&0\\0&0&1\end{bmatrix}$, which has exactly one eigenvalue over $\mathbb R$, but would have three eigenvalues over $\mathbb C$. Is that a safe assumption? –  Jonas Meyer Feb 16 '12 at 1:26
The question specifies that we are working in a field $F$, so we may not assume that it is algebraically closed. However, we are given that all the eigenvalues are in $F$, so this is sufficient, correct? –  nullUser Feb 16 '12 at 1:33
Yes, I would take that to mean that the characteristic polynomial of $M$ factors into linear factors in $F$, which is all we need. (With that added, there's no need to assume algebraically closed.) –  Jonas Meyer Feb 16 '12 at 1:47
Putting $A$ in block form $(A_{ij})$, commutativity means $M_iA_{ij}=A_{ij}M_j$ for all $i$ and $j$, and you want to show that $i\neq j$ implies $A_{ij}=0$. Note that $M_iA_{ij}=A_{ij}M_j$ implies $p(M_i)A_{ij}=A_{ij}p(M_j)$ for every polynomial $p$. In particular, there is an $n$ such that $(M_j-\lambda_j I)^n=0$, so $(M_i-\lambda_j I)^nA_{ij}=0$. Since $M_i-\lambda_j I$ is invertible (when $i\neq j$), this implies that $A_{ij}=0$.