Tutorials › Multivariate Statistics (Graduate) › Cholesky Factorization and Its Existence

Matrix Foundations for Inference · Tutorial 6 of 975

Cholesky Factorization and Its Existence

Learn why every real symmetric positive definite matrix has exactly one lower-triangular Cholesky factor with positive diagonal, and how to calculate and check it.

Beginner 11 min read

What You'll Learn

  • State the Cholesky factorization convention used for positive definite matrices.
  • Derive the recursive formulas for computing its entries.
  • Follow a complete induction proof of existence and uniqueness.
  • Verify that a triangular factor with positive diagonal produces a positive definite matrix.
  • Compute and check Cholesky factors for two-by-two and three-by-three examples.
  • Recognize why a positive diagonal is necessary for uniqueness.

Why Factor a Positive Definite Matrix?

A positive definite matrix encodes a strictly positive quadratic form in every nonzero direction. The Cholesky factorization expresses that form using a triangular matrix, making the matrix’s structure explicit and giving a practical way to calculate with it. In multivariate statistics, this factorization is useful when working with covariance matrices and related computations.

The result applies to real symmetric positive definite matrices. Positive definiteness is the condition established in the earlier material on positive definite matrices; here, the focus is what that condition guarantees about a triangular factor.

Definition: Let \(A\) be a real symmetric \(n\times n\) positive definite matrix. Its Cholesky factorization is a representation \[ A=LL^T, \] where \(L\) is a lower-triangular \(n\times n\) matrix with strictly positive diagonal entries. Such a matrix \(L\), when it exists, is called the Cholesky factor of \(A\).

The lower-triangular convention fixes the position of the zeros: entries above the diagonal of \(L\) are zero. The positive-diagonal condition is also part of the definition, not an optional sign choice. Together these conditions make the factor unique.

Computing the Entries

Write \(A=(a_{ij})\) and \(L=(l_{ij})\). Because \(L\) is lower triangular, the entry in row \(i\), column \(j\) of \(LL^T\) is \[ (LL^T)_{ij}=\sum_{k=1}^{\min(i,j)} l_{ik}l_{jk}. \] Thus, the equation \(A=LL^T\) gives a sequence of equations for the entries of \(L\). On the diagonal, for \(i=1,\ldots,n\),

$$ a_{ii}=\sum_{k=1}^{i}l_{ik}^{\,2}. $$

For \(j>i\), symmetry of \(A\) and the same product give

$$ a_{ji}=\sum_{k=1}^{i}l_{jk}l_{ik}. $$

Solving these equations in increasing column order gives the usual recursive formulas. The diagonal entry \(l_{ii}\) must be positive, so it is the positive square root.

$$ l_{ii}=\sqrt{a_{ii}-\sum_{k=1}^{i-1}l_{ik}^{\,2}}, \qquad l_{ji}=\frac{a_{ji}-\sum_{k=1}^{i-1}l_{jk}l_{ik}}{l_{ii}} \quad (j>i). $$

An empty sum, as occurs when \(i=1\), is zero. The formulas show the order of calculation: obtain \(l_{ii}\), then calculate the entries below it in column \(i\). Each square root must have a strictly positive argument, and each divisor \(l_{ii}\) must be nonzero. The existence proof below explains why positive definiteness guarantees that the construction can proceed.

Worked Example: A Two-by-Two Factor

Find the Cholesky factor of

$$ A=\begin{pmatrix}4&2\\2&3\end{pmatrix}. $$

The leading principal minors are \(4>0\) and \(4\cdot3-2\cdot2=8>0\), so the symmetric matrix is positive definite. Write \(L=\begin{pmatrix}l_{11}&0\\l_{21}&l_{22}\end{pmatrix}\). The first diagonal entry is

$$ l_{11}=\sqrt{4}=2. $$

The entry below it follows from \(a_{21}=l_{21}l_{11}\), so \(l_{21}=2/2=1\). The final diagonal entry is

$$ l_{22}=\sqrt{3-l_{21}^{\,2}}=\sqrt{3-1}=\sqrt{2}. $$

Therefore

$$ L=\begin{pmatrix}2&0\\1&\sqrt{2}\end{pmatrix}, \qquad LL^T= \begin{pmatrix}2&0\\1&\sqrt{2}\end{pmatrix} \begin{pmatrix}2&1\\0&\sqrt{2}\end{pmatrix} = \begin{pmatrix}4&2\\2&3\end{pmatrix}. $$

Worked Example: A Three-by-Three Factor

Find the Cholesky factor of

$$ A=\begin{pmatrix}4&2&2\\2&5&3\\2&3&3\end{pmatrix}. $$

The first column is calculated from \(a_{11}=4\), \(a_{21}=2\), and \(a_{31}=2\):

$$ l_{11}=2,\qquad l_{21}=\frac{2}{2}=1,\qquad l_{31}=\frac{2}{2}=1. $$

Next, the second diagonal entry and the entry below it are

$$ l_{22}=\sqrt{5-l_{21}^{\,2}}=\sqrt{5-1}=2, \qquad l_{32}=\frac{3-l_{31}l_{21}}{l_{22}} =\frac{3-(1)(1)}{2}=1. $$

The last diagonal entry is

$$ l_{33}=\sqrt{3-l_{31}^{\,2}-l_{32}^{\,2}} =\sqrt{3-1-1}=1. $$

The resulting factor and its product are

$$ L=\begin{pmatrix}2&0&0\\1&2&0\\1&1&1\end{pmatrix}, \qquad LL^T= \begin{pmatrix}4&2&2\\2&5&3\\2&3&3\end{pmatrix}=A. $$

For example, the \((3,2)\) entry of the product is \(1\cdot1+1\cdot2=3\), and the \((3,3)\) entry is \(1^2+1^2+1^2=3\). These checks confirm the entries that are easiest to overlook in a hand calculation.

Existence and Uniqueness

The recursive calculations suggest a factor, but by themselves they do not establish that the required square roots are always real and positive. The following theorem supplies that guarantee and proves uniqueness as well.

Theorem: Every real symmetric positive definite matrix \(A\) has a unique factorization \(A=LL^T\) in which \(L\) is lower triangular and has strictly positive diagonal entries.

Proof. We use induction on the matrix dimension \(n\). If \(n=1\), then \(A=(a)\) with \(a>0\), and \(L=(\sqrt{a})\) is the unique one-by-one factor with positive diagonal.

Now let \(n>1\), and suppose the result holds for dimension \(n-1\). Partition \(A\) as

$$ A=\begin{pmatrix}a&c^T\\c&B\end{pmatrix}, $$

where \(a\) is a scalar, \(c\) is a vector, and \(B\) is symmetric. Since \(A\) is positive definite, its quadratic form at the vector with first coordinate \(1\) and all other coordinates zero gives \(a>0\). Define \(t=\sqrt{a}>0\), \(v=c/t\), and \(C=B-vv^T\).

We first show that \(C\) is positive definite, so the induction hypothesis applies to it. Take any nonzero vector \(y\in\mathbb{R}^{n-1}\) and set \(x=-c^Ty/a\). The vector \((x,y^T)^T\) is nonzero because \(y\ne0\). Expanding its quadratic form gives

$$ \begin{pmatrix}x\\y\end{pmatrix}^{T} A \begin{pmatrix}x\\y\end{pmatrix} =ax^2+2x\,c^Ty+y^TBy =y^T\left(B-\frac{cc^T}{a}\right)y =y^TCy. $$

The first expression is strictly positive by positive definiteness of \(A\). Hence \(y^TCy>0\) for every nonzero \(y\), and \(C\) is positive definite. By the induction hypothesis, \(C=TT^T\) for a lower-triangular \(T\) with strictly positive diagonal.

Set

$$ L=\begin{pmatrix}t&0\\v&T\end{pmatrix}. $$

This matrix is lower triangular with strictly positive diagonal. Since \(tv=c\) and \(vv^T+TT^T=vv^T+C=B\), multiplication gives

$$ LL^T= \begin{pmatrix}t^2&tv^T\\tv&vv^T+TT^T\end{pmatrix} = \begin{pmatrix}a&c^T\\c&B\end{pmatrix} =A. $$

This proves existence. To prove uniqueness, suppose another factor with the required properties is

$$ \widetilde L=\begin{pmatrix}s&0\\w&R\end{pmatrix}, $$

where \(s>0\) and \(R\) is lower triangular with strictly positive diagonal. From \(A=\widetilde L\widetilde L^T\), the top-left block gives \(s^2=a\), so \(s=t\). The lower-left block gives \(sw=c\), so \(w=v\). The lower-right block then gives \(RR^T=B-vv^T=C\). By the induction hypothesis, \(R=T\). Thus \(\widetilde L=L\), proving uniqueness. \(\square\)

Worked Example: Checking a Factor and Positive Definiteness

Consider

$$ A=\begin{pmatrix}1&2&-1\\2&5&1\\-1&1&14\end{pmatrix}. $$

Compute the first column: \(l_{11}=\sqrt{1}=1\), \(l_{21}=2/1=2\), and \(l_{31}=-1/1=-1\). Then

$$ l_{22}=\sqrt{5-2^2}=1, \qquad l_{32}=\frac{1-(-1)(2)}{1}=3, \qquad l_{33}=\sqrt{14-(-1)^2-3^2}=2. $$

Thus

$$ L=\begin{pmatrix}1&0&0\\2&1&0\\-1&3&2\end{pmatrix}. $$

Direct multiplication checks every entry:

$$ LL^T= \begin{pmatrix} 1&2&-1\\ 2&4+1&-2+3\\ -1&-2+3&1+9+4 \end{pmatrix} = \begin{pmatrix}1&2&-1\\2&5&1\\-1&1&14\end{pmatrix}. $$

This factor also verifies positive definiteness directly: \(L\) has nonzero diagonal, so \(L^T x\ne0\) for every nonzero \(x\). Therefore \(x^TAx=(L^Tx)^T(L^Tx)>0\) for every nonzero \(x\).

What the Factorization Guarantees

The same calculation proves the converse: if a real square matrix \(A\) can be written as \(LL^T\) for a lower-triangular \(L\) with strictly positive diagonal, then \(A\) is symmetric positive definite. Indeed, \(LL^T\) is symmetric, and a triangular matrix with nonzero diagonal is invertible. Thus, for \(x\ne0\), \(L^Tx\ne0\), and

$$ x^TAx=x^TLL^Tx=(L^Tx)^T(L^Tx)=\sum_{i=1}^{n}\big((L^Tx)_i\big)^2>0. $$

So, among real symmetric matrices, having a Cholesky factor with positive diagonal is equivalent to being positive definite. The factorization is not just a way to represent such a matrix; it is also a direct certificate of its definiteness.

A common mistake is to omit the positive-diagonal requirement and then claim the factor is unique. For instance, the two different lower-triangular matrices

$$ \begin{pmatrix}2&0\\1&\sqrt{2}\end{pmatrix} \quad\text{and}\quad \begin{pmatrix}-2&0\\-1&\sqrt{2}\end{pmatrix} $$

both produce \(\begin{pmatrix}4&2\\2&3\end{pmatrix}\) when multiplied by their transposes. Their first diagonal entries have opposite signs. Requiring every diagonal entry of \(L\) to be positive removes this sign ambiguity and gives the unique Cholesky factor.

Another mistake is to accept a negative quantity under a square root during the recursive calculation, or to divide by a zero diagonal entry. For a matrix known to be positive definite, the theorem rules out both problems. If either occurs in hand calculations, check the arithmetic, the input matrix, and whether the stated positive definiteness condition actually holds. In numerical work, rounding can also affect small computed quantities, so intermediate values should not be rounded prematurely.

Key takeaway: For a real symmetric positive definite matrix, there is exactly one lower-triangular \(L\) with positive diagonal such that \(A=LL^T\). Calculate it column by column, and verify the result by multiplication when working by hand.

Check Your Understanding

Answer these questions using the definitions and results above.

  1. What two structural conditions on \(L\) are part of the Cholesky factorization convention?
  2. For \(A=\begin{pmatrix}9&3\\3&5\end{pmatrix}\), calculate the Cholesky factor and check the product.
  3. In the induction proof, why is \(B-cc^T/a\) positive definite?
  4. Why does a lower-triangular factor with strictly positive diagonal certify that \(LL^T\) is positive definite?
  5. Why does requiring a positive diagonal make the Cholesky factor unique?
Clinical Biostats