# 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
\begin{align*} \frac{dy}{dt}&=Ay,\quad y(0)=e_{1}\\ \frac{dy}{dt}&=Ay, \quad y(0)=e_{2}\\ \vdots&\\ \frac{dy}{dt}&=Ay, \quad y(0)=e_{n} \end{align*}
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}$.