## let’s look at an example of the SN decomposition.

This comes from Perko p. 35, example 3. We will compute exp(A) using the SN decomposition described in the previous post (“1 of 3”).

We take the following matrix:

$A = \left(\begin{array}{lll} 1 & 0 & 0 \\ -1 & 2 & 0 \\ 1 & 1 & 2\end{array}\right)$

I ask Mathematica® to find its eigenvalues and eigenvectors. For eigenvalues, I get

$\lambda = \{2,\ 2,\ 1\}$

For the eigenvector matrix, I get

$\left(\begin{array}{lll} 0 & 0 & -1 \\ 0 & 0 & -1 \\ 1 & 0 & 2\end{array}\right)$

We have three eigenvalues, one repeated. More importantly, we have only two eigenvectors. By that column of zeroes, Mathematica® is telling us that the repeated eigenvalue 2 has only one eigenvector

$\{0,\ 0,\ 1\}$

associated to it.

Let’s look for a generalized eigenvector for $\lambda = 2$. We solve ${\left(A - 2I\right)}^2\ v = 0$. A – 2 I is

$A - 2 I = \left(\begin{array}{lll} -1 & 0 & 0 \\ -1 & 0 & 0 \\ 1 & 1 & 0\end{array}\right)$

and ${\left(A - 2I\right)}^2$ is

${\left(A - 2I\right)}^2 = \left(\begin{array}{lll} 1 & 0 & 0 \\ 1 & 0 & 0 \\ -2 & 0 & 0\end{array}\right)$

so we apply ${\left(A - 2I\right)}^2$ to an arbitrary vector and set the result to 0…

$0 = \left(\begin{array}{lll} 1 & 0 & 0 \\ 1 & 0 & 0 \\ -2 & 0 & 0\end{array}\right)$ $\left(\begin{array}{l} v1 \\ v2 \\ v3\end{array}\right)$

and find that

$\{\text{v1} = 0,\text{v1} = 0,-2 \text{v1} = 0\}$

Mother Nature may not scream her secrets at us very often, but she’s sure about one thing: v1 = 0. That’s fine, because just as clearly, v2 and v3 are arbitrary. So one simple choice for a generalized eigenvector is {0, 1, 0}, and then my P matrix becomes

$P = \left(\begin{array}{lll} 0 & 0 & -1 \\ 0 & 1 & -1 \\ 1 & 0 & 2\end{array}\right)$

Our diagonal matrix of eigenvalues is

$D = \left(\begin{array}{lll} 2 & 0 & 0 \\ 0 & 2 & 0 \\ 0 & 0 & 1\end{array}\right)$

We undo the similarity transform to get S:

$S = P\ D\ P^{-1} = \left(\begin{array}{lll} 1 & 0 & 0 \\ -1 & 2 & 0 \\ 2 & 0 & 2\end{array}\right)$

We compute N = A – S

$N = A - S = \left(\begin{array}{lll} 0 & 0 & 0 \\ 0 & 0 & 0 \\ -1 & 1 & 0\end{array}\right)$

Now we start computing powers of N. We don’t have to go far at all, because we compute and find that $N^2 = 0$. That is, in the expansion of exp(N), the only nonzero terms are I + N, so we compute it:

$exp(N) = I + N = \left(\begin{array}{lll} 1 & 0 & 0 \\ 0 & 1 & 0 \\ -1 & 1 & 1\end{array}\right)$

and the matrix exp of D is, of course,

$exp(D) = \left(\begin{array}{lll} e^2 & 0 & 0 \\ 0 & e^2 & 0 \\ 0 & 0 & e\end{array}\right)$

Finally,

$exp(A) = P\ exp(D)\ P^{-1}\ exp(N) \$,

i.e.

$exp(A) = \left(\begin{array}{lll} e & 0 & 0 \\ e-e^2 & e^2 & 0 \\ -2 e+e^2 & e^2 & e^2\end{array}\right)$

I think this is just so slick. Harry Potter, eat your heart out: I know some true magic. (Don’t misunderstand, I do like the Harry Potter books. Right now I’m struggling thru the first one in German.)