Why No Row Swaps Are Needed
Let be symmetric positive definite, meaning
For a matrix with this condition, LU decomposition can proceed without row swaps. In exact arithmetic, every elimination pivot is positive.
This means we obtain factorization in the form , where the diagonal elements of are positive pivot elements for all diagonal indices.
Since , we also have:
Here, is a matrix whose main diagonal is normalized to , and is a diagonal matrix:
When and have unit diagonals, this decomposition is unique. Comparing the two factorizations gives
Define the diagonal square-root matrix as follows.
This matrix satisfies .
The Unique Lower Triangular Factor
Every real symmetric positive definite matrix has a unique Cholesky factor with positive diagonal entries:
The matrix is nonsingular and lower triangular. The positive square roots of the pivots fix the signs of its diagonal and make the Cholesky factor unique.
The computation of matrix is performed with:
This computation uses the relationship . The following algorithm produces the Cholesky factor.
Cholesky Algorithm
Given a positive definite matrix .
For :
Compute the remaining entry first:
The second recurrence applies for .
The expression under each square root must remain positive. A zero or negative value means that the input is not positive definite or that rounding has affected a nearly singular problem. Replacing that value with its absolute value changes the recurrence and can produce a factor that does not satisfy .
After running the algorithm, we obtain the lower triangular Cholesky factor:
Factoring a Two by Two Positive Definite Matrix
Factor the matrix
The entries of the lower triangular factor follow directly from the algorithm:
Thus
Once the factor is known, solve through two triangular systems: first , then . This avoids computing a matrix inverse.
Cholesky Algorithm Complexity
The Cholesky algorithm for computing the Cholesky factor from requires:
This expression gives the number of arithmetic operations.
The leading count contains about multiplications and additions. Together they give about floating-point operations, roughly half the leading cost of factorization for a general dense matrix. Cholesky saves work by using symmetry and storing only one triangular half of the factorization.