Mathwords logoMathwords

Logarithm of a Matrix — Definition, Formula & Example

The logarithm of a matrix is a matrix BB that undoes matrix exponentiation: raising ee to the matrix power BB gives back the original matrix AA. It is not found by taking the logarithm of each entry.

Let AA be an n×nn \times n complex matrix. A matrix BB is a logarithm of AA if eB=Ae^{B} = A, where eB=∑k=0∞Bkk!e^{B} = \sum_{k=0}^{\infty} \frac{B^k}{k!}. A logarithm exists if and only if AA is invertible, and it is generally not unique. If AA has no eigenvalues on the closed negative real axis (−∞,0](-\infty, 0], there is a unique principal logarithm log⁡A\log A whose eigenvalues all have imaginary parts strictly between −π-\pi and π\pi.

Key Formula

log⁡(I+X)=X−X22+X33−⋯=∑k=1∞(−1)k+1Xkk\log(I + X) = X - \frac{X^2}{2} + \frac{X^3}{3} - \cdots = \sum_{k=1}^{\infty} \frac{(-1)^{k+1} X^k}{k}
Where:
  • II = The n×nn \times n identity matrix
  • XX = An n×nn \times n matrix with spectral radius less than 1 (every eigenvalue has absolute value below 1), so the series converges to the principal logarithm of I+XI + X
  • kk = The summation index, a positive integer

Worked Example

Problem: Find the principal logarithm of A=[1201]A = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix}.
Step 1: Write AA as the identity plus a matrix NN. Both eigenvalues of AA equal 1, so the principal logarithm exists.
A=I+N,N=[0200]A = I + N, \quad N = \begin{bmatrix} 0 & 2 \\ 0 & 0 \end{bmatrix}
Step 2: Compute N2N^2. It is the zero matrix, so every term of the series after the first vanishes.
N2=[0000]  ⟹  log⁡A=N−N22+⋯=NN^2 = \begin{bmatrix} 0 & 0 \\ 0 & 0 \end{bmatrix} \;\Longrightarrow\; \log A = N - \frac{N^2}{2} + \cdots = N
Step 3: Check by exponentiating. Because N2=0N^2 = 0, the exponential series also stops after two terms.
eN=I+N+N22!+⋯=I+N=[1201]=A  ✓e^{N} = I + N + \frac{N^2}{2!} + \cdots = I + N = \begin{bmatrix} 1 & 2 \\ 0 & 1 \end{bmatrix} = A \; \checkmark
Answer: log⁡A=[0200]\log A = \begin{bmatrix} 0 & 2 \\ 0 & 0 \end{bmatrix}. An entry-by-entry logarithm would fail here, since ln⁡0\ln 0 is undefined.

Why It Matters

In differential equations, the solution of x′=Bx\mathbf{x}' = B\mathbf{x} after one time unit is eBx0e^{B}\mathbf{x}_0, so the matrix logarithm recovers the rate matrix BB from observed data. Robotics and computer animation use logarithms of rotation matrices (the logarithm of a rotation is an antisymmetric matrix) to interpolate smoothly between orientations. It also appears in upper-level linear algebra and Lie group theory.

Common Mistakes

Mistake: Taking the natural logarithm of each entry, or assuming log⁡(AB)=log⁡A+log⁡B\log(AB) = \log A + \log B always holds.
Correction: The matrix logarithm is defined by eB=Ae^{B} = A, not entrywise. The sum rule works when AA and BB commute and have no eigenvalues on (−∞,0](-\infty, 0], provided the eigenvalues of log⁡A+log⁡B\log A + \log B stay in the principal strip. In general it fails because eX+Y≠eXeYe^{X+Y} \neq e^{X}e^{Y} for non-commuting matrices.

Related Terms