I believe that the SVD of a matrix A can be written in terms of its symmetric $A_s$ and anti-symmetric $A_a$ parts as $ eig(A_s^2) - eig(A_a^2) $, but I am having trouble with the proof and with doing an example in Octave.
The following math, when translated to code, gives the correct singular values. $$ s_1 = SVD(A) $$ $$ A = A_s + A_a $$ $$ A_s = (1/2) * (A + A^T) $$ $$ A_a = (1/2) * (A - A^T) $$ $$ s_2 = \sqrt{eig((A_s+A_a)^T*(A_s+A_a))} $$ $$ s_2 = \sqrt{eig(A_s^2 - A_a^2 + A_s*A_a - A_a*A_s)} $$
So far, $ s_1 = s_2 $
However, the next step gives non-matching singular vales, and $ s_1 \ne s_3$
$$ s_3 = \sqrt{eig(A_s^2) - eig(A_a^2) + eig(A_s*A_a) - eig(A_a*A_s)} $$
Can anybody explain why? The only thing I can thing of is that there is a problem in the order in which the eigenvalues are returned by Octave in the above calculation which are then summed elementwise, or maybe $eig(A+B) = eig(A)+eig(B)$ only when A and B are mutually diagonalizable?
Here is the Octave code I am using to test:
A = gallery("integerdata", [-100 100], [4 4], 2) ; eig(A)
sort(svd(A))
As = (1/2)*(A + A') # symmetric part
Aa = (1/2)*(A - A') # antisymmetric part
sort(svd(As + Aa)) # yes!
sqrt(eig((As+Aa)'*(As+Aa))) # yes!
sqrt(eig(As'*As + As'*Aa + Aa'*As +Aa'*Aa)) # yes!
sqrt(eig(As*As + As*Aa - Aa*As - Aa*Aa)) # yes!
sqrt(eig(As^2 - Aa^2 + As*Aa - Aa*As)) # yes == svd!
sort(sqrt(eig(As^2) - eig(Aa^2) + eig(As*Aa) - eig(Aa*As))) # No! I really think this should work...
Thanks!!
Indeed the identity $eig(A+B) = eig(A)+eig(B)$ is false in general.
The reason your first two calculations work is because
$$A^TA=(A_s+A_a)^T(A_s+A_a)=A_s^2 - A_a^2 + A_sA_a - A_aA_s$$
The identity $eig(A+B) = eig(A)+eig(B)$ holds when $A$ and $B$ are simultaneously diagonalizable, which happens if and only if $AB=BA$.
A necessary and sufficient condition for $A_sA_a=A_aA_s$ is $AA^T=A^TA$. In particular we have $eig(A) = eig(A_s)+eig(A_a)$ when $A$ is normal.