How can I generate random commuting hermitian matrices ?
EDIT: Another question: given a certain hermitian matrix, how can I generate a random hermitian matrix which commutes with it?
How can I generate random commuting hermitian matrices ?
EDIT: Another question: given a certain hermitian matrix, how can I generate a random hermitian matrix which commutes with it?
Take $m$ real diagonal matrices $D_m$ with $d_{kk}=\delta_{mk}$ and a unitary matrix $U\in \operatorname{U}(n)$. You'll get a set of $m$ commuting hermitian matrices by: $ H_m=U^\dagger \cdot D_m \cdot U. $
This is the maximal abelian subalgebra of the Lie algebra $\mathfrak{ u}(n)$. The centralizer of a maximal toral Lie subalgebra is called the Cartan subalgebra:
A Cartan subalgebra of the Lie algebra of $n×n$ matrices over a field is the algebra of all diagonal matrices.