Abstract
We present new closed-form formulas for the matrix logarithm. Our method is direct and elementary, and it gives tractable and manageable formulas not current in the extensive literature on this essential subject. Using these results, an elegant explicit formula for the principal matrix logarithm can be obtained. Several special cases and examples are stated to illustrate the method presented in this paper.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1. Introduction
The matrix logarithm appears in many parts of mathematics, applied natural sciences, and engineering. It has many applications in the study of systems theory and has received much interest in control theory (see [1], [2], and references therein).
If a matrix \(A\) has no eigenvalues on the closed negative real axis \(\mathbb{R}^{-}\), then \(A\) has a unique logarithm with eigenvalues in the set \(\lbrace z\in \mathbb{C}/-\pi<\operatorname{Im}(z)<\pi\rbrace\). This unique logarithm is called the principal logarithm of \(A\). This logarithm is of great interest and is needed in many applications.
While there are various methods for the computation of the matrix exponential, relatively few ones exist for the matrix logarithm. The exact computation of the matrix logarithm encounters considerable difficulties. Most of the methods presented for computing the matrix logarithm are approximation methods [1], [2], [3], [4].
Our motivation comes from the fact that few papers have considered exhibiting concise formulas for the matrix logarithm. It is important to point out that other methods for computing the matrix logarithm require advanced theory such as matrix square roots, Schur decompositions, and Padé approximants (see [1], [2], [5], [6], and references therein). It should be noted that there are few algorithms for computing logarithms of matrices (see, e.g., [3], [7]). Recently, Miyajima [8] proposed algorithms for numerically computing interval matrices containing the principal matrix logarithm.
In a previous work, the first-named author of this paper presented a method that, given a \(\mathcal{P}\)-canonical form of an arbitrary nonsingular \(k\times k\) matrix \(A\) with eigenvalues \(\alpha_{1},\ldots,\alpha_{k}\), permits easily obtaining both the logarithm \(B\) of \(A\) whose eigenvalues can be arbitrarily chosen in advance as \(\log(\alpha_{1}),\ldots,\log(\alpha_{k})\) and one of its \(\mathcal{P}\)-canonical forms (see Mouçouf [9]). This result is a key for obtaining our matrix logarithm formulas.
We propose simple, direct, and concise formulas to compute the logarithms and the principal logarithm of matrices without any restrictions on the norm. We note that the Putzer matrix representation of the logarithm of complex matrices [1] or real matrices [5] requires the exact computations of some rational integrals.
We also note that in the recent paper [6] the authors were interested in developing an exact computation for the principal logarithm of matrices. More precisely, under some conditions on the norm, they exactly compute the principal matrix logarithm, but in this method it is necessary to solve a system of linear recursion equations, determine the Fibonacci–Hörner decomposition of the matrix, and study the properties of generalized Fibonacci sequences and the corresponding Binet formula. In addition, their approach requires laborious calculations of some functions.
Contrary to these papers and many other papers on this subject, our method does not require any cumbersome and laborious calculations. Additionally, our approach is general. The attractive feature of our method lies in the possibility of choosing the eigenvalues of logarithms of a matrix in advance and hence easily finding the principal logarithm of matrices.
Let \(\alpha_{1},\alpha_{2},\ldots,\alpha_{s}\) be distinct elements of \(\mathbb{C}\) and \(m_{1},m_{2},\ldots,m_{s}\) be nonnegative integers. For a nonconstant polynomial \(P(x)=(x-\alpha_{1})^{m_{1}}(x-\alpha_{2})^{m_{2}}\cdots(x-\alpha_{s})^{m_{s}}\) of degree \(n\), by \(L_{jk_{j}}(x)[P]\) we denote the polynomial
where \(1\leq j \leq s\), \(0\leq k_{j} \leq m_{j}-1\),
and
Here \(g^{(i)}_{j}(x)\) is the \(i\)th derivative of \(g_{j}(x)\).
These polynomials are of great importance; they were used in [10] for computing the inverse of the confluent Vandermonde matrix and in [11] for computing the matrix exponential, and they are used here to compute the logarithm of matrices.
2. Explicit Formulas for Logarithms of Matrices
In this section, we derive some explicit and elegant formulas for logarithms of matrices with the aid of Theorem 4.1 in [9].
Let us start by stating the following result needed in the sequel.
Theorem 1.
Let \(A\) be a \(k\times k\) matrix, and let \(\chi_{A}(x)=(x-\alpha_{1})^{m_{1}}(x-\alpha_{2})^{m_{2}}\cdots(x-\alpha_{s})^{m_{s}}\) , \(\alpha_{1}=0\) , be its characteristic polynomial (where one possibly has \(m_{1}=0\) ). Then
for every \(n\in \mathbb{N}\) , where \(B_{jk_{j}}=L_{jk_{j}}(A)[\chi_{A}]\) and \(\delta_{nj}\) is the Kronecker symbol.
Proof.
Using Theorem \(2.9\) in [11], we can readily prove this result.
Theorem 2.
Let \(A\) be a \(k\times k\) nonsingular matrix, and let
be its characteristic polynomial, where \(\alpha_{1}=e^{\beta_{1}},\ldots,\alpha_{s}=e^{\beta_{s}}\) . Then the matrix
where \(B_{jk_{j}}=L_{jk_{j}}(A)[\chi_{A}]\) , is a logarithm of \(A\) .
Proof.
By Theorem 1,
for all \(n\in \mathbb{N}\). If we insert \(t\) into this formula for \(n\), we obtain the smooth matrix function
Since
for all positive integer \(j\), it follows that the derivative at \(0\) of the function \(\binom{t}{j}\) is
Consequently, using the convention that \(\binom{t}{0}=1\), we obtain
Then the conclusion follows from Theorem 4.1 in [9].
As an illustration of Theorem 2, consider the following example.
Example 1.
Let
The characteristic polynomial of \(A\) is \(\chi_{A}(x)=(x-3)^{2}(x-2)\).
Applying formula (1), we find that
is the principal logarithm of \(A\), where
A simple calculation gives
Finally, we obtain
Corollary 1.
If \(A\) is a nonsingular matrix and \(\chi_{A}(x)=(x-\alpha_{1})(x-\alpha_{2})\cdots(x-\alpha_{k})\) is its characteristic polynomial with distinct roots \(\alpha_{1}=e^{\beta_{1}},\ldots, \alpha_{k}=e^{\beta_{k}}\) , then the matrix
where \(B_{j}=\prod\limits_{i=1,i\neq j}^{k}\dfrac{1}{\alpha_{j}-\alpha_{i}}(A-\alpha_{i}I)\) , is a logarithm of \(A\) .
Proof.
This is a straightforward consequence of Theorem 2 and the fact that
under the assumptions of the corollary.
Example 2.
To illustrate the previous corollary, we consider the same matrix as in [6],
The characteristic polynomial of \(A\) is
Let
It is clear that the eigenvalues of \(A\) are all not in \(\mathbb{R}^{-}\), and hence the principal logarithm of \(A\) exists. To obtain this logarithm, we must take the principal logarithms of \(\alpha_{1}\), \(\alpha_{2}\), and \(\alpha_{3}\), which are \(0\), \(\ln\frac{\sqrt{5}}{4}+i\arctan\frac{1}{2}\), and \(\ln\frac{\sqrt{5}}{4}-i\arctan\frac{1}{2}\), respectively. Applying the previous result, we find that
is the principal logarithm of \(A\), where
A simple calculation gives
Substituting \(B_{2}\), \(B_{3}\), \(\beta_{2}\) and \(\beta_{3}\) by their values in (2), we obtain
Remark 1.
Let \(A\) be a nonsingular matrix of order \(2\), and let and \(\alpha_{1}\) and \(\alpha_{2}\) be its eigenvalues.
-
(1)
If \(\alpha_{1}\neq \alpha_{2},\) then \(\log(A)=\dfrac{\log(\alpha_{1})-\log(\alpha_{2})}{\alpha_{1}-\alpha_{2}}A+ \dfrac{\alpha_{1} \log(\alpha_{2})- \alpha_{2}\log(\alpha_{1})}{\alpha_{1}-\alpha_{2}}I\).
-
(2)
If \(\alpha_{1}=\alpha_{2}=\alpha,\) then \(\log(A)=\dfrac{1}{\alpha}A+(\log(\alpha)-1)I\).
Corollary 2.
If \(A\) is a nonsingular matrix with characteristic polynomial \(\chi_{A}(x)=(x-\alpha)^{k}\) , \(\alpha=e^{\beta}\) , then the matrix
where \(B_{j}=(A-\alpha I)^{j}\) , is a logarithm of \(A\) .
Proof.
The proof readily follows from Theorem 2.
Example 3.
For any complex number \(a\), let us calculate the logarithm of the matrix
The characteristic polynomial of \(A(a)\) is \(\chi_{A(a)}(x)=(x-1)^{k}\).
In this example, we have \(\alpha=e^{0}\). Applying the previous result, we find that
is the principal logarithm of \(A(a)\). We have
It is easily seen that
Thus,
The \((l,q)\)th entry of the matrix \(A(ia)\) is
Therefore,
According to Euler’s formula [12], we have
Thus, the principal logarithm of \(A(a)\) is
The following interesting corollaries are a consequence of Theorem 2.
Corollary 3.
If \(\chi_{A}(x)=(x-\alpha_{1})^{m_{1}}(x-\alpha_{2})^{m_{2}}\) , where \(\alpha_{1}=e^{\beta_{1}}\) and \(\alpha_{2}=e^{\beta_{2}}\) are two distinct nonzero complex numbers, then the matrix
is a logarithm of \(A\) , where
Corollary 4.
If \(\chi_{A}(x)=(x-\alpha_{1})^{m_{1}}(x-\alpha_{2})\) , where \(\alpha_{1}=e^{\beta_{1}}\) and \(\alpha_{2}=e^{\beta_{2}}\) are two distinct nonzero complex numbers, then the matrix
is a logarithm of \(A\) , where
More generally, we have the following result.
Corollary 5.
If \(\chi_{A}(x)=(x-\alpha_{1})^{m_{1}}\prod\limits_{j=2}^{s}(x-\alpha_{j})\) , where \(\alpha_{1}=e^{\beta_{1}},\ldots, \alpha_{s}=e^{\beta_{s}}\) are distinct nonzero complex numbers, then the matrix
is a logarithm of \(A\) , where \(P=\chi_{A},\)
and
Example 4.
We now illustrate this case by computing the principal logarithm of the matrix
The characteristic polynomial of \(A\) is \(\chi_{A}(x)=(x-1)^{3}(x-2)(x-4)\).
Using the result of the previous corollary, we find that the matrix
is the principal logarithm of \(A\). On the other hand, one can easily verify that
Thus, the principal logarithm of \(A\) is
3. Conclusions
We have presented a new and elegant method to facilitate the computation of the matrix logarithm. Moreover, by using our method we provide explicit and concise formulas for the computation of the logarithm of an arbitrary complex matrix \(A\). Also, we can readily obtain simpler explicit formulas for the principal matrix logarithm.
Conflict of Interest
No potential conflicts of interest are reported by the authors.
References
C. D. Ahlbrandt and J. Ridenhour, “Floquet theory for time scales and Putzer representations of matrix logarithms,” J. Differ. Equ. Appl. 9, 77–92 (2003).
N. J. Higham, Functions of Matrices: Theory and Applications (SIAM-Philadelphia, 2008), Vol. 18.
S. H. Cheng, N. J. Higham, C. S. Kenney, and A. J. Laub, “Approximating the logarithm of a matrix to specified accuracy,” SIAM. J. Matrix. Anal. Appl. 22, 1112–1125 (2001).
C. S. Kenney and A. J. Laub, “Condition estimates for matrix functions,” SIAM. J. Matrix. Anal. Appl. 10, 191–209 (1989).
J. R. Cardoso, “An explicit formula for the matrix logarithm,” S. Afr. Optom. 64, 80–83 (2005).
J. A. Marrero, R. B. Taher, and M. Rachidi, “On explicit formulas for the principal matrix logarithm,” Appl. Math. Comput. 220, 142–148 (2013).
A. H. Al-Mohy and N. J. Higham, “Improved inverse scaling and squaring algorithms for the matrix logarithm,” SIAM. J. Sci. Comput. 34, C153–C169 (2012).
S. Miyajima, “Verified computation for the matrix principal logarithm,” Linear Algebra Appl. 569, 38–61 (2019).
M. Mouçouf, An Explicit Expression for the Minimal Polynomial of the Kronecker Product of Matrices. Explicit Formulas for Matrix Logarithm and Matrix Exponential, arXiv: 2010.11873v3
M. Mouçouf and S. Zriaa, “A new approach for computing the inverse of confluent Vandermonde matrices via Taylor’s expansion,” Linear Multilinear Algebra 70, 5973–5986 (2022).
M. Mouçouf and S. Zriaa, “Explicit formulas for the matrix exponential,” Boletim da Sociedade Paranaense de Matemática. 41, 1–14 (2023).
H. W. Gould, “Euler’s formula for the nth differences of powers,” Amer. Math. Monthly 85, 450–467 (1978).
Acknowledgments
The authors wish to express gratitude to the referee for carefully reading the manuscript.
Author information
Authors and Affiliations
Corresponding author
Rights and permissions
About this article
Cite this article
Mouçouf, M., Zriaa, S. Explicit Formulas for the Matrix Logarithm and the Principal Matrix Logarithm. Math Notes 113, 406–413 (2023). https://doi.org/10.1134/S0001434623030094
Received:
Revised:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1134/S0001434623030094