is computed using the Schur–Parlett algorithm for the matrix logarithm described in
Higham (2008) and
Davies and Higham (2003).
Davies P I and Higham N J (2003) A Schur–Parlett algorithm for computing matrix functions. SIAM J. Matrix Anal. Appl. 25(2) 464–485
- NE_ALLOC_FAIL
Allocation of memory failed. If has real eigenvalues then up to of double allocatable memory may be required. Otherwise up to of Complex allocatable memory may be required.
- NE_BAD_PARAM
On entry, argument had an illegal value.
- NE_EIGENVALUES
was found to have eigenvalues on the closed, negative real line. The principal logarithm cannot be calculated in this case.
- NE_INT
On entry, .
Constraint: .
- NE_INT_2
On entry, and .
Constraint: .
- NE_INTERNAL_ERROR
An internal error has occurred in this function. Check the function call and any array sizes. If the call is correct then please contact
NAG for assistance.
An unexpected internal error occured when ordering the eigenvalues of
. Please contact
NAG.
Computation of the square root of a submatrix failed.
Note: this failure should not occur and suggests that the function has been called incorrectly.
There was an error whilst reordering the Schur form of .
Note: this failure should not occur and suggests that the function has been called incorrectly.
There was a problem obtaining the weights and nodes from the Gaussian quadrature function
nag_quad_1d_gauss_wgen (d01tcc). For details refer to
nag_quad_1d_gauss_wgen (d01tcc),
.
The routine was unable to compute the Schur decomposition of .
Note: this failure should not occur and suggests that the function has been called incorrectly.
- NE_SINGULAR
The linear equations to be solved are nearly singular and the Padé approximant may have no correct figures.
Note: this failure should not occur and suggests that the function has been called incorrectly.
For a normal matrix
(for which
), the Schur decomposition is diagonal and the algorithm reduces to evaluating the logarithm of the eigenvalues of
and then constructing
using the Schur vectors. See Section 9.4 of
Higham (2008) for details and further discussion.
For discussion of the condition of the matrix logarithm see Section 11.2 of
Higham (2008). In particular, the condition number of the logarithm of
is bounded below by the inequality
where
is the condition number of
. Further, the sensitivity of the computation of
is worst when
has an eigenvalue of very small modulus, or has a complex conjugate pair of eigenvalues lying close to the negative real axis.
The cost of the algorithm is
floating-point operations. The exact cost depends on the eigenvalue distribution of
; see Algorithm 11.11 of
Higham (2008).
nag_matop_complex_gen_matrix_log (f01fjc) can be used to find the principal logarithm of a complex matrix.
This example finds the principal matrix logarithm of the matrix