1 | initial version |
sage: M = random_matrix(ZZ,3,3)
sage: M
[-2 0 -6]
[ 0 1 3]
[ 0 3 1]
sage: P = [matrix(p) for p in Permutations(3)]
sage: similar = [p*M*~p for p in P]
sage: similar
[
[-2 0 -6] [-2 -6 0] [ 1 0 3] [ 1 0 3] [ 1 3 0] [ 1 3 0]
[ 0 1 3] [ 0 1 3] [ 0 -2 -6] [-6 -2 0] [ 3 1 0] [ 3 1 0]
[ 0 3 1], [ 0 3 1], [ 3 0 1], [ 3 0 1], [ 0 -6 -2], [-6 0 -2]
]