I was trying the calculate the determinant of the eigenvector matrix (let me call it U) of a Hermitian matrix (a Hamiltonian matrix H in a physical problem). As U should be a unitary matrix, its determinant should have modulus 1.
When I was doing the numerical calculation, I noticed that when the system size (or the size of the Hamiltonian matrix H) is relatively small, I get the correct value of det(U), however, when I enlarge the system size (e.g., H is of the order ), I found that matlab gives me . However, when I try det(U.'), it gives me 1.
So I just wonder what could be the reason for this strange result (issue) and how can I resolve it?