Matrices with special spectral property

asked 2023-06-16 15:57:41 +0100

anonymous user

Anonymous

updated 2023-06-16 21:36:11 +0100

Max Alekseyev gravatar image

```

 M = MatrixSpace(ZZ,4,4)
 for A in M:
     if A.determinant()!=0:
        p=A.eigenvalues()
        o=list(p)
        for e in o:
            X = Set([1,2,3,4])
            for i,j in X:
                if e[i]*e[j]==1:
                    print(A)

I am trying to find those 4 by 4 nonsingular integer matrices which satisfy the following property: Suppose that if $\lambda$ is an eigenvalue of $A$ iff $\frac{1}{\lambda}$ is also an eigenvalue of $A$ with the same multiplicity as that of $\lambda$. How to obtain that class of matrices?

edit retag flag offensive close merge delete

Comments

First, you cannot do for A in M since M is infinite and the loop will never end. Second, the property you describe can be restated as the characteristic polynomial being palindromic or antipalindromic, which can be tested as follows:

f = A.charpoly()
if f.reverse()==f or f.reverse()==-f:
    ...

Third, it's unclear what you mean under "to obtain that class of matrices" since such a class is an infinite object.

Max Alekseyev gravatar imageMax Alekseyev ( 2023-06-16 21:34:59 +0100 )edit