Block-diagonal forms and SVD(singular value decomposition)

124 Views Asked by At

I have a matrix X that is in a block-diagonal-form of two $n \times n$ matrices A \begin{bmatrix} A & 0 \\ 0 & A \\ \end{bmatrix} My goal is to extract A from X, so I thought it would be a good idea to perform SVD in the following manner, $X = USV^{\dagger}= \sum_{i={odd}} s_{i} U_{i}V^{\dagger}_{i}+\sum_{i={even}} s_{i} U_{i}V^{\dagger}_{i}$ , and each terms should corresponds to A, as all the singular values should be paired. I have testified this numerically using the following python codes.

A = np.random.randn(n,n) 
X = np.kron(np.eye(2),A)
U,s,V = np.linalg.svd(X,full_matrices=False)

A1=0
A2=0

for i in range(0,len(s),2):
    A1 += s[i]*np.outer(U[:,i],V[i,:])
for i in range(1,len(s),2):
    A2 += s[i]*np.outer(U[:,i],V[i,:])
X_test =A1+ A2

I have observed that when n is small we can extract A from X exactly, but if n is large enough the "A1 or A2" in the code no longer equals to A. Why did this happens?

P.S I plotted the Frobenius norm of $|A-A_{1}|_{fro}$ against the dimension of A below. I hope this helps.enter image description here