# Solving a differential system of equations in matrix form

I have a basic question about eigenvector.

If I have the following system:

$$\begin{pmatrix} \dot{\eta}_1 \\ \dot{\eta}_2 \\ \end{pmatrix} = {\cal{B}} \begin{pmatrix} \eta_1 \\ \eta_2 \\ \end{pmatrix}$$

Where $${\cal{B}}$$ is a matrix with constant parameters. For finding the solution to this system I do $$\eta = P f$$ where P is the eigenvector of $${\cal{B}}$$, in this case, I can write:

$$\begin{pmatrix} \dot{f}_1 \\ \dot{f}_2 \\ \end{pmatrix} = {\cal{D}} \begin{pmatrix} f_1 \\ f_2 \\ \end{pmatrix}$$

Where $${\cal{D}}$$ is a diagonal matrix. I have two eigenvalue ($$\lambda_1$$ and $$\lambda_2$$) and two corresponding eigenvectors ($$v_1$$ and $$v_2$$), the vector $$v_1$$ have components $$v_{11}$$ and $$v_{12}$$. The solution of this equation is:

$$f_1 = c_0 e^{\lambda_1 t}$$ and $$f_1 = c_0 e^{\lambda_2 t}$$,

If for example I select the first eigenvalue $$\lambda_1$$, then the $$\eta_1$$ and $$\eta_2$$ should be written like this

$$\eta_1 = c_0 v_{11} e^{\lambda_1 t}$$

$$\eta_1 = c_0 v_{12} e^{\lambda_1 t}$$

Is this correct?

And the general solution should be

$$\eta_1 = c_0 v_{11} e^{\lambda_1 t} +c_{01} v_{21} e^{\lambda_2 t}$$

$$\eta_1 = c_0 v_{12} e^{\lambda_1 t} +c_{02} v_{22} e^{\lambda_2 t}$$

Am I right? I have severe doubts about this.

Thanks

• That's right, unless the two eigenvalues are equal : in such a case, you have to involve $te^{\lambda_1t}$ terms. Mar 20, 2020 at 17:07
• I have taken the liberty to add "differential" to your title. Mar 20, 2020 at 17:08

## 1 Answer

Consider the system $$\dot{x} = Ax$$, where $$A\in\mathbb{R}^{n\times n}$$. If you assume $$A$$ to be diagonalizable (i.e. the geometric multiplicity equals the algebraic multiplicity for every eigenvalue of $$A$$), then you can find an invertible transformation $$T\in\mathbb{R}^{n\times n}$$ in terms of eigenvectors of $$A$$ such that $$A = T \Lambda T^{-1}$$, where $$\Lambda = \text{diag}(\lambda_1,\lambda_2,\dots,\lambda_n)$$. Setting $$z = T^{-1}x$$, the differential equation becomes $$\begin{equation*} \dot{z} = \Lambda z. \end{equation*}$$ Now, as you found, the decoupled system in the $$z$$-coordinates makes solving the differential equation very simple, namely: $$\begin{equation*} z_i(t) = e^{\lambda_i t}z_i(0) ~ \text{for all i\in\{1,2,\dots,n\}}, \end{equation*}$$ or, equivalently, $$\begin{equation*} z(t) = \text{diag}(e^{\lambda_1 t},e^{\lambda_2 t},\dots,e^{\lambda_n t}) z(0). \end{equation*}$$ To find the solution in the original $$x$$-coordinates, simply reverse the transformation: $$\begin{equation*} x(t) = Tz(t) = T\text{diag}(e^{\lambda_1 t},e^{\lambda_2 t},\dots,e^{\lambda_n t}) T^{-1}x(0). \end{equation*}$$

Edit: A great resource for learning more about systems of linear ordinary differential equations (linear systems theory) is Stanford's EE263 course.

• Thanks:D, I have only one doubt. In the last equation, T is a matrix with of eigenvector of $\lambda$ written in columns, right?. In this case, for example, $x_1$, it should be equal to the first component of each eigenvector multiplied by the corresponding z_i (t), right?
– Nico
Mar 20, 2020 at 17:52
• If $A$ has $n$ linearly independent eigenvectors, then yes, $T$ is generated by stacking these eigenvectors into columns. As for your second question, not necessarily. In general, the components of $x$ depend on every component of $z$: $x(t) = Tz(t) = \begin{bmatrix}t_1 & t_2 & \cdots & t_n\end{bmatrix}\begin{bmatrix}z_1(t) \\ z_2(t) \\ \vdots \\ z_n(t) \end{bmatrix} = \sum_{i=1}^n t_i z_i(t)$, where $t_i$ is the $i$th eigenvector of $A$. Mar 20, 2020 at 18:04
• Think of it like this: in the original $x$-coordinates, the components of the ODE trajectory may be correlated in some sense to one another. This is due to the coupling between different coordinates of $x$ through the structure of $A$. When we diagonalize $A$, we are changing coordinates to a system where we remove this coupling. This allows us to solve the ODE separately in each coordinate, since they are independent from one another. However, in the $x$-coordinates, the coupling still exists, and therefore when we transform back to the $x$-coordinates we end up fusing different parts of $z$. Mar 20, 2020 at 18:09
• This can also be written very succinctly in terms of the matrix exponential as $x(t) = \exp(At)x(0)$. Unfortunately there is not such a simple form if $A$ is nonconstant, even if it has an explicit antiderivative. Mar 20, 2020 at 18:10