A symmetric matrix A is positive definite iffA can be factored as
A=LLT
where L is lower triangular with non-zero diagonal entries. This factorization is Cholesky decomposition. The 2 triangular factors are transposes of each other, so L alone determines the factorization.
Computing L
Entry (k,i) of LLT is the dot product of row k and row i of L, since column i of LT is row i of L. Equating entries with A fills L row by row, for k=1,2,…,n in order, and left to right within each row.
Off-diagonal entries (i=1,2,…,k−1)
Subtract the dot product of the first i−1 entries of row k and row i of L from aki, then divide by the diagonal entry lii.
lki=liiaki−j=1∑i−1lijlkj,i=1,2,…,k−1
Diagonal entry (i=k)
Subtract the sum of squares of the earlier entries in row k of L from akk, then take the square root.
lkk=akk−j=1∑k−1lkj2
When i=1 or k=1, the sum has no terms, so the first column is lk1=ak1/l11 and the top-left entry is l11=a11.