My former question on this problem was not that popular, I was asking to prove the existence and uniqueness of a upper triangular matrix $S$ with positive entries on diagonal such that $A=S^TS$ for a positive definite Hermitian matrix. Now I am asking about an algorithm for this problem:
Task: Given a positive definite Hermitian $A$ find a upper triangular $S$ with positive entries on the diagonal such that $A=S^TS$.
My thoughts: In the first task part I proved that when I use Gram-Schmidt orthogonalization, then transform matrix is upper diagonal with positive entries on diagonal, so it seems that $S$ should be gotten using Gram-Schmidt.
Actually I can always find an arbitrary matrix $S$: since $A$ is Hermitian, I can consider it as structure matrix for scalar product, and in basis of eigenvectors of $A$, each multiplied with $|\lambda_i|^{-\frac12}$ (corresponding eigenvalue), (call this basis $C$) structure matrix is identity matrix, so $A=S^TES=S^TS$, but $S$ isn't upper diagonal with positive diagonal entries in general. So I should find a basis $B$ such that if I apply Gram-Schmidt on it, then I get $C$, and structure matrix of mentioned scalar product in basis $B$ is matrix $A$. I hope idea is clear.
Thanks in advance!
This is Cholesky decomposition.