# 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).