How to represent a product of cycles in matrix form?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
3
down vote

favorite












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 = beginpmatrix1&2&3&4&5&6&7&8&9&10&11\9&11&7&8&10&2&1&5&3&4&6
endpmatrix$



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?










share|improve this question







New contributor




Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.























    up vote
    3
    down vote

    favorite












    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 = beginpmatrix1&2&3&4&5&6&7&8&9&10&11\9&11&7&8&10&2&1&5&3&4&6
    endpmatrix$



    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?










    share|improve this question







    New contributor




    Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.





















      up vote
      3
      down vote

      favorite









      up vote
      3
      down vote

      favorite











      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 = beginpmatrix1&2&3&4&5&6&7&8&9&10&11\9&11&7&8&10&2&1&5&3&4&6
      endpmatrix$



      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?










      share|improve this question







      New contributor




      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      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 = beginpmatrix1&2&3&4&5&6&7&8&9&10&11\9&11&7&8&10&2&1&5&3&4&6
      endpmatrix$



      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?







      permutation group-theory products






      share|improve this question







      New contributor




      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 51 mins ago









      Heisenberg

      1162




      1162




      New contributor




      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Heisenberg is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.




















          2 Answers
          2






          active

          oldest

          votes

















          up vote
          3
          down vote













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



          $ left(
          beginarrayccccccccccc
          1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
          9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \
          endarray
          right)$







          share|improve this answer



























            up vote
            2
            down vote













            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


            enter image description here






            share|improve this answer




















              Your Answer




              StackExchange.ifUsing("editor", function ()
              return StackExchange.using("mathjaxEditing", function ()
              StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix)
              StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
              );
              );
              , "mathjax-editing");

              StackExchange.ready(function()
              var channelOptions =
              tags: "".split(" "),
              id: "387"
              ;
              initTagRenderer("".split(" "), "".split(" "), channelOptions);

              StackExchange.using("externalEditor", function()
              // Have to fire editor after snippets, if snippets enabled
              if (StackExchange.settings.snippets.snippetsEnabled)
              StackExchange.using("snippets", function()
              createEditor();
              );

              else
              createEditor();

              );

              function createEditor()
              StackExchange.prepareEditor(
              heartbeatType: 'answer',
              convertImagesToLinks: false,
              noModals: false,
              showLowRepImageUploadWarning: true,
              reputationToPostImages: null,
              bindNavPrevention: true,
              postfix: "",
              onDemand: true,
              discardSelector: ".discard-answer"
              ,immediatelyShowMarkdownHelp:true
              );



              );






              Heisenberg is a new contributor. Be nice, and check out our Code of Conduct.









               

              draft saved


              draft discarded


















              StackExchange.ready(
              function ()
              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182592%2fhow-to-represent-a-product-of-cycles-in-matrix-form%23new-answer', 'question_page');

              );

              Post as a guest






























              2 Answers
              2






              active

              oldest

              votes








              2 Answers
              2






              active

              oldest

              votes









              active

              oldest

              votes






              active

              oldest

              votes








              up vote
              3
              down vote













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



              $ left(
              beginarrayccccccccccc
              1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
              9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \
              endarray
              right)$







              share|improve this answer
























                up vote
                3
                down vote













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



                $ left(
                beginarrayccccccccccc
                1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
                9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \
                endarray
                right)$







                share|improve this answer






















                  up vote
                  3
                  down vote










                  up vote
                  3
                  down vote









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



                  $ left(
                  beginarrayccccccccccc
                  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
                  9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \
                  endarray
                  right)$







                  share|improve this answer












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



                  $ left(
                  beginarrayccccccccccc
                  1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 & 11 \
                  9 & 11 & 7 & 8 & 10 & 2 & 1 & 5 & 3 & 4 & 6 \
                  endarray
                  right)$








                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered 44 mins ago









                  kglr

                  162k8185385




                  162k8185385




















                      up vote
                      2
                      down vote













                      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


                      enter image description here






                      share|improve this answer
























                        up vote
                        2
                        down vote













                        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


                        enter image description here






                        share|improve this answer






















                          up vote
                          2
                          down vote










                          up vote
                          2
                          down vote









                          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


                          enter image description here






                          share|improve this answer












                          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


                          enter image description here







                          share|improve this answer












                          share|improve this answer



                          share|improve this answer










                          answered 32 mins ago









                          Carl Woll

                          58.4k275150




                          58.4k275150




















                              Heisenberg is a new contributor. Be nice, and check out our Code of Conduct.









                               

                              draft saved


                              draft discarded


















                              Heisenberg is a new contributor. Be nice, and check out our Code of Conduct.












                              Heisenberg is a new contributor. Be nice, and check out our Code of Conduct.











                              Heisenberg is a new contributor. Be nice, and check out our Code of Conduct.













                               


                              draft saved


                              draft discarded














                              StackExchange.ready(
                              function ()
                              StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmathematica.stackexchange.com%2fquestions%2f182592%2fhow-to-represent-a-product-of-cycles-in-matrix-form%23new-answer', 'question_page');

                              );

                              Post as a guest













































































                              Comments

                              Popular posts from this blog

                              What does second last employer means? [closed]

                              Installing NextGIS Connect into QGIS 3?

                              One-line joke