Permutation matrices for symmetry group $O_h = S_4 \times C_2$

384 Views Asked by At

Does anyone know of a quick way to enumerate the permutation matrices for the symmetry group of the cube $O_h = S_4 \times C_2$? $O_h$ has $48$ elements; if we label the vertices of the cube $1,2,…,8$ then the permutation $$p= \left(\begin{array}{cccccccc} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 1 & 4 & 7 & 6 & 3 & 2 & 5 & 8\end{array} \right) $$ belongs to $O_h$ and the corresponding permutation matrix is $$M_p= \left(\begin{array}{cccccccc} 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{array} \right). $$ I'd like to be able to enumerate the set $\{M_p : p \in O_h\}$ quickly without having to draw out each matrix by hand. It would also be nice to be able to do it for the $n$-dimensional cube. Any help appreciated.

2

There are 2 best solutions below

2
On BEST ANSWER

Here is the code you can paste directly in GAP.

#change dim to any other value you want
dim:=8;;

#The identitymatrix (whose columns are going to be changed)
I:=IdentityMat(dim);;

#The def. of a function that assigns a matrix to a permutation g
mat:=function(g)
M:=List(I, i->Permuted(i,g));
return M;
end;;

#This is an example of how the function is used 
g:=(1,7)(2,5)(3,4)(6,8);
(1,7)(2,5)(3,4)(6,8)
M:=mat(g);;
Display(M);
[ [  0,  0,  0,  0,  0,  0,  1,  0 ],
  [  0,  0,  0,  0,  1,  0,  0,  0 ],
  [  0,  0,  0,  1,  0,  0,  0,  0 ],
  [  0,  0,  1,  0,  0,  0,  0,  0 ],
  [  0,  1,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  0,  0,  0,  1 ],
  [  1,  0,  0,  0,  0,  0,  0,  0 ],
  [  0,  0,  0,  0,  0,  1,  0,  0 ] ]
1
On

Have you noticed that for $p$ you considered , $M_p$ is formed by the rule that $i$th row in the matrix has $0$ everywhere except at $p(i)$ place. so write down all $48$ permutations, and that will give you all permutation matrices by this easy rule.

Cannot write all $48$ matrices,that you will have to do, but can give you one more example, say take $\sigma$= $(12)(34)$, your matrix

$M_{\sigma}= \left(\begin{array}{cccccccc} 0 & 1 & 0 & 0 & 0 & 0 & 0 & 0\\ 1 & 0 & 0 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 1 & 0 & 0 & 0 & 0\\ 0 & 0 & 1 & 0 & 0 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 1 & 0 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0\\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1\end{array} \right).$