In mathematics, a logarithm of a matrix is another matrix such that the matrix exponential of the latter matrix equals the original matrix. It is thus a generalization of the scalar logarithm and in some sense an inverse function of the matrix exponential. Not all matrices have a logarithm and those matrices that do have a logarithm may have more than one logarithm. The study of logarithms of matrices leads to Lie theory since when a matrix has a logarithm then it is in an element of a Lie group and the logarithm is the corresponding element of the vector space of the Lie algebra.
Definition The exponential of a matrix A is defined by
eA≡∑n=0∞Ann!. Given a matrix B, another matrix A is said to be a matrix logarithm of B if eA=B. Because the exponential function is not bijective for complex numbers (e.g. eπi=e3πi=−1), numbers can have multiple complex logarithms, and as a consequence of this, some matrices may have more than one logarithm, as explained below. If the matrix logarithm of B exists, then it is written as logB, in which case elogB=B.
Power series expression If B is sufficiently close to the identity matrix, then a logarithm of B may be computed by means of the power series
log(B)=log(I+(B−I))=∑k=1∞(−1)k+1k(B−I)k=(B−I)−(B−I)22+(B−I)33−⋯, which can be rewritten as
log(B)=−∑k=1∞(I−B)kk=−(I−B)−(I−B)22−(I−B)33−⋯. Specifically, if ‖I−B‖<1, then the preceding series converges and elog(B)=B.
Example: Logarithm of rotations in the plane The rotations in the plane give a simple example. A rotation of angle α around the origin is represented by the 2×2 matrix
A=(cos(α)−sin(α)sin(α)cos(α)). For any integer n, the matrix
Bn=(α+2πn)(0−110), is a logarithm of A.
Thus, the matrix A has infinitely many logarithms. This corresponds to the fact that the rotation angle is only determined up to multiples of 2π. In the language of Lie theory, the rotation matrices A are elements of the Lie group SO(2). The corresponding logarithms B are elements of the Lie algebra 𝔰𝔬(2), which consists of all skew-symmetric matrices. The matrix
(01−10) is a generator of this Lie algebra.
Existence The question of whether a matrix has a logarithm has the easiest answer when considered in the complex setting. A complex matrix has a logarithm if and only if it is invertible. The logarithm is not unique, but if a matrix has no negative real eigenvalues, then there is a unique logarithm that has eigenvalues all lying in the strip {z∈ℂ | −π<𝐼𝑚 z<π}. This logarithm is known as the principal logarithm. The answer is more involved in the real setting. A real matrix has a real logarithm if and only if it is invertible and each Jordan block belonging to a negative eigenvalue occurs an even number of times. If an invertible real matrix does not satisfy the condition with the Jordan blocks, then it has only non-real logarithms. This can already be seen in the scalar case: no branch of the logarithm can be real at −1. The existence of real matrix logarithms of real 2×2 matrices is considered in a later section.
Properties If A and B are both positive-definite matrices, then
trlog(AB)=trlog(A)+trlog(B). Suppose that A and B commute, meaning that AB=BA. Then
log(AB)=log(A)+log(B) if and only if arg(μj)+arg(νj)∈(−π,π], where μj is an eigenvalue of A and νj is the corresponding eigenvalue of B. In particular, log(AB)=log(A)+log(B) when A and B commute and are both positive-definite. Setting B=A−1 in this equation yields
log(A−1)=−log(A). For A and B regardless of whether they commute, one can show that
log(A+tB)=log(A)+t∫0∞ (A+zI)−1B(A+zI)−1 dz−t2∫0∞ (A+zI)−1B(A+zI)−1B(A+zI)−1 dz+t3∫0∞ (A+zI)−1B(A+zI)−1B(A+zI)−1B(A+zI)−1 dz−⋯. Richter's formula for the logarithm of a matrix is log(A)=log(z(A−I)+I)II|z=0z=1=(A−I)∫01[z(A−I)+I]−1dz.
Further example: Logarithm of rotations in 3D space A rotation R∈SO(3) in ℝ3 is given by a 3×3 orthogonal matrix. The logarithm of such a rotation matrix R can be readily computed from the antisymmetric part of Rodrigues' rotation formula, explicitly in Axis angle. It yields the logarithm of minimal Frobenius norm, but fails when R has eigenvalues equal to −1 where this is not unique. Further note that, given rotation matrices A and B,
dg(A,B):=‖log(ATB)‖F is the geodesic distance on the 3D manifold of rotation matrices.
Calculating the logarithm of a diagonalizable matrix A method for finding logA for a diagonalizable matrix A is the following:
Find the matrix V of eigenvectors of A (each column of V is an eigenvector of A). Find the inverse V−1 of V. Let A′=V−1AV. Then A′ will be a diagonal matrix whose diagonal elements are eigenvalues of A. Replace each diagonal element of A′ by its (natural) logarithm in order to obtain logA′. Then logA=V(logA′)V−1. That the logarithm of A might be a complex matrix even if A is real then follows from the fact that a matrix with real and positive entries might nevertheless have negative or even complex eigenvalues (this is true for example for rotation matrices). The non-uniqueness of the logarithm of a matrix follows from the non-uniqueness of the logarithm of a complex number.
Logarithm of a non-diagonalizable matrix The algorithm illustrated above does not work for non-diagonalizable matrices, such as
[1101]. For such matrices one needs to find its Jordan decomposition and, rather than computing the logarithm of diagonal entries as above, one would calculate the logarithm of the Jordan blocks. The latter is accomplished by noticing that one can write a Jordan block as
B=(λ100⋯00λ10⋯000λ1⋯0⋮⋮⋮⋱⋱⋮0000λ100000λ)=λ(1λ−100⋯001λ−10⋯0001λ−1⋯0⋮⋮⋮⋱⋱⋮00001λ−1000001)=λ(I+K) where K is a matrix with zeros on and under the main diagonal. (The number λ is nonzero by the assumption that the matrix whose logarithm one attempts to take is invertible.) Then, by the Mercator series
log(1+x)=x−x22+x33−x44+⋯ one gets
logB=log(λ(I+K))=log(λI)+log(I+K)=(logλ)I+K−K22+K33−K44+⋯ This series has a finite number of terms (Km is zero if m is equal to or greater than the dimension of K), and so its sum is well-defined. Example. Using this approach, one finds
log[1101]=[0100], which can be verified by plugging the right-hand side into the matrix exponential: exp[0100]=I+[0100]+12[0100]2⏟=0+⋯=[1101].
… excerpt ends here. Continue reading the full article.