naginterfaces.library.matop.real_​gen_​matrix_​cond_​log

naginterfaces.library.matop.real_gen_matrix_cond_log(a)[source]

real_gen_matrix_cond_log computes an estimate of the relative condition number of the logarithm of a real matrix , in the -norm. The principal matrix logarithm is also returned.

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

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

Parameters
afloat, array-like, shape

The matrix .

Returns
afloat, ndarray, shape

The principal matrix logarithm, .

condlafloat

With the function exits successfully or = 3, an estimate of the relative condition number of the matrix logarithm, . Alternatively, if = 4, contains the absolute condition number of the matrix logarithm.

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

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

The relative condition number of the matrix logarithm can be defined by

where is the norm of the Fréchet derivative of the matrix logarithm at .

To obtain the estimate of , real_gen_matrix_cond_log first estimates by computing an estimate of a quantity , such that .

The algorithms used to compute and are based on a Schur decomposition, the inverse scaling and squaring method and Padé approximants. Further details can be found in Al–Mohy and Higham (2011) and Al–Mohy et al. (2012).

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