# A rotation which switches two blocks of a matrix

I have a $$6\times6$$ matrix $$A$$ which I would like to transform using some unitary operator such that $$B=U^\dagger AU$$.

I would like to swap the elements of two sub-blocks of the matrix.

If the matrix starts in

$$A=\left(\matrix{&&&a&b&c\\&&&d&e&f\\&&&g&h&i\\a'&b'&c'&&&\\d'&e'&f'&&&\\g'&h'&i'&&&}\right)$$

I would like to transform it to $$A=\left(\matrix{&&&a'&b'&c'\\&&&d'&e'&f'\\&&&g'&h'&i'\\a&b&c&&&\\d&e&f&&&\\g&h&i&&&}\right)$$

Is there some unitary matrix that exists which performs this action?

Note that empty matrix elements must remain the same.

I think $$U = \begin{bmatrix} 0 & I \\ I & 0 \end{bmatrix}$$ should work where $$I$$ is a $$3\times 3$$ identity matrix (and $$0$$ a $$3\times 3$$ zero matrix).

EDIT: $$U$$ is a simple permutation matrix. If you left multiply a permutation matrix to some other matrix the rows will be permuted, if you right multiply it the columns will be permuted. So it is easy enough to find an $$U$$ that permutes the rows as desired and we're just left to check whether it also permutes the columns as desired. And permutation matrices are known to be orthogonal (and therefore unitary as they are real).

• @James I've added a short explanation. I originally basically solved it by just "looking at it" so I guess it is something that becomes easy with experience. – flawr Feb 22 at 16:29
• I'm not sure whether a permutation matrix will do the job, in specification diagonal submatrices must stay unchanged. Do they not change also their places with permutation? – Widawensen Feb 22 at 16:38
• I interpreted that differently: The emtpy elements are zero and have to stay zero. (At least that is what "empty" in matrices usually means.) – flawr Feb 22 at 16:44
• ok. In this case solution is accurate. – Widawensen Feb 22 at 16:44