The Cholesky decomposition is another way of solving systems of linear equations. It can be significantly faster and uses a lot less memory than the LU decomposition, by exploiting the property of symmetric matrices. However, the matrix being decomposed must be Hermitian (or real-valued symmetric and thus square) and positive definite. This means that the A matrix is decomposed as A=LLT, where L is a lower triangular matrix with real and positive numbers on the diagonals, and LT is the conjugate transpose of L.
Let's consider another example of a system of linear equations where the A matrix is both Hermitian and positive definite. Again, the equation is in the form of Ax=B, where A and B take the following values:
![](https://static.packt-cdn.com/products/9781789346466/graphics/assets/8ff30e92-f62d-46ec-ab09-a60a2fa81f49.png)
Let's represent these matrices as NumPy arrays:
In [ ]:
"""
Cholesky decomposition with NumPy
...