# Diagonalization of a Matrix. Having Trouble..

This is for Continuous-time Markov chains but I'm having trouble with the linear algebra.

Formal Definitions:

If Q is diagonalizable, then so is $e^{tQ}$, and the transition function can be expressed in terms of the eigenvalues and eigenvectors of $Q$. Write $Q=SDS^{-1}$, where $D$ is a diagonal matrix whose diagonal entries are the eigenvalues of $Q$, and $S$ is an invertible matrix whose columns are the corresponding eigenvectors. This gives,

$$e^{tQ} = Se^{tD}S^{-1}$$

The Problem:

A Markov Chain has generator matrix,

$$Q= \begin{pmatrix} -1 & 1 & 0 \\ 0 & -2 & 2 \\ 3 & 0 & -3 \\ \end{pmatrix}$$

Find the transition function by diagonalizing the generator and finding the matrix exponential.

My pr0fessor seems to be getting eigenvalues $\lambda = -4, \lambda = -2, \lambda = 0$.

I, on the other hand, seem to be getting $\lambda = -3, \lambda = 0$.

Edit: I recalculated but still am getting $\lambda = 0$.

This gets him a completely different set of eigenvectors.. Am I miscalculating something?

EDIT:

In the back of the book I have,

$$P(t)= \begin{pmatrix} -1 & 0 & 1 \\ -3 & 1 & 1 \\ 3 & 0 & 1 \\ \end{pmatrix} \begin{pmatrix} e^{-4t} & 0 & 0 \\ 0 & e^{-2t} & 0 \\ 0 & 0 & 1 \\ \end{pmatrix} \begin{pmatrix} -1/4 & 0 & 1/4 \\ -3/2 & 1 & 1/2 \\ 3/4 & 0 & 1/4 \\ \end{pmatrix}$$

Where $P(t)$ is the transition function asked for.

• Are you sure you wrote the matrix $Q$ correctly? – Moo Apr 24 '18 at 15:13
• Yes I'm positive. I made sure to double check it several times. Let me include the solution. It's also in the back of my book. – Nicklovn Apr 24 '18 at 15:15
• The reason I ask is, using Wolfram Alpha, the eigenvalues / eigenvectors are wolframalpha.com/input/… – Moo Apr 24 '18 at 15:17
• I added the more formal definitions. I just realized I made a mistake calculating by hand and now I only get one eigenvalue $\lambda = 0$. I am at a complete loss as to what I'm doing wrong. – Nicklovn Apr 24 '18 at 15:23
• There's a typo somewhere. The first row of $Q$ should be $[-1,0,1]$. – Scott H. Apr 24 '18 at 15:50

There's a typo. Reverse engineering the given answer we have: \begin{align} Q&=PDP^{-1}\\ &=\begin{pmatrix} -1 & 0 & 1 \\ -3 & 1 & 1 \\ 3 & 0 & 1 \\ \end{pmatrix} \begin{pmatrix} -4 & 0 & 0 \\ 0 & -2 & 0 \\ 0 & 0 & 0 \\ \end{pmatrix} \begin{pmatrix} -1/4 & 0 & 1/4 \\ -3/2 & 1 & 1/2 \\ 3/4 & 0 & 1/4 \\ \end{pmatrix}\\ &=\begin{pmatrix} -1 & 0 & 1 \\ 0 & -2 & 2 \\ 3 & 0 & -3 \\ \end{pmatrix} \end{align}
Now knowing that $$Q=\begin{pmatrix} -1 & 0 & 1 \\ 0 & -2 & 2 \\ 3 & 0 & -3 \\ \end{pmatrix}$$ You can find your characteristic polynomial, e.g. via cofactor expansion down the second column to get $$p(\lambda)=-\lambda(\lambda+2)(\lambda+4)$$ and proceed from there.