1. Introduction
Matrix functions are an important topic [
1,
2] due to their applications in many branches of applied mathematics, physics, statistics and engineering. In particular, the matrix exponential and its inverse, the matrix logarithm, appear in so many research fields that it would be almost impossible to collect all citations.
Computation methods for the principal value of the matrix logarithm can be found in several articles using different approaches. In [
3], an improvement of the inverse scaling and squaring method is shown; in [
4], an alternative formulation of the matrix arithmetic–geometric mean algorithm is used; in [
5], multiprecision algorithms are analyzed; in [
6], algorithms based on a numerical spectral decomposition or on a numerical Jordan decomposition are used; in [
7], algorithms based on the double exponential formula are used; and in [
8], an improved Taylor algorithm is applied.
However, the closest example to our approach is the paper by N. Hale, N.J. Higham, N.J. and L.N. Trefethen [
9], using functional analysis and contour integrals.
This approach was recently used by the authors in order to find the most common matrix functions, as the matrix roots [
10], the inverse of a matrix and in particular the inverse of a tridiagonal matrix [
11]. Previous articles were dedicated to the matrix exponential [
12,
13,
14], recalling that its definition by MacLaurin expansion is useless, since according to F.R. Gantmacher [
1] the exponential of a matrix
is just the matrix polynomial interpolating the exponential function on the spectrum of
.
In our opinion, this article goes beyond the results obtained in [
9] since in that article the representation formula of the resolvent in terms of the matrix invariants is missing. This equation can be found in an old book by S. Cherubino [
15]. Since this book is written in Italian, his knowledge probably escaped those authors.
Therefore, we are able to represent the logarithm of a non-singular complex matrix using the Dunford–Taylor integral and then apply Cauchy’s residue theorem if the matrix eigenvalues are known, or a simple circuit integral on a regular curve surrounding the spectrum, avoiding this knowledge.
This can be done since it is always possible to find a ray r coming out from the origin not intersecting the spectrum of and therefore to consider a regular curve surrounding all the eigenvalues and such that .
Of course, the obtained value of is independent of the used ray r, so that in order to introduce a multiple-valued logarithm, as in the case of complex numbers, it is necessary to define the argument of a matrix.
This was done in
Section 4.1, introducing two possible definitions for the argument of a matrix, depending on whether one assumes the scalar or matrix definition for the argument (the second definition holding in the space of commuting matrices). Then, several branches of the logarithm function can be considered, in a similar way to the complex variable function.
Of course, only the principal branch is often requested, and this is obtained in a trivial way provided that the matrix does not have real negative eigenvalues.
In the last section, some numerical experiments were made by the first author using the computer algebra program Mathematica©, confirming the effectiveness of the proposed method.
3. The Dunford–Taylor Integral
The Dunford–Taylor integral [
17,
18] is a classical tool in functional analysis. It is also ascribed to Frigyes Riesz [
19] and Luigi Fantappiè [
20].
This integral, for holomorphic functions of an operator, takes the place of Cauchy’s integral in function theory. In the finite dimensional case, the matrix is the operator under consideration. The result is as follows:
Theorem 1. Suppose that is a holomorphic function in a domain , containing all the eigenvalues of , and let be a closed piece-wise smooth curve with positive direction encircling all the eigenvalues.
Then, the matrix function is defined by the Dunford–Taylor integral:where denotes the resolvent of . The application of the Dunford–Taylor integral requires only the knowledge of matrix invariants, which are derived from matrix entries. Instead, to apply Cauchy’s residue theorem, it is mandatory to know the eigenvalues and their multiplicity. Therefore, the first technique is sometimes computationally more convenient.
In [
10], we have used the Dunford–Taylor integral in order to construct the roots of a non-singular complex matrix
according to the equation:
By using Equation (
5), Theorem 1 becomes
Theorem 2. Let be a holomorphic function in a domain , containing the spectrum of , and denote by a piece-wise smooth contour encircling the spectrum. Then, Equation (
6)
is written as Remark 1. From Cauchy’s bounds for the roots of polynomials [21,22], it immediately follows that, in case of the characteristic Equation (5), the highest (in modulus) eigenvalue is bounded byMaking the substitution in the polynomial (4), multiplying by and applying the Cauchy bound, we find the upper bound of the zeros of . Then, returning to the variable λ, we find the lower bound to the roots of , which is given byThese bounds can be used in order to construct the curve γ in Theorem 2. 3.1. The Case of Logarithm
Looking for the logarithm of a matrix , it is necessary for us to recall that the complex function is not holomorphic in the whole plane, but in an open set obtained by cutting the plane along a ray coming out from the origin. The inclination of this ray determines the branch of the logarithm. Cutting off the negative semi-axis we have the principal logarithm.
From the point of view of functional analysis, it can be said that the logarithm of a matrix only depends on the set of its eigenvalues. It is mandatory to assume that the matrix is invertible, meaning that the zero is not an eigenvalue. Assuming this condition, for any ray coming out from the origin which does not intersect the spectrum of
, it is possible to define the matrix
, which satisfies the defining condition
It is possible to define the principal value of
if and only if the matrix
does not have real negative eigenvalues; in particular, if the matrix is positive definite. In this case, a possible path for the
curve, encircling all eigenvalues, is given in
Figure 1.
Supposing the matrix
, is stable, so that there do not exist eigenvalues with a positive real part, and assuming that all eigenvalues are complex, it is possible to define the matrix
, using a curve
similar to that depicted in
Figure 2.
Remark 2. Apparently, once we have defined the ray coming out from the origin which does not intersect the spectrum of , the numerical entries of the corresponding matrix are independent of the considered ray, as Cauchy’s residue theorem or the Dunford–Taylor integral always give the same result. Therefore, from the point of view of functional analysis, the log function is unique.
In our opinion, in order to overcome this problem, it is necessary to define the argument of a matrix.
3.2. The Argument Definitions
Depending on whether the scalar or matrix definition for the argument is assumed, we can introduce the two following definitions, with the second one holding only for commuting matrices.
Definition 1. We define the scalar argument of a non-singular complex matrix as the argument θ of the determinant of :Then, we can write the matrix , taking into account its argument, in the form Considering another matrix
, whose argument is denoted by
, we find
and the argument of
is
, since
Note that, using this definition, the only matrices whose argument is indeterminate are the singular matrices, which are excluded in our approach.
Choosing a ray coming out from the origin and not intersecting the spectrum of , consider the logarithm of , according to Theorem 2.
Then, denoting by
the
unit matrix, since the diagonal matrix
commutes with
, we find
Definition 2. Considering the space of non-singular commuting matrices, we define the matrix modulus as and the matrix argument as . Even in this case, we findDenoting by the matrix , since the matrix commutes with , we find again that This gives the possibility of distinguishing the different branches of , since the log function becomes multiple-valued.
5. Conclusions
In preceding articles [
10,
11], we have shown that the Dunford–Taylor integral allows us to find the main holomorphic matrix functions of a non-singular complex matrix
provided that its invariants are known. In this paper, we considered the logarithm of
noting that even though the logarithm is not holomorphic throughout the plane, it is always possible to cut the plane along a ray
r that exits the origin and does not intersect the spectrum of
. Then, by fixing a piece-wise smooth closed curve surrounding all the eigenvalues of
and that does not intersect
r, we used the Dunford–Taylor integral to calculate
. This gives a single value for the logarithm, regardless of the considered ray. To find a multi-valued function for the logarithm, we have defined in two different ways the argument of a non-singular complex matrix
, depending on whether the scalar or the matrix definition for the argument is assumed (the second definition holding in the space of commuting matrices). This gives the different branches of the logarithm in a way similar to that existing for the theory of complex variables. The numerical experiments, contained in the last section and applied to matrices of the fifth, sixth and seventh order, confirm the validity of this approach.
It must be noticed that the algorithms used by Mathematica© are not publicly available, meaning that it was not possible to compare, from the point of view of computational complexity, the method we have used with other methods applied in the literature.