Given a matrix B, where B=A'A, how can I find A? In other words, if I have a matrix B which I know is another matrix A times its transpose, can I find matrix A? Thanks, Mike
On 2007-10-31, Michael Gormley <mpg33 at drexel.edu> wrote:> Given a matrix B, where B=A'A, how can I find A? > In other words, if I have a matrix B which I know is another matrix A times > its transpose, can I find matrix A?You want to look for Cholesky decomposition, if your matrix is hermitesh. If it is complex and symmetric only, there are solutions as well, but not for any case. -- Dipl.-Math. Wilhelm Bernhard Kloke Institut fuer Arbeitsphysiologie an der Universitaet Dortmund Ardeystrasse 67, D-44139 Dortmund, Tel. 0231-1084-257 PGP: http://vestein.arb-phys.uni-dortmund.de/~wb/mypublic.key
B is symmetric by definition; if it's also real positive-definite then A is the upper triangular factor of the Choleski decomposition, and you can use> chol(B)to get A. On Wed, 31 Oct 2007, Michael Gormley wrote:> Given a matrix B, where B=A'A, how can I find A? > In other words, if I have a matrix B which I know is another matrix A times > its transpose, can I find matrix A? > > Thanks, > Mike > > ______________________________________________ > R-help at 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. >
On 1/11/2007, at 9:13 AM, Michael Gormley wrote:> Given a matrix B, where B=A'A, how can I find A? > In other words, if I have a matrix B which I know is another matrix > A times > its transpose, can I find matrix A?You can't, because A is not unique. You can easily find ***a*** solution. E.g. A1 <- matrix(1:4,ncol=2) B <- t(A1)%*%A1 A2 <- msqrt(B) A2 != A1 (A2 is symmetric), yet t(A2)%*%A2 == B. The function msqrt() above is a simple-minded calculation of the square root of a positive semi-definite real matrix, the code of which I just cribbed from an old posting by Prof. Brian Ripley: msqrt <- function(X) { e <- eigen(X) V <- e$vectors V%*%diag(sqrt(e$values))%*%t(V) } The problem of finding ***all possible*** solutions A to A'A = B (for B symmetric positive semi-definite) is likely to be hard, but may have been solved by the linear algebraists. I dunno. cheers, Rolf Turner ###################################################################### Attention:\ This e-mail message is privileged and confid...{{dropped:9}}