For a symmetric nonnegative definite matrix A, a symmetric square root denoted by A1/2 can be obtained by using the ROOT function and the subroutine EIGEN. Specifically, since A is symmetric, we must have A = PAP' = (PA1/2P')(PA1/2P') = A1/2 A1/2 where P is orthogonal. The diagonal matrix A contains the eigenvalues of A in the diagonal places, which are nonnegative since the matrix A is nonnegative definite. Thus, A1/2 is just a diagonal matrix with diagonal elements as the nonnegative square roots of the corresponding elements of A. Accordingly, we define A1/2 as A1/2 = PA1/2P'. Thus A1/2 is also symmetric. However, it may not be unique.
The needed SAS statements to accomplish this task are
proc iml; a = { 10 3 9, 3 40 8, 9 8 15; call eigen(d,p,a); lam_half = root(diag(d)); a_half = p*lam_half*p`; print a, p, lam_half; print a_half ;
The symmetric square root matrix A1/2 in the above code is denoted by A_HALF. It may be pointed out that A−1/2 may be computed by taking the inverse of A1/2 or by directly computing the symmetric square root of A−1 instead of A using the above code.
3.144.100.237