Learn R Programming

skewMLRM (version 1.7)

matrix.sqrt: Square root of a matrix

Description

Compute the square root of a matrix

Usage

matrix.sqrt(A)

Value

A symmetric matrix, say B, such as B^t*B=A

Arguments

A

a symmetric semi-definite positive matrix

Author

Clecio Ferreira, Diego Gallardo and Camila Zeller.

Examples

Run this code
A<-matrix(c(1,2,2,5),nrow=2)
B<-matrix.sqrt(A)
##Recovering A
t(B)%*%B
A

Run the code above in your browser using DataLab