TITLE: What is the time complexity of the matrix exponential?
QUESTION [12 upvotes]: While trying to compute the Matrix Exponential of an $n \times n$ array I decided to take advantage of a Python function called scipy.linalg.expm().
According to the documentation, this function adopts the Padé's Approximant to perform a calculation that, otherwise, is said to require a lot of resources and is still a matter of discussion in the mathematics community (many of you might be aware of this).
The documentation itself references a work by Al-Mohy and Higham (doi: 10.1137/04061101X), in which I was not able to find any indication regarding the Time Complexity (either T or Theta would work) of this procedure.
Has anyone come across the same problem? What is your suggestion for determining said Time Complexity?

REPLY [13 votes]: The exponential of a matrix is not, in general, computable explicitly. Strictly speaking, the Complexity of Matrix Exponential does not exist. Instead, you have an approximate calculation and you are asking about its complexity. Now, a few comments : 

there is not just one approximate exponential, but actually a sequence of approximations. Therefore, the complexity must involve the tolerance parameter.
One cannot overlook the stability of the approximation. At least two ingredients are at stake. Either the diagonalisation of the matrix can be ill-conditionned (the matrix is far from normal). Or (even worse) its spectrum is moderately large. Say that $30$ and $-30$ are eigenvalues, then the magnitude of $\exp A$ is $e^{30}$, a large number. But $e^{-30}$ is also an (extremely small) eigenvalue, and the action of the approximate $\exp A$ on the corresponding eigenvector will be totally eroneous. More generally, a moderate condition number of $A$ causes huge errors in the modes associated with the smallest eigenvalues. These phenomena are well known by numerical analysts when dealing with ODEs. And they must choose a version of the Euler scheme adapted to the matrix itself.