# Matrices that commute with all matrices [duplicate]

Let $Z_n$ be the set of all $n \times n$ matrices that commute with all $n \times n$ matrices. Show that $$Z_n = \{\lambda I_n \ | \ \lambda \in \mathbb R\}$$

($I_n$ is the $n \times n$ identity matrix)

I don't know how to use $E_{ij}$ (matrix with $1$ in $(i,j)$ and $0$ elsewhere) and the elementary matrix $P_{ij}$ to prove this question. Can anyone explain it please?

## marked as duplicate by Giuseppe Negro, Algebraic Pavel, rschwieb, Davide Giraudo, Marc van Leeuwen linear-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Jan 26 '15 at 11:27

Notice that

$$E_{ij}E_{kl}=\delta_{jk}E_{il}$$ so if a matrix $$A=\sum_{1\le k,l\le n}a_{kl}E_{kl}$$ commutes with the all the matrices then it commutes with $E_{ij}$ hence we get

$$AE_{ij}=E_{ij}A\iff \sum_{k=1}^n a_{ki}E_{kj}=\sum_{l=1}^n a_{jl} E_{il}$$ so we see that

$$a_{ii}=a_{jj}=:\lambda\;\forall i,j\quad \text{and} \quad a_{ki}=0\;\forall k\ne i$$ hence $A=\lambda I_n$. Finally, it's trivial that $\lambda I_n$ does commute with all the matrices.

• Thanks! There's another part that i don't know how to prove. How can I show that all diagonal entries are equal? – hotterthanmath Jan 26 '15 at 11:26
• From the equality on the RHS of the equivalence and since $E_{ij}$ form a basis we see that only for $k=i$ and $l=j$ we may have a non zero term and that $a_{ii}=a_{jj}$ so all diagonal entries are equal. – user63181 Jan 26 '15 at 11:30

Hint: Compute $A E_{ij}$ and $E_{ij} A$. Force them to be equal.

• $i,j$ should be different. I want to add it. – Vim Jan 26 '15 at 11:04