General form of centralizer If we say $B = J_{a_1}(\lambda_1) \oplus J_{a_2}(\lambda_2) ... \oplus  J_{a_n}(\lambda_n)$ I am trying to find the general form of the centralizer of $B$. First when our lambdas are distinct but then also when they aren't and what the dimension is on each of the cases.
So I know B should be an $\sum a_i \times \sum a_i $ matrix with entries $\lambda_i$ on the diagonals but then I am not sure how to find the centralizer for each case?
I am not really sure how to start and if someone could point me in a good direction that would be appreciated.
 A: The result in terms of matrices is well-known among researchers. I have also seen it documented in an undergraduate textbook, but I cannot recall the book's title.
Suppose $B$ is the direct sum of $r$ Jordan forms $J_1,J_2,\ldots, J_r$, each with a different eigenvalue, and suppose each Jordan form $J_k$ has $b_k$ Jordan blocks  for the eigenvalue $\lambda_k$ of multiplicities $m_{k1}\ge m_{k2}\ge\cdots\ge m_{kb_k}$ respectively. That is, suppose
$$
B=\bigoplus_{k=1}^rJ_k=\bigoplus_{k=1}^r\underbrace{\left(J(\lambda_k;m_{k1})\oplus\cdots\oplus J(\lambda_k;m_{kb_k})\right)}_{J_k}\tag{1}
$$
where $J(\lambda;m)$ denotes an upper triangular Jordan block with an eigenvalue $\lambda$ of multiplicity $m$.
For example, in the $9\times9$ Jordan form $B$ below, we have $J_1=J(1;3)\oplus J(1;2)$ and $J_2=J(0;2)\oplus J(0;1)\oplus J(0;1)$.
$$
B=\left[\begin{array}{ccc|cc|cc|c|c}
1&1&0\\
0&1&1\\
0&0&1\\
\hline
&&&1&1\\
&&&0&1\\
\hline
&&&&&0&1\\
&&&&&0&0\\
\hline
&&&&&&&0\\
\hline
&&&&&&&&0
\end{array}\right].
$$
The equation $BA=AB$ thus reduces blockwise to equations of the form
$$
J(\lambda;m)X=XJ(\mu;n)
$$
for an $m\times n$ matrix $X$. Assume that $m\ge n$ (the case $n\le m$ can be treated similarly). By subtracting both sides by $\mu I$, we get $J(\lambda-\mu;m)X=XJ(0;n)$. When $\lambda\ne\mu$, we have $J(\lambda-\mu;m)^nX=XJ(0;n)^n=0$ and hence $X$ must be zero. When $\lambda=\mu$, we have $J(0;m)X=XJ(0;n)$. In particular, we obtain two equalities:
\begin{align}
x_{i+1,j+1}=e_i^TJ(0;m)Xe_{j+1}&=e_i^TXJ(0;n)e_{j+1}=x_{ij},\\
J(0;m)Xe_1&=XJ(0;n)e_1=0.\\
\end{align}
The first one means that $X$ is Toeplitz while the second one means that the up shift of the first column of $X$ is zero. It folows that all entries below the main diagonal of $X$ are zero, i.e. $X$ is an upper triangular Toeplitz matrix. Conversely, one may verify that every upper triangular Toeplitz matrix $X$ satisfies the equation $J(0;m)X=XJ(0;n)$.
Therefore, the solutions to $BA=AB$ has the general form $\bigoplus_{k=1}^rM_k$, where each $M_k$ has the same size as $J_k$, and, when it is partitioned in the same way as $J_k$ (so that the diagonal sub-blocks of $M_k$ has sizes $m_{k1},\ldots,m_{kb_k}$ respectively), its $(i,j)$-th sub-block is an upper triangular Toeplitz matrix in the form of
$$
M_{kij}=\begin{cases}
\pmatrix{T_{kij}\\ 0}&\text{when } m_{ki}>m_{kj},\\
T_{kij}&\text{when } m_{ki}=m_{kj},\\
\pmatrix{0&T_{kij}}&\text{when } m_{ki}<m_{kj},\\
\end{cases}\tag{2}
$$
where $T_{kij}$ denotes an upper triangular Toeplitz square matrix of size $\min(m_{ki},m_{kj})$.
For instance, the centralisers of our previous $9\times9$ example have the following general form:
$$
A=\left[\begin{array}{ccc|cc|cc|c|c}
a&b&c&d&e\\
0&a&b&0&d\\
0&0&a&0&0\\
\hline
0&f&g&h&l\\
0&0&f&0&h\\
\hline
&&&&&p&q&s&t\\
&&&&&0&p&0&0\\
\hline
&&&&&0&u&v&w\\
\hline
&&&&&0&x&y&z\\
\end{array}\right].
$$
With $(1)$ and $(2)$, the dimension of the centraliser subspace is given by
$$
\sum_{k=1}^r\sum_{i,j=1}^{b_k} \min (m_{ki}, m_{kj})
=\sum_{k=1}^r\sum_{i=1}^{b_k}(2i-1)m_{ki},
$$
which is equal to $(1\times3+3\times2)+(1\times2+3\times1+5\times1)=19$ in the above example.
A: I will use the language of modules.
A choice of linear operator $A$ on a vector space $V$ is equivalent to making $V$ a $\mathbb{C}[T]$-module, where $T$ acts by the operator $A$. Since $\mathbb{C}[T]$ is a PID, the fundamental theorem of finitely-generated modules over PIDs applies, so we can say $V$ is isomorphic as a $\mathbb{C}[T]$-module to a direct sum of cyclic submodules, and cyclic modules (by Chinese Remainder Theorem) are WLOG of the form $\mathbb{C}[T]/(T-\lambda)^d$. If we write the matrix for multiplication-by-$T$ on such a module with respect to the power basis $\{1,T,\cdots,T^{d-1}\}$ we get the $d\times d$ Jordan block associated to the generalized eigenvalue $\lambda$. The component containing all direct summands (or equivalently all cyclic submodules) with a given value of $\lambda$ forms the generalized eigenspace of $V$ associated to $\lambda$.
The centralizer of $A$ corresponds to finding the endomorphisms of $V$ as a $\mathbb{C}[T]$-module.
Note that $\hom$ is distributive, any element of $\hom(\bigoplus V_i,\bigoplus V_j)$ may be written as a matrix whose $ij$-entry is a homomorphism $V_i\to V_j$. Thus, to find the module endomorphisms of $V$, we simply need to determine all possible module homomorphisms $\mathbb{C}[T]/(T-\lambda)^d\to \mathbb{C}[T]/(T-\mu)^k$. Such a map is $T$-equivariant and its range is the cyclic submodule generated by the image of $1$. The only condition is that $1$ must be sent to an element annihilated by $(T-\lambda)^d$. Either $k\le d$ or this means $1$ is sent to something in the cyclic submodule $(T-\lambda)^{k-d}$ which has dimension $d$ within $(T-\lambda)^k$. Thus, the vector space of module homomorphisms is $\min\{d,k\}$ if $\lambda=\mu$, else $0$.
So if the Jordan blocks associated to $\lambda$ have sizes $d_1\ge d_2\ge\cdots\ge d_n$ then the dimension of the endomorphism algebra / centralizer is $\sum_{i,j}\min\{d_i,d_j\}$ which is the sum of terms in the array
$$ \begin{array}{cccc}
d_1 & d_2 & \cdots & d_n \\
d_2 & d_2 & \cdots & d_n \\
\vdots & \vdots & \ddots & \vdots \\
d_n & d_n & \cdots & d_n
 \end{array} $$
which equals $\sum_{j=1}^n (2j-1)d_j$.
In general, we take this sum for each generalized eigenvalue $\lambda$ and combine.
To describe the centralizer / endomorphism algebra as an algebra, first decompose it as a direct sum of subalgebras associated to each $\lambda$, then write elements of these subalgebras as matrices whose entries are elements of quotient modules $(T-\lambda)^{k-d}/(T-\lambda)^k$ (interpreting $k-d$ as $0$ if $k\le d$) for the various choices of $d$ and $k$.
Here is an example. Consider a matrix with Jordan decomposition
$$ \color{Red}{J_1(0)\oplus J_1(0)\oplus J_2(0)}\oplus \color{Green}{J_3(i)\oplus J_4(i)} \oplus \color{Blue}{J_5(\omega)} $$

*

*Associated to $\color{Red}{\lambda=0}$ is $2\ge1\ge1$ with sum $\sum_{j=1}^3 (2j-1)d_j=(1)2+(3)1+(5)1=\color{Red}{10}$.

*Associated to $\color{Green}{\lambda=i}$ is $4\ge3$ with sum $\sum_{j=1}^2(2j-1)d_j= (1)4+(3)3=\color{Green}{13}$.

*Associated to $\color{Blue}{\lambda=\omega}$ is $5$ with sum $\sum_{j=1}^1 (2j-1)d_j=(1)5=\color{Blue}{5}$.

Thus the full centralizer has dimension $\color{Red}{10}+\color{Green}{13}+\color{Blue}{5}=28$.
