I want to find an orthogonal matrix (G) in R such that
G'CG=L=diag(l1,l2,...lp)
where l1>l2>...>lp>0 are the eigen values of known matrix C.
I find a matrix with using code eigen(C)$vectors but the result matrix (L) is not a diagonal one. Is there anyone who can help me?
thanks in advance
Your only restriction on C shown is that all eigenvalues are positive. However, this is equivalent to saying that C is positive definite.
In that case, given e <- eigen(C), we have the following:
Q = e$vectors
l = e$values
Conj(t(Q)) = Q^-1
Q %*% diag(l) %*% Conj(t(Q)) = C
Equivalently:
diag(l) = Conj(t(Q)) %*% C %*% Q
As the eigenvalues in l are stored in decreasing order, you are done.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With