The determinant of a unitary matrix is 0

조회 수: 1 (최근 30일)
Runrun Xu
Runrun Xu 2021년 4월 18일
편집: Bruno Luong 2021년 4월 18일
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?

답변 (2개)

Matt J
Matt J 2021년 4월 18일
편집: Matt J 2021년 4월 18일
Matlab's det involves taking the product of long matrix diagonals. This can overflow or underflow very easily. The following might be a more stable determinant calculation than what det() does:
[H,~]=qr(rand(4000));
det(H)
ans = 0
Instead:
[L,U,P]=lu(H);
tridet=@(M) exp(sum(log(diag(M))));
Determinant=real(det(P)*tridet(L)*tridet(U))
Determinant = -1.0000

Matt J
Matt J 2021년 4월 18일
편집: Matt J 2021년 4월 18일
Determinant calculations for large matrices are numerically delicate (which is why they're often avoided). There are other/better ways you can verify the unitariness of H. Example,
[H,~]=qr(rand(4000));
det(H)
ans = 0
det(H.')
ans = 0
Instead, we can do:
min(H*H.'-eye(4000),[],'all')
ans = -9.9920e-16
max(H*H.'-eye(4000),[],'all')
ans = 1.1102e-15
  댓글 수: 3
Paul
Paul 2021년 4월 18일
I understand that prod(svd(A)) = abs(det(A)). How can sign(det(A)) be determined? Or am I on the wrong track altogether with using SVD to compute DET?
Bruno Luong
Bruno Luong 2021년 4월 18일
편집: Bruno Luong 2021년 4월 18일
One can compute the seterminant of U and V. See my answer in this thread (I also the one who asks the question and you have participated actively).
Second method! In could imagin within SVD calculation (usually based on qr-algorithm ast some step) the determinant of U and V can be computed internally. It is just need to be reported back. TMW don't want to investigate such

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by