
Last chance! 50% off unlimited learning
Sale ends in
Compute the square root of a matrix
matrix.sqrt(A)
A symmetric matrix, say B, such as B^t*B=A
a symmetric semi-definite positive matrix
Clecio Ferreira, Diego Gallardo and Camila Zeller.
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