

   chol {base}                                  R Documentation

   TThhee CChhoolleesskkii DDeeccoommppoossiittiioonn

   UUssaaggee::

        chol(x)

   AArrgguummeennttss::

          x: a symmetric positive-definite matrix.

   VVaalluuee::

        This function computes the Choleski factorization of
        the square matrix `x'.  It returns the upper triangular
        factor of the decomposition, i.e., the matrix R such
        that R'R = x (see example).

        Note that effectively, only the upper triangular part
        of `x' is used such that the above only holds when `x'
        is symmetric.

   RReeffeerreenncceess::

        Dongarra, J. J., J. R. Bunch, C. B. Moler and G. W.
        Stewart (1978).  LINPACK Users Guide.  Philadelphia:
        SIAM Publications.

   SSeeee AAllssoo::

        `chol2inv' for its inverse, `backsolve' for solving
        linear systems with upper triangular left sides.

        `qr', `svd' for related matrix factorizations.

   EExxaammpplleess::

        ( m <- matrix(c(5,1,1,3),2,2) )
        ( cm <- chol(m) )
        t(cm) %*% cm  #-- = 'm'
        all(abs(m  -  t(cm) %*% cm) < 100* .Machine$double.eps) # TRUE

