The problem: Being given the matrix: $$ \begin{bmatrix} 0 & -1 & -1 \\ 1 & 2 & 1 \\ -1 & -1 & 0 \end{bmatrix}$$ and two of its eigenvalues $0,1$. Obtain matrix $P$ (whose columns are associated to the eigenvalues)
My attempts: I know the formula first I use 0 and subtract it from the entries across the diagonal and get:
the same matrix. then I add row 2 to row 3 and get:
$$ \begin{bmatrix} 0 & -1 & -1 \\ 1 & 2 & 1 \\ 0 & 1 & 1 \end{bmatrix} $$
Then I added row one to row 3, row flipped one and two and got: $$ \begin{bmatrix} 1 & 2 & 1 \\ 0 & 1 & 1 \\ 0 & 0 & 0 \end{bmatrix} $$ and the solution that I got was:
x = $$ \begin{bmatrix} 1 \\ -1\\ 1 \end{bmatrix} $$
but the book says no, it's:
$$ \begin{bmatrix} -1 \\ 1 \\ -1 \end{bmatrix} $$
For the corresponding lambda =1, after subtracting the diagonals I get: $$ \begin{bmatrix} -1 & -1 & -1 \\ 1 & 1 & 1 \\ -1 & -1 & 0 \end{bmatrix} $$
Then I added row one and row two, multiplied row one by -1: $$ \begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ -1 & -1 & 0 \end{bmatrix} $$
All I can do here is add row one and three and get: $$ \begin{bmatrix} 1 & 1 & 1 \\ 0 & 0 & 0 \\ 0 & 0 & 1 \end{bmatrix} $$ leaving one free variable and well quite honestly it doesn't matter what my answer is from here because I only have two columns for P. Something is seriously wrong I don't know if I am making a logical error in my row operations and happen to be committing a logical no no or what? I have checked over it and I just can't for the life of me figure out the what problem is. Please give a concise explanation. Thank you.
As for eigenvalues being defined only up to a constant I don't understand what you mean by my answer is okay if its negative of the book moreover I lack the proper rows.
The eigenvector you obtained and the one in the book differ only in sign, that is by multiplication by $-1$. Both vectors are eigenvectors for eigenvalue $0$ and equally correct answers.
For the other eigenvalue, you just forgot to subtract in the last line. If you correct this you will get two free variables.