naginterfaces.library.matop.complex_gen_matrix_cond_pow¶
- naginterfaces.library.matop.complex_gen_matrix_cond_pow(a, p)[source]¶
complex_gen_matrix_cond_pow
computes an estimate of the relative condition number of the th power (where is real) of a complex matrix , in the -norm. The principal matrix power is also returned.For full information please refer to the NAG Library document for f01ke
https://support.nag.com/numeric/nl/nagdoc_30.2/flhtml/f01/f01kef.html
- Parameters
- acomplex, array-like, shape
The matrix .
- pfloat
The required power of .
- Returns
- acomplex, ndarray, shape
The principal matrix th power, , unless = 1, in which case a non-principal th power is returned.
- 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 )
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 eigenvalues on the negative real line. The principal th power is not defined in this case, so a non-principal power was returned.
- (errno )
has been computed using an IEEE double precision Padé approximant, although the arithmetic precision is higher than IEEE double precision.
- (errno )
The relative condition number is infinite. The absolute condition number was returned instead.
- 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 .
complex_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 the estimate of ,
complex_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.If is nonsingular but has negative real eigenvalues
complex_gen_matrix_cond_pow
will return a non-principal matrix th power and its condition number.
- 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