Dear All,

My question is simple but I need someone to help me out.
Suppose I have a positive definite matrix A.
The funtion chol()  gives matrix L, such that A = L'L.
The inverse of A, say A.inv,  is also positive definite and can be
factorized as A.inv = M'M.
Then
        A = inverse of (A.inv) = inverse of (M'M) = (inverse of M) %*%
(inverse of M)'
           = ((inverse of M)')'%*% (inverse of M)',
i.e. if define B = transpose of (inverse of M), then A = B' %*% B.
Therefore L = B = transpose of (inverse of M) = transpose of (inverse of
chol(A.inv))
But when I try it in R, the answer is not as expected.

code as below:

 A <- matrix(1:9,3,3)
A <- A + t(A)
diag(A) <- 50
print(A)
L <- chol(A)
B <- t(solve(chol(solve(A))))
print(L)
print(B)

Thank you in advance,

Best wishes,
Jie

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to