Finding general solution of $3{\times}3$ system I am given the following:
$$
x'=
\begin{bmatrix}
2 &0  &0 \\ 
 -7&9  &7 \\ 
 0&0  &2 
\end{bmatrix}
x
$$
Solving $\det(A-\lambda I)$, I get $\lambda = 2,2,9$. Solving $\det(A-2\lambda)$, I get 
\begin{bmatrix}
0&0  &0 \\ 
 -7&7  &7 \\ 
 0&0  &0 
\end{bmatrix}
So we have geom multi. = alg. multi, so our matrix is complete.
Take $v_1 = 
\begin{bmatrix}
1\\ 
 1\\ 
 0
\end{bmatrix}
$
Similarly, solve $\det(A-9\lambda)$ to get
$
\begin{bmatrix}
-7&0  &0 \\ 
 -7&0  &7 \\ 
 0&0  &-7 
\end{bmatrix}
$
So take $v_2 = 
\begin{bmatrix}
0\\ 
 1\\ 
 0
\end{bmatrix}
$
So the general solution should be $x(t) = C_1e^{2t}\begin{bmatrix}
1\\ 
 1\\ 
 0
\end{bmatrix}
+C_2e^{2t} \begin{bmatrix}
1\\ 
 1\\ 
 0
\end{bmatrix}
+ C_3e^{9t}\begin{bmatrix}
0\\ 
 1\\ 
 0
\end{bmatrix}$
However, according to the back of the book solution, this is incorrect. What am I missing here? Thank you.
 A: Your eigenvectors are not right for $\lambda=2.$ You have the right system, but you should get two solutions: $v_1=(1,1,0)$ and $v_2=(1,0,1).$ 
A: You are right that $v_1 = \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix}$ is an eigenvector of $A$ with eigenvalue $2$; i.e $ v_1 \in \ker(A-2I)$. But like you mentioned, the dimension of this kernel is $2$, so you need to find another linearly independent eigenvector. It is easy to verify that $\xi =  \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} $ is such a vector. In other words, $\{v_1, \xi\}$ form a basis for $\ker(A-2I)$. Hence, your general solution will be
\begin{equation}
x(t) = C_1 e^{2t} \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + 
C_2 e^{2t} \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} + 
C_3 e^{9t} \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}
\end{equation}
A: The system $$x'=
\begin{bmatrix}
2 &0  &0 \\ 
 -7&9  &7 \\ 
 0&0  &2 
\end{bmatrix}$$
 is simply 
$$ x_1'=2x_1$$
$$ x_2'=-7x_1+9x_2+7x_3$$
$$ x_3'=2x_3$$
Therefore   $$x_1=c_1e^{2t}$$ and $$x_3=c_2 e^{2t}$$
Solving for $$x_2'=9x_2+7(c_2-c_1)e^{2t}$$
we get $$x_2=c_3e^{9t}+(c_1-c_2)e^{2t}$$
Thus we have $$x(t) =  
 c_1 e^{2t} \begin{pmatrix} 1 \\ 1 \\ 0 \end{pmatrix} + 
c_2 e^{2t} \begin{pmatrix} 0\\-1 \\ 1 \end{pmatrix} + 
c_3 e^{9t} \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}
$$
A: For $\lambda=2$, $(A-2I)v=0$ gives $-x+y+z=0$.
Letting $y=k_1$ and $z=k_2$ you get $x=k_1+k_2$.
Then $v=\begin{pmatrix}k_1+k_2\\k_1\\k_2\end{pmatrix}=k_1\begin{pmatrix}1\\1\\0\end{pmatrix}=k_2\begin{pmatrix}1\\0\\1\end{pmatrix}$.
$\implies v_1=\begin{pmatrix}1\\1\\0\end{pmatrix}$ and $v_2=\begin{pmatrix}1\\0\\1\end{pmatrix}$ are two corresponding eigenvectors.
