# Matrix Exponential to a Matrix

If we have two square matrices of the same size P and Q, we can put one in the exponent of the other by:
$$M = P^Q = e^{ln(P)Q}$$
ln(P) may give multiple results R, which are square matrices the same size as P.
So then we have:
$$M = e^{RQ}$$
which can be Taylor expanded to arrive at a final square matrix (matrices) M.

Also, does anyone know any tricks in computing the log of a matrix?
If P is not diagonalizable, it seems you'd have to use the Taylor series expansion. So you'd have an expansion within an expansion for M.

Last edited:

Related Linear and Abstract Algebra News on Phys.org
If we have two square matrices of the same size P and Q, we can put one in the exponent of the other by:
$$M = P^Q = e^{ln(P)Q}$$
##\ln(P)## is only well-defined when P is invertible; otherwise P does not have a logarithm.

The wikipedia article on matrix logarithms has some discussion on computing the logarithm in the non-diagonalizable case.

Twigg
Gold Member
MATLAB has a logm function to take matrix logs for numerical calculations.

If you're doing symbolic work, there's one trick I remember from doing exponentials by hand. I don't know the fancy/correct term for it, but often times when evaluating a matrix power series the powers of the matrix will repeat after a certain number of powers. For example, the generator of the 2D special orthogonal group is [0, -1; 1, 0]. Square that and you get [-1, 0; 0, -1]. Cube it and you get [0, 1; -1, 0]. Fourth power gives you [1, 0; 0, 1]. Since that's just the identity you the fifth power is [0, -1; 1, 0] and the cycle repeats. The fifth power equals the first, the sixth equals the second, and so on. I suppose you could say that in such cases the sequence of all powers of [0, -1; 1, 0] is homomorphic to Z4 under matrix multiplication, or I could be just making a fool outta myself. That way the power series reduces to a sum over four terms. It should apply to any convergent Taylor series if the powers of the generating matrix repeat.

Can you give us a little more info on what logs you want to take?

MATLAB has a logm function to take matrix logs for numerical calculations.

If you're doing symbolic work, there's one trick I remember from doing exponentials by hand. I don't know the fancy/correct term for it, but often times when evaluating a matrix power series the powers of the matrix will repeat after a certain number of powers. For example, the generator of the 2D special orthogonal group is [0, -1; 1, 0]. Square that and you get [-1, 0; 0, -1]. Cube it and you get [0, 1; -1, 0]. Fourth power gives you [1, 0; 0, 1]. Since that's just the identity you the fifth power is [0, -1; 1, 0] and the cycle repeats. The fifth power equals the first, the sixth equals the second, and so on. I suppose you could say that in such cases the sequence of all powers of [0, -1; 1, 0] is homomorphic to Z4 under matrix multiplication, or I could be just making a fool outta myself. That way the power series reduces to a sum over four terms. It should apply to any convergent Taylor series if the powers of the generating matrix repeat.

Can you give us a little more info on what logs you want to take?
I just recently discovered logm and expm, which are quite handy for this sort of thing.
I'm not trying to take any particular logs. I am more curious about what the limitations of this operation are.
Obviously recursive and idempotent/nilpotent matrices would be nice here. :)