cholesky: Cholesky Square Root of a Matrix

View source: R/gaussian-elimination.R

choleskyR Documentation

Cholesky Square Root of a Matrix

Description

Returns the Cholesky square root of the non-singular, symmetric matrix X. The purpose is mainly to demonstrate the algorithm used by Kennedy & Gentle (1980).

Usage

cholesky(X, tol = sqrt(.Machine$double.eps))

Arguments

X

a square symmetric matrix

tol

tolerance for checking for 0 pivot

Value

the Cholesky square root of X

Author(s)

John Fox

References

Kennedy W.J. Jr, Gentle J.E. (1980). Statistical Computing. Marcel Dekker.

See Also

chol for the base R function

gsorth for Gram-Schmidt orthogonalization of a data matrix

Examples

C <- matrix(c(1,2,3,2,5,6,3,6,10), 3, 3) # nonsingular, symmetric
C
cholesky(C)
cholesky(C) %*% t(cholesky(C))  # check


matlib documentation built on Oct. 3, 2024, 1:09 a.m.