# Nakafa Framework: LLM
URL: https://nakafa.com/en/subject/university/bachelor/ai-ds/linear-methods/cholesky-decomposition
Source: https://raw.githubusercontent.com/nakafaai/nakafa.com/refs/heads/main/packages/contents/subject/university/bachelor/ai-ds/linear-methods/cholesky-decomposition/en.mdx
Output docs content for large language models.
---
export const metadata = {
    title: "Cholesky Decomposition",
    description: "Master Cholesky decomposition for positive definite matrices with efficient algorithms, lower triangular factorization, and computational complexity analysis.",
    authors: [{ name: "Nabil Akbarazzima Fatih" }],
    date: "07/13/2025",
    subject: "Linear Methods of AI",
};
## LU Decomposition for Positive Definite Matrices
For positive definite matrices, there is a special property that makes decomposition much simpler. [LU decomposition](/subject/university/bachelor/ai-ds/linear-methods/lu-decomposition) can be performed without using a permutation matrix  because Gaussian elimination can proceed without row swapping, and all pivot elements generated are guaranteed to be 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:
where  is a matrix whose main diagonal is normalized to 1, and  is a diagonal matrix:
Since LU decomposition without  is unique, then:
If we define:
then .
## Cholesky Decomposition
Positive definite matrices  allow for Cholesky decomposition:
where  is a regular lower triangular matrix. This matrix can be computed using the Cholesky algorithm.
The computation of matrix  is performed with:
based on the relationship . The following algorithm produces the Cholesky factor.
## Cholesky Algorithm
Given a positive definite matrix .
For :
for .
After running this algorithm, we will obtain the Cholesky factor which is a lower triangular matrix:
## Cholesky Algorithm Complexity
The Cholesky algorithm for computing the Cholesky factor  from  requires:
arithmetic operations.
This is half the number of operations required to compute LU decomposition, because the use of symmetry allows us to perform computations without row swapping in a different order.