How to find an example of a 6 by 6 symmetric matrix (which is not identity matrix and does not satisfy $A^2=\text{ Identity matrix}$) which is similar to its inverse?

How to find an example of a 6 by 6 symmetric matrix (which is not identity matrix and does not satisfy $A^2=\text{ Identity matrix}$)which is similar to its inverse? I am trying to find one such example in Sage. Please give some idea to proceed.

edit retag close merge delete

The identity matrix.

( 2020-03-24 21:56:06 +0200 )edit

Maybe you can compare the characteristic polynomial of a matrix with the one of its inverse and try to find when the two are equal?

( 2020-03-25 08:17:05 +0200 )edit

ok.can we have at least one such example?

( 2020-03-25 08:47:23 +0200 )edit

On the diagonal put pairs of numbers which are each other's inverse, like 2 and 1/2.

( 2020-03-25 09:13:09 +0200 )edit
3

Does this question have anything to do with SageMath?

( 2020-03-25 13:45:03 +0200 )edit

Sort by » oldest newest most voted

Let me describe three constructions of matrices which are similar to their inverses over Z. It has little to do with SageMath. That is rather linear algebra.

Construction 1: There are infinitely 2x2 matrices with integral coefficients that are similar over Z to their inverses

sage: A = matrix(2, [1,1,0,1])
sage: B = matrix(2, [1,0,1,1])
sage: P = matrix(2, [-1,0,0,1])
sage: C1 = A
sage: C2 = B
sage: C3 = A * B * A
sage: all(P * C * P**-1 == C**-1 for C in [C1, C2, C3])
True


You can just build your 6x6 matrix M as a block matrix

sage: M = matrix(ZZ, 6)
sage: M[0:2,0:2] = C1
sage: M[2:4,2:4] = C2
sage: M[4:6,4:6] = C3
sage: Q = matrix(ZZ, 6)
sage: Q[0:2,0:2] = Q[2:4,2:4] = Q[4:6,4:6] = P
sage: Q * M * Q**-1 == M**-1
True


Construction 2: The companion matrix of a symmetric polynomial

sage: x = polygen(ZZ, 'x')
sage: a = 13
sage: b = 25
sage: c = 18
sage: M = companion_matrix(X**6 + a*X**5 + b*X**4 + c*X**3 + b*X**2 + a*X + 1)
sage: S = SymmetricGroup(6)
sage: P = S('(1,6)(2,5)(3,4)').matrix()
sage: P * M * P**-1 == M**-1
True


Construction 3: Permutation matrices

sage: S = SymmetricGroup(6)
sage: M = S('(1,2,3,4)(5,6)').matrix()
sage: P = S('(1,4)(2,3)').matrix()
sage: P * M * P**-1 == M**-1
True

more

1

And once you found some matrix M satisfying P * M * P**-1 == M**-1 you may create lot more by doing:

sage: Q = random_matrix(ZZ,6,6)
sage: Mnew = Q * M * ~Q
sage: Pnew = Q * P * ~Q
sage: Pnew * Mnew * ~Pnew == ~Mnew
True

( 2020-03-26 08:32:13 +0200 )edit