## Cholesky Factorization Calculator |

This JavaScript program performs a Cholesky Decomposition on a real, symmetric, positive-definite, matrix. It is a severely edited translation of the LAPACK routine DPOTRF.F.

**References:**

E. Anderson, Z. Bai, C. Bischof, S. Blackford, J. Demmel, J. Dongarra, J. Du Croz, A. Greenbaum,

S. Hammarling, A. McKenney, and D. Sorensen.

"LAPACK Users' Guide, Third Edition"

SIAM, Philadelphia

1999

The original sub-routines were written in FORTRAN and have been translated to Javascript here. Although all care has been taken to ensure that the sub-routines were translated accurately, some errors may have crept into the translation. These errors are mine; the original FORTRAN routines have been thoroughly tested and work properly. Please report any errors to the webmaster.

A Cholesky Decomposition of a real, symmetric, positive-definite matrix, **A**, yields either

(i) a lower triangular matrix, **L**, such that **A** = **L** * **L**^{T}, or

(ii) an upper triangular matrix, **U**, such that **A** = **U**^{T} * **U**.

Not all symmetric matrices are positive-definite; in fact, applying a Cholesky Decomposition on a symmetric matrix is perhaps the quickest and easiest way to check its positive-definiteness. The matrix is initially treated as if it *is* positive definite. If the decomposition fails, then the matrix is, in fact, *not* positive definite.

This calculator performs the second option listed above: it computes the Upper Triangular Matrix, **U**.

**HOW TO USE THIS UTILITY**

(i) The first entry should be the dimension of the system, N.

(ii) The next N x N entries should be the coefficients of the **A** Matrix.

The coefficients should be entered in the following order:

a_{11}, a_{12}, a_{13}, . . .

a_{21}, a_{22}, a_{23}, . . .

etc.

Do not enter commas, periods, brackets, etc. Also note that numbers in scientific notation are NOT recognized.

For example, say we want to compute **U** for a 3 x 3 matrix. Data should be input to the box as follows:

3 | ||

25 | 15 | -5 |

15 | 18 | 0 |

-5 | 0 | 11 |

Once all the data has been entered, click the **Factorize** button, and the Cholesky Factorization will be performed.

**IMPORTANT!**

Note the Error Code. If it does not equal 0, the decomposition could not be completed.

For more information about this program, please see the associated blog post: Cholesky Decomposition Program