| matrix.sqrt | R Documentation |
This function computes a square root of an n\times n matrix \bold{A}.
matrix.sqrt(a, method = "DB", maxiter = 50, tol = 1e-8)
a |
a square matrix. |
method |
the procedure used to obtain the square root. If |
maxiter |
the maximum number of iterations. Defaults to |
tol |
a numeric tolerance. |
A square root of a square matrix \bold{A} is obtained by solving the
equation \bold{X}^2 = \bold{A}, considering the Newton iteration proposed
by Denman and Beavers (1976), or alternatively is based on the Schur decomposition.
Denman, E.D., Beavers, A.N. (1976). The matrix sign function and computations in systems. Applied Mathematics and Computation 2, 63-94.
Higham, N.J. (1986). Newton's method for the matrix square root. Mathematics of Computation 46, 537-549.
Higham, N.J. (1986). Functions of Matrices: Theory and Computation. Society for Industrial and Applied Mathematics, Philadelphia.
a <- matrix(c(35,17,3,17,46,11,3,11,12), ncol = 3)
root <- matrix.sqrt(a) # 8 iterations
# just checking
root %*% root
root <- matrix.sqrt(a, method = "schur")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.