A matrix commuting with a diagonal matrix Let $A(z)=[a_{ij}(z)]$ be an invertible  $n\times n$ matrix where $a_{ij}(z)$ is entire function (i.e., analytic on all of the complex plane $\mathbb{C}$) for all $i,j=1,2,\dots, n$.
Let $D(z)$ be an $n\times n$ diagonal matrix with non distict (entire) entries $d_{ii}(z)$ $i=1,2,\dots, n$,  such that
$$A(z)D(z)=D(z)A(z)$$
What can we say about the matrix $A(z)$? Is there any characterization of such matrix in terms of $D$?
I know that if $D(z)$ is diagonal with distinct entries then $A(z)$ must be diagonal, but if it's not with "distinct entries" then $A(z)$ is not necessary diagonal.
I appreciate any help!
 A: Suppose $d_{ii}$ and $d_{jj}$ are two different functions, i.e. $d_{ii}(z)\ne d_{jj}(z)$ for some complex number $z$. By the identity theorem, the zero set $Z$ of $d_{ii}-d_{jj}$ must be isolated. Hence $S=\mathbb C\setminus Z$ has an accumulation point in $S$.
Since $A$ commutes with $D$ but $d_{ii}(z)\ne d_{jj}(z)$ on $S$, we must have $a_{ij}(z)=a_{ji}(z)=0$ on $S$. As $S$ has an accumulation point in itself, we must have $a_{ij}=a_{ji}=0$ on $\mathbb C$ by the identity theorem.
So, if we permute the rows and columns of $D$ so that $D=d_1I_{m_1}\oplus d_2I_{m_2}\oplus\cdots\oplus d_kI_{m_k}$ for some $k$ distinct entire functions $d_1,d_2,\ldots,d_k$, then $A=A_1\oplus A_2\oplus\cdots\oplus A_k$ where each $A_i$ is an $m_i\times m_i$ matrix whose entries are entire functions. In other words, this block-diagonal structure and the block sizes must remain unchanged on $\mathbb C$.
Since $A$ is invertible, each $A_i$s is invertible. However, I don't know how to characterize invertible matrices whose entries are entire functions.
