First time here? Check out the FAQ!

Ask Your Question
1

Permutation similar matrices

asked 8 years ago

Deepak Sarma gravatar image

How to generate the class of all permutation similar matrices of a given square matrix?

Preview: (hide)

Comments

If the answer below worked for you, you can click the checkmark to its left to accept the answer.

fidbc gravatar imagefidbc ( 8 years ago )

1 Answer

Sort by » oldest newest most voted
3

answered 8 years ago

Sébastien gravatar image
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]
]
Preview: (hide)
link

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 8 years ago

Seen: 1,370 times

Last updated: Feb 16 '17