Hello I am diagonalizing the matrix $$\begin{bmatrix} -1 & 2 & 2 \\ 2 & 2 & -1 \\ 2 & -1 & 2 \end{bmatrix}.$$
The eigenvalues I found are $-3$ and $3$. The eigenvectors are $$\begin{bmatrix} -2 \\ 1 \\ 1 \end{bmatrix}, \quad \begin{bmatrix} 1/2 \\ 1 \\0 \end{bmatrix}, \text{ and } \begin{bmatrix} 1/2 \\ 0 \\ 1 \end{bmatrix}$$ respectively. My question is: Is it alright to transform the matrix from this $$\begin{bmatrix} 1/2 & 1/2 & -2 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}$$ to this $$\begin{bmatrix} 1 & 1 & -4 \\ 1 & 0 & 1 \\ 0 & 1 & 1 \end{bmatrix}$$ to make the inversion process easier? For the equation $D = P^{-1}AP$ ?
Apparently your matrix is one that has the eigenvectors as its columns (though not in the order you listed them; beware that this will imply that eigenvalues in the diagonal form will be permuted correspondingly). What you then did is multiply the first coordinate of each eigenvector by $2$ to remove the fractions. That is not a valid operation; an eigenvector will only remain an eigenvector (for the same eigenvalue) if you multiply the entire vecto by a nonzero scalar. So it would have been allowed to multiply each column by a nonzero scalar (and it could be a different scalar for each column if you like), but it is not right to multiply some row) by a scalar.
By the way, if you are inverting this matrix just to find the diagonal form, then that is not necessary in the first place. Once you've found a basis of eigenvectors, you know that a change of basis to that basis will make the matrix diagonal, with the eigenvalues (in the order they occur in the basis) as diagonal entries.