| 1 | initial version |
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
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.