A symmetric positive definite matrix factors as with lower triangular and a positive diagonal. Compute column by column: a square root for each diagonal entry, a division for each entry below it.
| Step | On | |
|---|---|---|
| 1 | Check symmetry. Compare with . A matrix that is not symmetric has no Cholesky factor; use the LU decomposition. | , , ✓ |
| 2 | Fill column 1. Take , then divide the rest of column 1 by it. | , , |
| 3 | Fill column 2. Subtract the squares already in the row before taking the root (diagonal formula); subtract the products before dividing (off-diagonal formula). | , |
| 4 | Fill the last diagonal entry. A zero or negative number under the root means is not positive definite: stop. | |
| 5 | Check by multiplying. must give back . | , ✓ |