Matrix square root using singular value decomposition (svd).
A symmetric, positive definite matrix of size n x n.
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.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.