A matrix function is a rule that applies a scalar function to a square matrix.
For a scalar , expressions such as
are ordinary functions of one variable. For a square matrix , one may define analogous expressions:
Matrix functions are important because they let us transfer scalar functions into linear algebra. They appear in differential equations, Markov processes, control theory, numerical analysis, quantum mechanics, optimization, statistics, and graph theory. The matrix exponential, for example, is defined by a power series and is used to solve linear systems of differential equations.
72.1 Polynomial Functions of Matrices
The simplest matrix functions are polynomial functions.
Let
For a square matrix , define
The identity matrix appears in the constant term.
For example, if
then
This definition is purely algebraic. It uses only matrix addition, scalar multiplication, and matrix multiplication.
72.2 Powers as Matrix Functions
The function
gives the matrix function
Powers of matrices are basic in discrete dynamical systems. If
then
Thus the behavior of the system is controlled by the powers of .
When is diagonalizable, powers are especially simple. If
then
Since is diagonal, is obtained by raising each diagonal entry to the -th power.
72.3 Functions of Diagonal Matrices
Let
If is a scalar function defined at each , define
Thus a function of a diagonal matrix is obtained by applying the function entry by entry to the diagonal.
For example,
This diagonal rule is the model for the general theory.
72.4 Functions of Diagonalizable Matrices
Suppose is diagonalizable:
Then define
This definition says: change to an eigenvector basis, apply to each eigenvalue, then change back.
If
then
Therefore
For polynomial functions, this agrees with direct polynomial evaluation. If , then , and is obtained by applying to the diagonal entries.
72.5 Example: A Matrix Square
Let
This matrix has eigenvalues
One diagonalization is
where
Then
Since
we get
Thus powers of reduce to powers of its eigenvalues.
72.6 Matrix Exponential
The matrix exponential is one of the most important matrix functions.
For a square matrix , define
That is,
This series always converges for real or complex square matrices, so the matrix exponential is well-defined.
If is diagonalizable and
then
If
then
72.7 Matrix Exponential and Differential Equations
The matrix exponential solves constant-coefficient linear systems.
Consider
with initial condition
The solution is
This is the matrix analogue of the scalar equation
whose solution is
The matrix exponential is therefore the natural evolution operator for linear differential equations. It is commonly characterized as the solution operator for such systems.
72.8 Exponential of a Diagonalizable Matrix
Let
where
Then
Since
we have
This formula separates the solution into independent modes. Each eigenvalue contributes a scalar exponential factor.
If , that mode decays.
If , that mode grows.
If , that mode persists or oscillates.
72.9 Exponential of a Nilpotent Matrix
A matrix is nilpotent if
for some positive integer .
For such a matrix, the exponential series terminates:
All higher powers vanish.
For example, let
Then
Therefore
Nilpotent matrices explain the polynomial factors that occur in exponentials of Jordan blocks.
72.10 Functions of Jordan Blocks
Let
be a Jordan block, where is nilpotent.
For a polynomial or analytic function , the function of is obtained from the finite Taylor expansion
Here is the size of the Jordan block.
For the exponential function,
Since commutes with ,
This is the standard way to compute matrix functions through Jordan form. Matrix functions for Jordan blocks involve derivatives of the scalar function at the eigenvalue.
72.11 Matrix Functions and the Minimal Polynomial
The minimal polynomial controls matrix functions algebraically.
Suppose has degree . Every polynomial in can be reduced modulo to a polynomial of degree less than .
If
where
then
because
Thus polynomial functions of live in the finite-dimensional algebra
The Cayley-Hamilton theorem gives the weaker but always useful reduction to degree less than .
72.12 Interpolation Definition
For many functions, can be described by polynomial interpolation.
If is diagonalizable with distinct eigenvalues
choose a polynomial such that
for every .
Then define
This is well-defined: any two such polynomials differ by a polynomial that vanishes at all eigenvalues, and hence annihilates when is diagonalizable with those eigenvalues.
For non-diagonalizable matrices, interpolation must also match derivatives up to the sizes of the Jordan blocks. This is Hermite interpolation.
72.13 Matrix Square Roots
A matrix is a square root of if
We write
when a particular square root is chosen.
If is diagonalizable and
then a square root may be constructed by taking square roots of the eigenvalues:
where
This requires choosing square roots of the eigenvalues.
For symmetric positive semidefinite matrices, there is a unique symmetric positive semidefinite square root. This case is especially important in statistics, covariance matrices, optimization, and numerical analysis.
72.14 Matrix Logarithm
A matrix logarithm of is a matrix such that
We write
when a particular branch is chosen.
The matrix logarithm is more delicate than the exponential. It may not be unique, and existence depends on spectral conditions and the field.
If is diagonalizable and
then one may define
where
This requires choosing branches of the scalar logarithm for the eigenvalues.
The logarithm is important in Lie theory, differential equations, geometric integration, and matrix means.
72.15 Trigonometric Matrix Functions
Trigonometric functions can also be defined by power series.
For a square matrix ,
and
These definitions parallel the scalar power series.
Matrix trigonometric functions appear in oscillatory systems, wave equations, rotations, and second-order differential equations.
A general matrix function theory includes exponential, logarithmic, square root, and trigonometric functions, often using power series or spectral definitions.
72.16 Commuting Matrices
For scalars,
For matrices, this identity requires commutation.
If
then
If and do not commute, this equality may fail. This is one of the main differences between scalar functions and matrix functions. The exponential identity holds for commuting matrices, but not in general.
Similarly, many scalar identities become conditional in matrix algebra because multiplication is not commutative.
72.17 Functions Preserve Similarity
Matrix functions are compatible with similarity.
If
then for any polynomial ,
The same relation holds for matrix functions defined by power series or spectral calculus:
Thus similar matrices have similar matrix functions.
This is essential because a matrix function should describe the underlying linear transformation, not the accidental choice of basis.
72.18 Spectral Mapping
For many standard matrix functions, eigenvalues transform according to the scalar function.
If
then for a polynomial ,
Thus is also an eigenvector of , with eigenvalue .
More generally, when is defined through an appropriate functional calculus, the eigenvalues of are
where ranges over the eigenvalues of , with multiplicities handled according to the chosen setting.
This principle is called spectral mapping.
72.19 Matrix Functions of Normal Matrices
If is normal over , then
with unitary and diagonal.
For such matrices,
This is the cleanest setting for matrix functions. The unitary matrix preserves norms and inner products, so the computation is stable and geometrically transparent.
Hermitian matrices, unitary matrices, and real symmetric matrices are important special cases.
For a Hermitian matrix, if is real-valued on the spectrum, then is Hermitian.
For a positive definite Hermitian matrix, functions such as
are especially well behaved.
72.20 Numerical Computation
Computing matrix functions numerically is a separate problem from defining them.
For small diagonalizable matrices, an eigenvalue decomposition may be convenient. For symmetric or Hermitian matrices, unitary diagonalization is often stable.
For general matrices, eigenvalue methods may be unstable, especially near repeated eigenvalues or defective matrices. Practical algorithms often use Schur decomposition, scaling and squaring, Padé approximants, Krylov methods, or specialized iterative methods.
For the matrix exponential, common numerical approaches include scaling and squaring with Padé approximation, Taylor methods, and methods based on Schur decomposition. General-purpose methods vary in stability depending on the matrix class.
72.21 Applications
Matrix functions appear whenever a scalar transformation must act on a linear operator.
| Function | Typical use |
|---|---|
| Discrete dynamics, Markov chains | |
| Linear differential equations | |
| Covariance matrices, positive definite geometry | |
| Lie groups, matrix means, geometric integration | |
| Oscillatory systems | |
| Regularization, resolvents | |
| for graph Laplacian | Graph filters, diffusion, spectral methods |
The common idea is that the matrix represents a linear transformation, and the function changes its spectral behavior.
72.22 Common Errors
The first common error is to apply a scalar function entrywise to a general matrix. For example,
usually does not mean exponentiating each entry of . Entrywise exponentiation is a different operation.
The second common error is to assume scalar identities always hold. Matrix multiplication is noncommutative, so identities such as
need commutation.
The third common error is to ignore the spectrum. Functions such as and depend on eigenvalues and branch choices.
The fourth common error is to diagonalize numerically without checking conditioning. A matrix may be diagonalizable in theory but poorly conditioned in practice.
The fifth common error is to confuse the characteristic polynomial with the minimal polynomial. The minimal polynomial gives the sharper algebraic reduction for functions of .
72.23 Summary
A matrix function applies a scalar function to a square matrix.
For polynomials,
For diagonalizable matrices,
gives
For Jordan blocks, derivatives of enter through the nilpotent part.
The matrix exponential is defined by
and it solves linear systems of differential equations.
Matrix functions generalize powers, exponentials, square roots, logarithms, and trigonometric functions to linear transformations. They are controlled by eigenvalues, minimal polynomials, Jordan structure, and similarity.