Hi everyone,As we know, for a real symmetric matrix A, there exists a symmetrical singular value decomposition asA=USU',where U is an orthogonal matrix.But when I use the function svd to get the decompositionA=USV',the orthogonal matrix U and V may not equal.
[/size]For example,>> [u,s,v]=svd([1 5;5 2])u = -0.6710 -0.7415 -0.7415 0.6710s = 6.5249 0 0 3.5249v = -0.6710 0.7415 -0.7415 -0.6710We see that u~=v, but the symmetrical actually exists.>> [v,d]=eig([1 5;5 2])v = -0.7415 0.6710 0.6710 0.7415d = -3.5249 0 0 6.5249and >> v*d*v'ans = 1.0000 5.0000 5.0000 2.0000If I use eig instead of svd, it could not guarantee the orthogonality of the eigenvectors when some eigenvalues are equal.Then how I can get the symmetrical decomposition for a real symmetrical matrixA=U*S*U'and U is guaranteed to be a orthogonal matrix?Thank you![/color]