Exercise about Matrix diagonalization Well I have to diagonalize this matrix :
$$
\begin{pmatrix} 5 & 0 & -1 \\ 1 & 4 & -1 \\ -1 & 0 & 5 \end{pmatrix}
$$
I find the polynome witch is $P=-(\lambda-4)^2(\lambda-6)$
Now I want to know eignevectors so I solve $AX=4X$ and $AX=6X$ with $X=\begin{pmatrix} x \\ y \\ z \end{pmatrix}$but I have a problem with the first system ! 
In the correction they say "after an elementary calculus we have $E_4=Vect\left(\begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix},\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}\right)$"
And I don't know how and why because with my system I just find that $x=z$. 
Can you explain to me, please ? 
 A: Your solution is right: $x=z$ means that every vector which is solution to your system has to be of the form
$$
v=\begin{pmatrix} x\\ y \\ x\end{pmatrix}
$$
where $x,y$ are now "free" coefficients in the field of the vector space, so you can write that as
$$
v=x\begin{pmatrix}1\\ 0 \\ 1\end{pmatrix}+y\begin{pmatrix}0\\ 1\\ 0\end{pmatrix}
$$
This means that the vector space of the solutions (that is the eigenspace $E_4$) is spanned by the set
$$
\left\{\begin{pmatrix}1\\ 0 \\ 1\end{pmatrix},\ \begin{pmatrix}0\\ 1\\ 0\end{pmatrix}\right\}.
$$
A: The system $AX=4X$ is equivalent to the system $(A-4I)X=0$, i.e.
$$\left(\begin{array}{ccc}1 & 0 & -1 \\ 1 & 0 & -1 \\ -1 & 0 & 1
\end{array}\right)\left(\begin{array}{c}x \\ y \\ z
\end{array}\right)=\left(\begin{array}{c}0 \\ 0 \\ 0
\end{array}\right)\ \ .$$
After reducing this matrix, you get
$$\left(\begin{array}{ccc}1 & 0 & -1 \\ 0 & 0 & 0 \\ 0 & 0 &0 \end{array}\right)$$
and, as you've noticed, this lead to the solution 
$$\{(x,y,z)\in\mathbb{R}^3: x=z\}\ \ .$$
This subspace can be seen as
$$\{(x,y,x): x,y\in \mathbb{R}\}=\{x(1,0,1)+y(0,1,0):x,y\in \mathbb{R}\}$$
and the last one is exactly 
$$Vect\left(\begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix},\begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix}\right)$$
A: You calculated correctly.  The set of all eigenvectors of eigenvalue $4$ is a $2$-dimensional subspace.  The condition $x = z$ is equivalent to all matrices of the form
$$
\begin{pmatrix} x \\ y \\ x \end{pmatrix} 
= \begin{pmatrix} x \\ 0 \\ x \end{pmatrix} 
+ \begin{pmatrix} 0 \\ y \\ 0 \end{pmatrix}
= x \begin{pmatrix} 1 \\ 0 \\ 1 \end{pmatrix} 
+ y \begin{pmatrix} 0 \\ 1 \\ 0 \end{pmatrix},
$$
where $x,y \in \Bbb{R}$.  There is your basis.
A: When the characteristic polynomial has a double root, as is the case here, you will find that there are infinitely many eigenvectors corresponding to this eigenvalue, but that all of these eigenvectors are lying in one plane. Therefore you can choose any two independent i.e. non-parallel vectors which are parallel to this plane to be eigenvectors, as is suggested in the correction.
