SVD of symmetric complex matrix is giving an unexpected result.
조회 수: 7 (최근 30일)
이전 댓글 표시
Suppose I have a symmetric complex matrix A. My understanding is that the the right singular vectors of this matrix should be equal to the complex conjugate of the left singular vectors. However, when I perform the SVD this is not what I am finding. Any help?
clear; clc;
g = randn(5,1) + 1i*randn(5,1);
K = g*g.'; % rank-1 symmetric complex matrix
[U,S,V] = svd(K);
u1 = U(:,1); % left singular vector
v1 = V(:,1); % right singular vector
diff = u1 - conj(v1) % I expect this to be close to zero
댓글 수: 0
채택된 답변
Alfonso Nieto-Castanon
2015년 7월 28일
편집: Alfonso Nieto-Castanon
2015년 7월 28일
Well, yes, they are "equal" up to a constant pure-phase term, which is always arbitrary in SVD (for any left and right singular vectors u and v, u*exp(1i*phi) and v*exp(1i*phi) would solve the SVD problem just as well, i.e. U*S*V'==K with U,V unitary and S nonnegative diagonal).
In this case the following diffU will be approximately zero:
ph = angle(v1(1))+angle(u1(1));
diffU = u1 - conj(v1*exp(-1i*ph));
More generally, for a matrix K with rank>1:
g = randn(5)+1i*randn(5);
K = g*g.';
[U,S,V] = svd(K);
ph = angle(U(1,:))+angle(V(1,:));
V = V*diag(exp(-1i*ph));
diffU = U-conj(V);
will also be approximately zero.
댓글 수: 0
추가 답변 (1개)
John D'Errico
2015년 7월 27일
편집: John D'Errico
2015년 7월 27일
Your problem is that there is a difference between .' and ' as operators. I'm not sure why you chose to use .' there, but it was perhaps a poor choice. :)
댓글 수: 5
Walter Roberson
2015년 7월 28일
Sorry, linear algebra is a weakness of mine. I took the course 3 times and still have problems with it.
John D'Errico
2015년 7월 28일
편집: John D'Errico
2015년 7월 28일
Sigh. Choosing to use the wrong operator will make the result invalid. You can't just change operators randomly and expect mathematics to work.
For example, as long as a is finite and non-zero, we expect that a/a == 1.
However, would you also expect a*a == 1? Hey, I just swapped in a different operator. Whats the problem?
Your "understanding" about this result is simply wrong, IF you build K as you did, using the .' operator.
As I point out, IF you use K = g*g', then not surprisingly to me, you get the result that you claimed to have expected.
I think what you are both missing is that a complex symmetric matrix has the property that A==A', where ' is the ctranspose operator, thus the complex CONJUGATE transpose. You simply cannot use .' here when you form K. (People get used to working with real numbers, and then get sloppy about things like transposes.)
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!