A logarithm of a square matrix is a matrix such that , where is the matrix exponential. Just as in the scalar case, the matrix logarithm is not unique, since if then for any integer . However, for matrices the nonuniqueness is complicated by the presence of repeated eigenvalues. For example, the matrix
is an upper triangular logarithm of the identity matrix for any , whereas the obvious logarithms are the diagonal matrices , for integers , , and . Notice that the repeated eigenvalue of has been mapped to the distinct eigenvalues , , and in . This is characteristic of nonprimary logarithms, and in some applications such strange logarithms may be required—an example is the embeddability problem for Markov chains.
An important question is whether a nonsingular real matrix has a real logarithm. The answer is that it does if and only if the Jordan canonical form contains an even number of Jordan blocks of each size for every negative eigenvalue. This means, in particular, that if has an unrepeated negative eigenvalue then it does not have a real logarithm. Minus the identity matrix has a real logarithm for even but not for odd . Indeed, for ,
satisfies , as does for any nonsingular , since .
For most practical purposes it is the principal logarithm that is of interest, defined for any matrix with no negative real eigenvalues as the unique logarithm whose eigenvalues lie in the strip . From this point on we assume that has no negative eigenvalues and that the logarithm is the principal logarithm.
Various explicit representations of the logarithm are available, including
where the spectral radius . A useful relation is for , with important special cases and (where the square root is the principal square root). Recurring the latter expression gives, for any positive integer ,
This formula is the basis for the inverse scaling and squaring method for computing the logarithm, which chooses so that is small enough that can be efficiently approximated by Padé approximation. The MATLAB function
logm uses the inverse scaling and squaring method together with a Schur decomposition.
This references contains more on the facts above, as well as further references.
- Nicholas J. Higham, Functions of Matrices: Theory and Computation, Society for Industrial and Applied Mathematics, Philadelphia, PA, USA, 2008.