Eigen_UtDU: 'UtDU' decomposition of a matrix

View source: R/EigenR.R

Eigen_UtDUR Documentation

'UtDU' decomposition of a matrix

Description

Cholesky-'UtDU' decomposition of a symmetric or Hermitian matrix.

Usage

Eigen_UtDU(M)

Arguments

M

a square symmetric/Hermitian positive or negative semidefinite matrix, real/complex

Details

Symmetry is not checked; only the lower triangular part of M is used.

Value

The Cholesky-'UtDU' decomposition of M in a list (see example).

Examples

x <- matrix(c(1:5, (1:5)^2), 5, 2)
x <- cbind(x, x[, 1] + 3*x[, 2])
M <- crossprod(x)
UtDU <- Eigen_UtDU(M)
U <- UtDU$U
D <- UtDU$D
perm <- UtDU$perm
UP <- U[, perm]
t(UP) %*% diag(D) %*% UP # this is `M`

EigenR documentation built on May 18, 2022, 9:05 a.m.