Cholesky Decomposition

A symmetric matrix AA is positive definite iff AA can be factored as

A=LLTA = LL^T

where LL is lower triangular with non-zero diagonal entries. This factorization is Cholesky decomposition. The 2 triangular factors are transposes of each other, so LL alone determines the factorization.

Computing LL

Entry (k,i)(k, i) of LLTLL^T is the dot product of row kk and row ii of LL, since column ii of LTL^T is row ii of LL. Equating entries with AA fills LL row by row, for k=1,2,…,nk = 1, 2, \ldots, n in order, and left to right within each row.

  • Off-diagonal entries (i=1,2,…,k−1i = 1, 2, \ldots, k-1)
    Subtract the dot product of the first i−1i-1 entries of row kk and row ii of LL from akia_{ki}, then divide by the diagonal entry liil_{ii}.
lki=aki−∑j=1i−1lijlkjlii,i=1,2,…,k−1l_{ki} = \frac{a_{ki} - \sum\limits_{j=1}^{i-1} l_{ij}l_{kj}}{l_{ii}}, \quad i = 1, 2, \ldots, k-1
  • Diagonal entry (i=ki = k)
    Subtract the sum of squares of the earlier entries in row kk of LL from akka_{kk}, then take the square root.
lkk=akk−∑j=1k−1lkj2l_{kk} = \sqrt{a_{kk} - \sum\limits_{j=1}^{k-1} l_{kj}^2}

When i=1i = 1 or k=1k = 1, the sum has no terms, so the first column is lk1=ak1/l11l_{k1} = a_{k1} / l_{11} and the top-left entry is l11=a11l_{11} = \sqrt{a_{11}}.

Example

Apply Cholesky decomposition to

A=(61555155522555225979)A = \begin{pmatrix} 6 & 15 & 55 \\ 15 & 55 & 225 \\ 55 & 225 & 979 \end{pmatrix}
Solution Reveal Hide

Row 11

l11=6≈2.449l_{11} = \sqrt{6} \approx 2.449

Row 22

l21=a21l11=152.449≈6.124,l22=a22−l212=55−6.1242≈4.183l_{21} = \frac{a_{21}}{l_{11}} = \frac{15}{2.449} \approx 6.124, \quad l_{22} = \sqrt{a_{22} - l_{21}^2} = \sqrt{55 - 6.124^2} \approx 4.183

Row 33

l31=a31l11=552.449≈22.454,l32=a32−l31l21l22=225−22.454×6.1244.183≈20.917l_{31} = \frac{a_{31}}{l_{11}} = \frac{55}{2.449} \approx 22.454, \quad l_{32} = \frac{a_{32} - l_{31}l_{21}}{l_{22}} = \frac{225 - 22.454 \times 6.124}{4.183} \approx 20.917l33=a33−l312−l322=979−22.4542−20.9172≈6.110l_{33} = \sqrt{a_{33} - l_{31}^2 - l_{32}^2} = \sqrt{979 - 22.454^2 - 20.917^2} \approx 6.110L≈(2.449006.1244.183022.45420.9176.110)L \approx \begin{pmatrix} 2.449 & 0 & 0 \\ 6.124 & 4.183 & 0 \\ 22.454 & 20.917 & 6.110 \end{pmatrix}

Wolfram Mathematica notebooks

A companion notebook for this note. Open it in Mathematica and evaluate the cells to reproduce the worked example.

The summary notebook defines every function used in this module, with documentation and no examples, as a starting point for your own problems.

Written by November 3, 2026 1 min read
Was this helpful?