Matrix square root using singular value decomposition (svd).

1 | ```
matrix.sqrt(A)
``` |

`A` |
A symmetric, positive definite matrix of size |

Using svd, the matrix A can be written as $$ A = U S V^T, $$ where

$U$ is called the left-singular vectors of $A$, which corresponds to the eigenvectors of $AA^T$,

$S$ has entries $S_i,j$ which are the singular values of $A$,

$V$ is called the right-singular vectors of $A$, which corresponds to the eigenvectors of $A^T A$.

The non-zero singular values of $A$ are the square roots of the non-zero eignevalues of both $AA^T$ and $A^T A$.
Due to the symmetry and positive definiteness of $A$, without loss of generality we can set $U=V$.
Thus $A = V S V^T$, and the columns of $V$ are eignevectors of $A$ with $j-th$ eignevalue begin $s_j$.
Define
$$ S^1/2 = diag((s_1^1/2,...,s_p^1/2)) $$
and hence we have
$$ B = V S^1/2 V^T $$, a symmetric *n x n* matrix such that $A = BB$.

Return a *n x n* matrix.

Simone Padoan, simone.padoan@unibocconi.it, http://faculty.unibocconi.it/simonepadoan/; Boris Beranger, borisberanger@gmail.com

1 2 3 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.