# naginterfaces.library.matop.complex_​gen_​matrix_​frcht_​log¶

naginterfaces.library.matop.complex_gen_matrix_frcht_log(a, e)[source]

complex_gen_matrix_frcht_log computes the Fréchet derivative of the matrix logarithm of the complex matrix applied to the complex matrix . The principal matrix logarithm is also returned.

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

https://support.nag.com/numeric/nl/nagdoc_30.1/flhtml/f01/f01kkf.html

Parameters
acomplex, array-like, shape

The matrix .

ecomplex, array-like, shape

The matrix

Returns
acomplex, ndarray, shape

The principal matrix logarithm, . Alterntively, if = 2, a non-principal logarithm is returned.

ecomplex, ndarray, shape

With the function exits successfully or = 2 or 3, the Fréchet derivative

Raises
NagValueError
(errno )

On entry, .

Constraint: .

(errno )

is singular so the logarithm 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 logarithm is not defined in this case, so a non-principal logarithm was returned.

(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 .

complex_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 . If is nonsingular but has negative real eigenvalues, the principal logarithm is not defined, but complex_gen_matrix_frcht_log will return a non-principal logarithm and 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