# Log of a matrix

1. Oct 5, 2012

### jhendren

How do you take the log of a 2x2 matrix in general where all entries are non-zero

2. Oct 5, 2012

### chiro

Hey jhendren and welcome to the forums.

Have you tried either (a) diagonalizing the matrix or (b) using an operator expansion based on the Taylor series of the logarithm?

The first one is based on the eigen-decomposition and the second one is based on the operator algebra results for functions of a linear operator.

3. Oct 7, 2012

### HallsofIvy

If y= ln(x) then $x= e^y$. So to define the logarithm is to define the exponential and vice-versa. And it is easier to work with the exponential. Its Taylor series is $\sum_{n=0}^\infty x^n/n!$.

One can show that if matrix x is "diagonalizable", that is, if there exist a matrix P such that $x= PDP^{-1}$ where D is a diagonal matrix, then that is $\sum_{n= 0}^\infty (PDP^{-1})^n/n!= P\left(\sum_{n=0}^\infty D^n\right)P^{-1}$. And $D^n$ is just the diagonal matrix with the nth powers of the diagonal elements of D on it diagonal. That reduces to $e^x= Pe^DP^{-1}$ where, now, $e^D$ is the diagonal matrix having the exponentials of the diagonal elements of D on its diagonal.

If x is not diagonalizable, it can still be written in "Jordan Normal Form" but the exponential of that is trickier.

If, for example,
$$D= \begin{bmatrix}a & 0 \\ 0 & b\end{bmatrix}$$
then
$$e^D= \begin{bmatrix}e^a & 0 \\ 0 & e^b\end{bmatrix}$$.

If A is the "Jordan Normal Form", written as
$$A= \begin{bmatrix}a & 1 \\ 0 & a\end{bmatrix}$$
then it is easy to show that
$$A^n= \begin{bmatrix}a^n & na^{n-1} & 0 & a^n\end{bmatrix}$$
so that
$$e^A= \begin{bmatrix}\sum a^n/n! & sum na^{n-1}/n!\\ 0 \sum a^n/n!\end{bmatrix}= \begin{bmatrix}\sum a^n/n! & sum a^{n-1}{n!} \\ 0 & a^n/n! \end{bmatrix}$$
$$e^A= \begin{bmatrix}e^a & e^a \\ 0 & e^a\end{bmatrix}$$

Last edited by a moderator: Oct 7, 2012