naginterfaces.library.matop.real_gen_matrix_frcht_log¶
- naginterfaces.library.matop.real_gen_matrix_frcht_log(a, e)[source]¶
real_gen_matrix_frcht_log
computes the Fréchet derivative of the matrix logarithm of the real matrix applied to the real matrix . The principal matrix logarithm is also returned.For full information please refer to the NAG Library document for f01jk
https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/f01/f01jkf.html
- Parameters
- afloat, array-like, shape
The matrix .
- efloat, array-like, shape
The matrix
- Returns
- afloat, ndarray, shape
The principal matrix logarithm, .
- efloat, ndarray, shape
The Fréchet derivative
- Raises
- NagValueError
- (errno )
On entry, .
Constraint: .
- (errno )
is singular so the logarithm cannot be computed.
- (errno )
has eigenvalues on the negative real line. The principal logarithm is not defined in this case;
complex_gen_matrix_frcht_log()
can be used to return a complex, non-principal log.- (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, the principal matrix logarithm is the unique logarithm whose spectrum lies in the strip .
The Fréchet derivative of the matrix logarithm of is the unique linear mapping such that for any matrix
The derivative describes the first order effect of perturbations in on the logarithm .
real_gen_matrix_frcht_log
uses the algorithm of Al–Mohy et al. (2012) to compute and . The principal matrix logarithm is computed using a Schur decomposition, a Padé approximant and the inverse scaling and squaring method. The Padé approximant is then differentiated in order to obtain the Fréchet derivative .
- References
Al–Mohy, A H and Higham, N J, 2011, Improved inverse scaling and squaring algorithms for the matrix logarithm, SIAM J. Sci. Comput. (34(4)), C152–C169
Al–Mohy, A H, Higham, N J and Relton, S D, 2012, Computing the Fréchet derivative of the matrix logarithm and estimating the condition number, SIAM J. Sci. Comput. (35(4)), C394–C410
Higham, N J, 2008, Functions of Matrices: Theory and Computation, SIAM, Philadelphia, PA, USA