# Calculating matrix exponential by solving appropriate ODE

It is known that the solution of the linear ODE $\frac{d\vec{y}}{dt}=A\vec{y}$ is the span of the columns of $e^{xA}$. This gives us a formula for solving the ODE by solving $e^{xA}$. However, is the reverse also possible? That is, can I calculate $e^{xA}$ by solving the ODE?

-
Sure. The two are equivalent. – Qiaochu Yuan Jan 27 '11 at 10:36
Perhaps I should have asked how can I calculate the exponential? – Tomer Vromen Jan 27 '11 at 13:13

Yes, you can use Euler's method (or one of the more sophisticated methods for solving an ODE initial value problem) to solve the $n$ initial value problems

$\frac{dy}{dt}=Ay, y(0)=e_{1}$

$\frac{dy}{dt}=Ay, y(0)=e_{2}$

$\ldots$

$\frac{dy}{dt}=Ay, y(0)=e_{n}$

where $e_{k}$ is the $k$th column of the identity matrix. At time $x$, you'll get $n$ result vectors, which are the columns of $e^{xA}$.

There are many other methods for computing matrix exponentials. You should definitely read the paper, "Nineteen Dubious Ways To Compute The Matrix Exponential, 25 Years Later." by Cleve Moler and Charles Van Loan. See

http://www.cs.cornell.edu/cv/researchpdf/19ways+.pdf

-