Transformation of a matrix to its block diagonal form

68 Views Asked by At

I'm trying to perform a unitary transformation $U^{\dagger}MU = M_{B}$, where $M$ is the Hermitian matrix $$ M= \begin{bmatrix} m_{1}&0&m_{2}&0\\ 0&m_{3}&0&m_{4}\\ m_{2}^{\ast}&0&m_{5}&0\\ 0&m_{4}^{\ast}&0&m_{6}\\ \end{bmatrix} $$ and $M_{B}$ is its block diagonal form after the unitary transformation, is this possible? and if so what is the form of the operator $U$ or how do I go about finding it? Thanks

1

There are 1 best solutions below

0
On

Use the permutation matrix that switches the 2nd and 3rd columns. For example, using SymPy,

>>> from sympy import *
>>> M = Matrix([[ 11,  0, 13,  0],
                [  0, 22,  0, 24],
                [ 31,  0, 33,  0],
                [  0, 42,  0, 44]])
>>> P = Matrix([[1,0,0,0],
                [0,0,1,0],
                [0,1,0,0],
                [0,0,0,1]])
>>> P.T * M * P
Matrix([[11, 13,  0,  0],
        [31, 33,  0,  0],
        [ 0,  0, 22, 24],
        [ 0,  0, 42, 44]])