is computed using a spectral factorization of
where
is the real diagonal matrix whose diagonal elements,
, are the eigenvalues of
,
is a unitary matrix whose columns are the eigenvectors of
and
is the conjugate transpose 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
.
For further information on matrix functions, see
Higham (2008).
F01EFF can be used to find the matrix function
for a real symmetric matrix
.
This example finds the matrix cosine,
, of the Hermitian matrix