1. ## Linear Algebra/Differential equations

How can we show that the matrix differential equation dX/dt=AX+XB has the solution $X(t)=e^{At}X(0)e^{Bt}$ and prove that the solutions of dX/dt=AX-XA keep the same eigenvalues for all time.

2. You can check that that is indeed a solution by differentiating, now suppose we have a solution $X(t)$ we will prove it has to be of that form (uniqueness)

Remember that the product rule also holds for Matrixes, we have:

$
\left( {e^{ - A \cdot t} \cdot X\left( t \right) \cdot e^{ - B \cdot t} } \right)^\prime = \left( {e^{ - A \cdot t} \cdot X\left( t \right)} \right)^\prime \cdot e^{ - B \cdot t} + \left( {e^{ - A \cdot t} \cdot X\left( t \right)} \right) \cdot \left( { - B \cdot e^{ - B \cdot t} } \right)
$

Hence: $
\left( {e^{ - A \cdot t} \cdot X\left( t \right) \cdot e^{ - B \cdot t} } \right)^\prime = \left[ {\left( { - A \cdot e^{ - A \cdot t} } \right) \cdot X\left( t \right) + e^{ - A \cdot t} \cdot X'\left( t \right)} \right] \cdot e^{ - B \cdot t} +
$
$
\left( {e^{ - A \cdot t} \cdot X\left( t \right)} \right) \cdot \left( { - B \cdot e^{ - B \cdot t} } \right)
$

$
C
$
and $
e^C
$
commute, for every matrix $C$.

Thus: $
\left( {e^{ - A \cdot t} \cdot X\left( t \right) \cdot e^{ - B \cdot t} } \right)^\prime = e^{ - A \cdot t} \left[ {\underbrace { - A \cdot X\left( t \right) + X'\left( t \right) - B \cdot X\left( t \right)}_{ = \bold{0}_{n \times n} }} \right]e^{ - B \cdot t} = \bold{0}_{n \times n}
$

So it is a constant matrix ( because of the 0 derivative) : $
e^{ - A \cdot t} \cdot X\left( t \right) \cdot e^{ - B \cdot t} = M
$

Let $t=0$ we get: $
e^{ - A \cdot 0} \cdot X\left( 0 \right) \cdot e^{ - B \cdot 0} = {\text{Id}}_{n \times n} \cdot X\left( 0 \right) \cdot {\text{Id}}_{n \times n} = X\left( 0 \right) = M
$

$
e^{ - A \cdot t} \cdot X\left( t \right) \cdot e^{ - B \cdot t} = X\left( 0 \right) \Rightarrow X\left( t \right) = e^{A \cdot t} \cdot X\left( 0 \right) \cdot e^{B \cdot t}
$
And the uniqueness is proven.

For the second part of the question, let $B=-A$

The solutions is of the form: $
e^{A \cdot t} \cdot X(0) \cdot e^{ - A \cdot t}
$

Let's see the characteristic polynomial:

$
\det \left( {e^{A \cdot t} \cdot X(0) \cdot e^{ - A \cdot t} - \lambda \cdot {\text{Id}}} \right) = \det \left( {e^{A \cdot t} \cdot X(0) \cdot e^{ - A \cdot t} - \lambda \cdot e^{A \cdot t} \cdot e^{ - A \cdot t} } \right)
$
$=
\det \left[ {e^{A \cdot t} \cdot \left( {X\left( 0 \right) - \lambda \cdot {\text{Id}}} \right) \cdot e^{ - A \cdot t} } \right]
$

$
\det \left( {e^{A \cdot t} \cdot X\left( 0 \right) \cdot e^{ - A \cdot t} - \lambda \cdot {\text{Id}}} \right) = \det \left( {e^{A \cdot t} } \right) \cdot \det \left( {X\left( 0 \right) - \lambda \cdot {\text{Id}}} \right) \cdot \det \left( {e^{ - A \cdot t} } \right)
$
$=
\det \left( {e^{A \cdot t} } \right) \cdot \det \left( {e^{ - A \cdot t} } \right) \cdot \det \left({X\left( 0 \right) - \lambda \cdot {\text{Id}}} \right) = \det \left( {e^{A \cdot t} \cdot e^{ - A \cdot t} } \right) \cdot \det \left( {X\left( 0 \right) - \lambda \cdot {\text{Id}}} \right)
$

$
= \det \left( {{\text{Id}}} \right) \cdot \det \left({X\left( 0 \right) - \lambda \cdot {\text{Id}}}\right) = \det \left( {X\left( 0 \right) - \lambda \cdot {\text{Id}}} \right)
$
!!!