# How to represent a product of cycles in matrix form?

I have a permutation a in a product of disjoint cycles form as follows

$$a = {{(1,9,3,7)(2,11,6)(4,8,5,10)}}$$

I want to represent it in a matrix form A such that

$$A = \begin{pmatrix}1&2&3&4&5&6&7&8&9&10&11\\9&11&7&8&10&2&1&5&3&4&6 \end{pmatrix}$$

I believe a can be defined in Mathematica as

a = Cycles[{{1, 9, 3, 7}, {2, 11, 6}, {4, 8, 5, 10}}]


How do I convert a to A?

mat = {Sort @ #, #} & @ PermutationList[a];
MatrixForm @ mat // TeXForm


$$\left( \begin{array}{ccccccccccc} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \\ 9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \\ \end{array} \right)$$

One idea is to overload MatrixForm so that it does this for you automatically:

Unprotect[MatrixForm];
MatrixForm /: MakeBoxes[MatrixForm[cyc_Cycles], StandardForm] := With[
{list=PermutationList[cyc]},
ToBoxes[MatrixForm[{Range@Length@list, list}], StandardForm]
]
Protect[MatrixForm];


Then:

Cycles[{{1, 9, 3, 7}, {2, 11, 6}, {4, 8, 5, 10}}] //MatrixForm 