Let us consider requirements for commutativity of matrices in terms of the Jordan Normal Form, Say we have two matrices $\bf A$ and $\bf B$. Then ${\bf A} = {\bf S}^{-1}{\bf JS}$, where $\bf J$ can be written in block matrix form:
$${\bf J} = \left[ \begin{array}{ccccc} {\bf \Lambda_1} & \bf 0 & \cdots & \bf 0 & \bf 0 \\ \bf 0 & \bf \Lambda_2 & \cdots &\bf 0 & \bf 0\\ \bf 0&\bf 0 &\bf \ddots & \bf 0 & \bf 0 \\ \bf 0&\bf 0&\cdots&\bf \Lambda_{n-1}& \bf0\\ \bf 0 &\bf 0&\cdots& \bf 0 & \bf\Lambda_n \end{array}\right] $$
where $$ {\bf \Lambda_k} = \left[ \begin{array}{ccccc} {\bf \Lambda_{k,1}} & \bf 0 & \cdots & \bf 0 & \bf 0 \\ \bf 0 & \bf \Lambda_{k,2} & \cdots &\bf 0 & \bf 0\\ \bf 0&\bf 0 &\bf \ddots & \bf 0 & \bf 0 \\ \bf 0&\bf 0&\cdots&\bf \Lambda_{k,m-1}& \bf0\\ \bf 0 &\bf 0&\cdots& \bf 0 & \bf\Lambda_{k,m} \end{array}\right] $$
where each $$ {\bf \Lambda_{k,l}} = \left[ \begin{array}{cccc} {\lambda_{k}} & 1 & 0 & 0 \\ 0 & \lambda_{k} & \ddots & 0 \\ 0& 0& \ddots & 1 \\ 0& 0&0& \lambda_k \end{array}\right]$$ where the matrix size may be individual for each $l$.
Let us now assume that we can write $\bf B = S^{-1}J_BS$. For which $\bf J_B$ will this commute? Any necessary or sufficient conditions?
Clarification: I did not intend $\bf J_B$ to be a Jordan matrix like $\bf J$ above. Are there any other types of matrices for which it could work? What could we say about such a matrix? Does it need to have any specific type of block structure?