A matrix function
extends a scalar function
to a square complex matrix
through its Jordan
canonical form (Higham 2008). Suppose
is analytic on an
open set containing all eigenvalues
of
. For a Jordan block
of size
, where
is the identity matrix
and
, define
If
is a Jordan matrix decomposition, apply
this rule to each Jordan block and set
. The result is independent of the choice
of Jordan basis. For a diagonalizable
matrix, only the values
at its eigenvalues
are needed. Nontrivial Jordan blocks also require
derivatives.
Equivalently, the Cauchy integral formula gives
where
consists of positively oriented, piecewise smooth, simple closed contours
with disjoint interiors enclosing all eigenvalues,
and
is analytic on and inside each contour
(Higham 2008, 2020). The matrix
is the resolvent
operator of
. This construction is a finite-dimensional
functional calculus. For a scalar polynomial,
it agrees with substitution of matrix powers. The
choice
gives the matrix exponential.
For numerical evaluation, a Schur decomposition reduces the problem to computing for an upper triangular
matrix
. Parlett (1976) derived an entrywise recurrence from
the commutation of
and
. The Schur-Parlett algorithm groups close eigenvalues
into diagonal blocks and computes the off-diagonal blocks by solving Sylvester
equations (Davies and Higham 2003). Higham and Liu (2021) give a multiprecision
version that uses only scalar function values.
For numerical evaluation of the matrix logarithm or a fractional matrix power, Hale et al. (2008) use a conformal map based on Jacobi elliptic functions and apply the trapezoidal rule to the transformed contour integral.