matrix.polynomial
Evaluates a real general matrix polynomial
Description
Given \(c_0,c_1,\dots,c_n\) coefficients of the polynomial and \(\mathbf{A}\) an \(n\) by \(n\) matrix. This function computes the matrix polynomial
\[\mathbf{B} = \sum\limits_{k=0}^n c_k\mathbf{A}^k,\]
using Horner's scheme, where \(\mathbf{A}^0 = \mathbf{I}\) is the \(n\) by \(n\) identity matrix.
Usage
Arguments
| Argument | Description |
|---|---|
a |
a numeric square matrix of order \(n\) by \(n\) for which the polinomial is to be computed. |
coef |
numeric vector containing the coefficients of the polinomial in order of increasing power. |
power |
a numeric exponent (which is forced to be an integer). If the exponent is zero, a multiple of the identity matrix is returned. |
Value
Returns an \(n\) by \(n\) matrix.