# matrixpower

0th

Percentile

##### Power of a Matrix

Evaluate a specified power of a matrix.

Keywords
algebra, array
##### Usage
matrixpower(x, power, complexOK = TRUE)
matrixsqrt(x, complexOK = TRUE)
matrixinvsqrt(x, complexOK = TRUE)
##### Arguments
x

A square matrix containing numeric or complex values.

power

A numeric value giving the power (exponent) to which x should be raised.

complexOK

Logical value indicating whether the result is allowed to be complex.

##### Details

These functions raise the matrix x to the desired power: matrixsqrt takes the square root, matrixinvsqrt takes the inverse square root, and matrixpower takes the specified power of x.

Up to numerical error, matrixpower(x, 2) should be equivalent to x %*% x, and matrixpower(x, -1) should be equivalent to solve(x), the inverse of x.

The square root y <- matrixsqrt(x) should satisfy y %*% y = x. The inverse square root z <- matrixinvsqrt(x) should satisfy z %*% z = solve(x).

Computations are performed using the eigen decomposition (eigen).

##### Value

A matrix of the same size as x containing numeric or complex values.

eigen, svd

##### Aliases
• matrixpower
• matrixsqrt
• matrixinvsqrt
##### Examples
# NOT RUN {
x <- matrix(c(10,2,2,1), 2, 2)
y <- matrixsqrt(x)
y
y %*% y
z <- matrixinvsqrt(x)
z %*% y
matrixpower(x, 0.1)
# }

Documentation reproduced from package spatstat, version 1.49-0, License: GPL (>= 2)

### Community examples

Looks like there are no examples yet.