sqrtmat: Computes the Square Root of a Matrix.

View source: R/sqrtmat.R

sqrtmatR Documentation

Computes the Square Root of a Matrix.

Description

This function computes the square root of a matrix.

Usage

sqrtmat(A)

Arguments

A

symmetric positive-definite matrix

Value

matrix B such that BB'=A

References

https://en.wikipedia.org/wiki/Square_root_of_a_matrix

Examples

A <- matrix(c(5,1,1,3),2,2)
B <- sqrtmat(A)
B %*% t(B)
A

dynmix documentation built on July 9, 2023, 7:22 p.m.

Related to sqrtmat in dynmix...