# Cholesky Factorization

Learn how to implement Cholesky factorization of matrices using R, Rccp, Armadillo, and Eigen.

## Cholesky decomposition

**Cholesky decomposition** or factorization is a decomposition of a symmetric and **positive definite** real matrix into the product of a lower triangular matrix and its conjugate transpose. This is useful for efficient numerical solutions. Cholesky decomposition is roughly twice as efficient as the LU decomposition used for solving systems of linear equations.

A square matrix $π΄$ defined over the real numbers is defined as symmetric when $π΄ = π΄^π$.

A symmetric $(π \times π)$ real matrix, $π$, is said to be positive definite if the scalar $π§^πππ§$ is strictly positive for every nonzero column vector $π§$ of $π$ real numbers.

The Cholesky decomposition of a square symmetric positive definite matrix $π΄$ is a decomposition of the form:

$π΄ = πΏπΏ^π$

In this equation:

- $πΏ$ is a lower triangular matrix with real and positive diagonal entries.
- $πΏ^π$ denotes the transpose of $πΏ$.

Every real-valued symmetric positive-definite matrix has a unique Cholesky decomposition.

Get hands-on with 1200+ tech skills courses.