Skip to content

TayssirDo/Cholesky-decomposition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 

Repository files navigation

Cholesky decomposition

The Cholesky decomposition is an efficient and reliable way to check if a symmetric matrix is positive definite. If a symmetric matrix is not positive definite, the Cholesky decomposition will fail.

Theorem: If is symmetric positive definite (SPD), then has a unique Cholesky decomposition: where is upper triangular with positive diagonal entries.

Example

A = np.array([[7.3, 1, 0], [1, 20, 3.5], [0, 3.5, 2]])
print('----- Matrix A: -----\n' + str(A) + '\n')

# compute cholesky decomposition
R = cholesky_decomposition(A)

print('----- Matrix R: -----\n' + str(R) + '\n')
print('--> Verification: \n' + str(R.transpose() @ R))

Notes

  1. G.H. Golub and C.F. Van Loan. Matrix Computations. The Johns Hopkins University Press, Baltimore, Maryland, 4th edition, 2013.

  2. Å. Björck. Numerical Methods in Matrix Computations. Springer,2015.

Releases

No releases published

Packages

No packages published

Languages