permutation matrix to permutation groups element
Hello:
How to convert a permutation matrix into a permutation groups element ?
Thanks!
add a comment
Hello:
How to convert a permutation matrix into a permutation groups element ?
Thanks!
You just have to find the position of 1
in each column:
sage: M = matrix([[1, 0, 0],[0, 0, 1],[0, 1, 0]])
sage: sigma = Permutation([list(v).index(1)+1 for v in M.columns()])
sage: sigma
[1, 3, 2]
sage: sigma.to_matrix() == M
True
Please start posting anonymously - your entry will be published after you log in or create a new account.
Asked: 2020-06-22 05:14:16 +0100
Seen: 319 times
Last updated: Jun 22 '20