naginterfaces.library.matop.real_gen_matrix_cond_pow¶
- naginterfaces.library.matop.real_gen_matrix_cond_pow(a, p)[source]¶
real_gen_matrix_cond_pow
computes an estimate of the relative condition number of the th power (where is real) of a real matrix , in the -norm. The principal matrix power is also returned.For full information please refer to the NAG Library document for f01je
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f01/f01jef.html
- Parameters
- afloat, array-like, shape
The matrix .
- pfloat
The required power of .
- Returns
- afloat, ndarray, shape
The principal matrix th power, .
- condpafloat
If the function exits successfully or = 3, an estimate of the relative condition number of the matrix th power, . Alternatively, if = 4, the absolute condition number of 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 in this case;
complex_gen_matrix_cond_pow()
can be used to find a complex, non-principal th power.- (errno )
is singular so the th power cannot be computed.
- (errno )
The relative condition number is infinite. The absolute condition number was returned instead.
- (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 ).
The Fréchet derivative of the matrix th power of is the unique linear mapping such that for any matrix
The derivative describes the first-order effect of perturbations in on the matrix power .
The relative condition number of the matrix th power can be defined by
where is the norm of the Fréchet derivative of the matrix power at .
real_gen_matrix_cond_pow
uses the algorithms of Higham and Lin (2011) and Higham and Lin (2013) to compute and . 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 using a Schur decomposition, a Padé approximant and the scaling and squaring method.To obtain an estimate of ,
real_gen_matrix_cond_pow
first estimates by computing an estimate of a quantity , such that . This requires multiple Fréchet derivatives to be computed. Fréchet derivatives of are obtained by differentiating the Padé approximant. Fréchet derivatives of are then computed using a combination of the chain rule and the product rule for Fréchet derivatives.
- 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