Given:
G1. C is $n\times n$ positive semidefinite matrix
G2. For positive semidefinite matrix SVD decomposition is equal to eigen value decomposition.
G3. Singular Value Decomposition of C $SVD(C) = U, S, V$, where U is eigen vectors (orthonormal basis) and S is diagonal matrix with eigen values.
G4. I decides to use 2 (for example) first values $s_0, s_1$ corresponding to $u_0, u_1$ eigen vectors directions (columns in U)
G5. I receive another matrix $D\ne C$, D is $n\times n$ positive semidefinite matrix
Question:
Q1. I want to subtract directions of $u_0, u_1$ from D
The solution:
S1. Calculate the projection of D to U: $D_u = U^{-1}\times D\times U$
S2. Note: in order to return back $D = U\times D_u\times U^{-1}$
S3. U - orthonormal, $U^T=U^{-1}$
S4. Denote $U_2 = [u_0, u_1, 0...], U_{n-2} = [0, 0, u_2, ...u_n], U = U_2 + U_{n-2}$
S5. $U^T = U_2^T + U_{n-2}^T$
S6. Get D for n-2 directions: $D_{n-2}=U_{n-2}\times D_u\times U_{n-2}^T$
Is it correct ?
Thanks
Yes, that is correct. A note: D is the matrix of eigenvalues - it is defined on G2. What is D in G5? You can also look at low-rank matrix approximation, or separable models here