# permutationMatrix(List) -- a permutation matrix generator

## Synopsis

• Function: permutationMatrix
• Usage:
permutationMatrix (permutation)
• Inputs:
• permutation, a list, a list of numbers from 0..n-1 that represents a permutation
• Outputs:
• , the matrix that represents the given permutation

## Description

 i1 : permutationMatrix {0,1,2} o1 = | 1 0 0 | | 0 1 0 | | 0 0 1 | 3 3 o1 : Matrix QQ <--- QQ i2 : permutationMatrix {1,0,2} o2 = | 0 1 0 | | 1 0 0 | | 0 0 1 | 3 3 o2 : Matrix QQ <--- QQ i3 : permutationMatrix {1,2,0} o3 = | 0 1 0 | | 0 0 1 | | 1 0 0 | 3 3 o3 : Matrix QQ <--- QQ