matrix.power | R Documentation |
This function computes the k-th power of order n square matrix x If k is zero, the order n identity matrix is returned. argument k must be an integer.
matrix.power(x, k)
x |
a numeric square matrix |
k |
a numeric exponent |
The matrix power is computed by successive matrix multiplications. If the exponent is zero, the order n identity matrix is returned. If the exponent is negative, the inverse of the matrix is raised to the given power.
An order n matrix.
Frederick Novomestky fnovomes@poly.edu
Bellman, R. (1987). Matrix Analysis, Second edition, Classics in Applied Mathematics, Society for Industrial and Applied Mathematics.
A <- matrix( c ( 1, 2, 2, 1 ), nrow=2, byrow=TRUE) matrix.power( A, -2 ) matrix.power( A, -1 ) matrix.power( A, 0 ) matrix.power( A, 1 ) matrix.power( A, 2 )
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.