This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Add-ons / Standard Packages / LinearAlgebra  /


There are various ways to decompose a matrix into the product of simpler matrices of special types. These decompositions are frequently useful in numerical matrix calculations. The most general of these decompositions can be computed using the built-in functions QRDecomposition, SchurDecomposition, and SingularValues. The Cholesky decomposition writes a symmetric positive definite matrix as the product of an upper-triangular matrix and its transpose.

Computing the Cholesky decomposition.

A square matrix m is symmetric if it is equal to its transpose. It is positive definite if v.m.v is positive for all nonzero vectors v. Note that a symmetric positive definite matrix must always be real. The Cholesky decomposition gives an upper-triangular matrix u with the property that m can be written as Transpose[u].u.

  • This loads the package.
  • In[1]:= <<LinearAlgebra`Cholesky`

  • Here is the

    Hilbert matrix. It is obviously symmetric.
  • In[2]:= hil = Table[
    1/(i + j - 1), {i, 1, 4}, {j, 1, 4}]


  • All of the eigenvalues of hil are positive reals. This implies that the matrix is positive definite.
  • In[3]:= Eigenvalues[ N[hil] ]


  • Because the entries in hil are fractions, you get an exact result.
  • In[4]:= u = CholeskyDecomposition[hil]


  • The product of u and its transpose gives the original matrix hil.
  • In[5]:= MatrixForm[Transpose[u] . u]