# Cholesky factorization and non-positive definite matrices

When Cholesky factorization fails, is there an alternative method to obtain the $\mathbf{L}$ matrix in:

$\mathbf{A}=\mathbf{L}\mathbf{L}^{*}$

I'm dealing with a matrix not guaranteed to be positive-definite; I'm wondering if there is a sure-fire way to find $\mathbf{L}$ (even if it's costly)?

In order that such a decomposition exists, $A$ must be Hermitian ($A=A^H$) and positive semi-definite. Then we can diagonalize $A$ with an unitary matrix $U$ ($UU^H=I$): $$A = U^HDU.$$ $D$ is a diagonal matrix with non-negative diagonal entries. Then we can write $$A = (U^HD^{1/2}U)(U^HD^{1/2}U),$$ where $D^{1/2}$ is the diagonal matrix, where the diagonal entries are the square root of the diagonal entries of $D$. Observe that $(U^HD^{1/2}U)^H=U^HD^{1/2}U$. Now perform $QR$-decomposition of $U^HD^{1/2}U$: $$U^HD^{1/2}U = QR$$ with $R$ upper triangular, $Q$ unitary. Then it holds $$A = (U^HD^{1/2}U)^H(U^HD^{1/2}U) = (QR)^H(QR)=R^HR,$$ hence $L = R^H$ gives the desired decomposition.