naginterfaces.library.matop.real_​gen_​matrix_​pow

naginterfaces.library.matop.real_gen_matrix_pow(a, p)[source]

real_gen_matrix_pow computes the principal real power , for arbitrary , of a real matrix .

For full information please refer to the NAG Library document for f01eq

https://support.nag.com/numeric/nl/nagdoc_30.3/flhtml/f01/f01eqf.html

Parameters
afloat, array-like, shape

The matrix .

pfloat

The required power of .

Returns
afloat, ndarray, shape

The matrix th power, .

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

has eigenvalues on the negative real line. The principal th power is not defined. complex_gen_matrix_pow() can be used to find a complex, non-principal th power.

(errno )

is singular so the th power cannot be computed.

(errno )

An unexpected internal error occurred. This failure should not occur and suggests that the function has been called incorrectly.

Warns
NagAlgorithmicWarning
(errno )

has been computed using an IEEE double precision Padé approximant, although the arithmetic precision is higher than IEEE double precision.

Notes

For a matrix with no eigenvalues on the closed negative real line, () can be defined as

where is the principal logarithm of (the unique logarithm whose spectrum lies in the strip ).

is computed using the real version of the Schur–Padé algorithm described in Higham and Lin (2011) and Higham and Lin (2013).

The real number is expressed as where and . Then . The integer power is found using a combination of binary powering and, if necessary, matrix inversion. The fractional power is computed, entirely in real arithmetic, using a real Schur decomposition and a Padé approximant.

References

Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA

Higham, N J and Lin, L, 2011, A Schur–Padé algorithm for fractional powers of a matrix, SIAM J. Matrix Anal. Appl. (32(3)), 1056–1078

Higham, N J and Lin, L, 2013, An improved Schur–Padé algorithm for fractional powers of a matrix and their Fréchet derivatives, SIAM J. Matrix Anal. Appl. (34(3)), 1341–1360