Macaulay2 » Documentation
Packages » Permutations :: matrix(Permutation)
next | previous | forward | backward | up | index | toc

matrix(Permutation) -- computes the matrix representation of a permutation

Description

Every permutation $p$ on $n$ symbols can be written as an $n \times n$ matrix. Its matrix representation has a $1$ in entry $(i,j)$ if $p(i) = j$ and $0$ otherwise.

i1 : p = permutation {3,1,2,5,4}

o1 = Permutation{3, 1, 2, 5, 4}

o1 : Permutation
i2 : matrix p

o2 = | 0 1 0 0 0 |
     | 0 0 1 0 0 |
     | 1 0 0 0 0 |
     | 0 0 0 0 1 |
     | 0 0 0 1 0 |

              5       5
o2 : Matrix ZZ  <-- ZZ

See also

Ways to use this method:


The source of this document is in Permutations/Documentation/mainDocs.m2:518:0.