# square root of symmetric matrix and transposition

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.

-

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$.

-

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.

-
The times between this and the comment are miraculously close :) – BBischof Aug 15 '10 at 22:24
if the matrix is not positive definite, then is there another property I could use? – user957 Aug 15 '10 at 22:25
if the matrix is not a positive definite, there may not be a real solution. for example, the $1 \times 1$ matrix $A=-1$ does not have a real square root. – alexx Aug 15 '10 at 22:27
On the other hand, if you are OK with complex answers, then if $A$ is diagonalized as $A=U D U^{T}$ with diagonal $D$ and unitary $U$, then take $B=U D^{1/2} U^{T}$. $B$ will have complex entries, since some of the entries of $D$ will be negative. However, $B B^T = U D U^T = A$. – alexx Aug 15 '10 at 22:30
alex - I don't think Q D^{1/2} Q going to be triangular matrix. take for example A = ((2,-2),(-2,5)) – user957 Aug 16 '10 at 1:48