is computed using a spectral factorization of
where
is the diagonal matrix whose diagonal elements,
, are the eigenvalues of
, and
is an orthogonal matrix whose columns are the eigenvectors of
.
is then given by
where
is the diagonal matrix whose
th diagonal element is
. See for example Section 4.5 of
Higham (2008).
is assumed to be real.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
X04AAF).
Provided that
can be computed accurately then the computed matrix function will be close to the exact matrix function. See Section 10.2 of
Higham (2008) for details and further discussion.
The cost of the algorithm is
plus the cost of evaluating
. If
is the
th computed eigenvalue of
, then the user-supplied subroutine
F will be asked to evaluate the function
at
,
.
For further information on matrix functions, see
Higham (2008).
F01FFF can be used to find the matrix function
for a complex Hermitian matrix
.
This example finds the matrix cosine,
, of the symmetric matrix