10
$\begingroup$

I have a symmetric matrix A. How do I compute a matrix B such that $B^tB=A$ where $B^t$ is the transpose of $B$. I cannot figure out if this is at all related to the square root of $A$.

I've gone through wikimedia links of square root of a matrix.

  • 3
    http://en.wikipedia.org/wiki/Cholesky_factorization2010-08-15

2 Answers 2

14

As J. M. says, you need your matrix $A$ to be positive definite. Since $A$, being symmetric, is always diagonalizable, this is the same as saying that it has non-negative eigenvalues. If this is the case, you can adapt alex's comment almost literally for the real case: as we've said, $A$ is diagonalizable, but, also, there exists an orthonormal base of eigenvectors of $A$. That is, there is an invertible matrix $S$ and a diagonal matrix $D$ such that

$ D = SAS^t , \quad \text{with} \quad SS^t = I \ . $

Since

$ D = \mathrm{diag} (\lambda_1, \lambda_2, \dots , \lambda_n) \ , $

is a diagonal matrix and has only non-negative eigenvalues $\lambda_i$, you can take its square root

$ \sqrt{D} = \mathrm{diag} (\sqrt{\lambda_1}, \sqrt{\lambda_2}, \dots , \sqrt{\lambda_n} ) \ , $

and then, on one hand, you have:

$ \left( S^t \sqrt{D} S \right)^2 = \left( S^t \sqrt{D} S\right) \left(S^t \sqrt{D} S \right) = S^t \left( \sqrt{D}\right)^2 S = S^t D S = A \ . $

On the other hand, $S^t \sqrt{D} S$ is a symmetric matrix too:

$ \left( S^t \sqrt{D} S \right)^t = S^t (\sqrt{D})^t S^{tt} = S^t \sqrt{D^t} S = S^t \sqrt{D} S \ , $

so you have your $B = S^t \sqrt{D} S$ such that $B^t B = A$.

3

What you apparently want here is the Cholesky decomposition, which factors a matrix A into $BB^T$ where $B$ is a triangular matrix. However, this only works if your matrix is positive definite.

  • 0
    One possibility to generate the Cholesky triangle from $\sqrt{D}Q^T$ is to perform a QR decomposition on it. On the other hand, doing a flop count on this process shows that you're better off generating the Cholesky triangle ab initio!2010-08-16