Finding the basis B of the matrix T in which B is diagonal (i think i've got it) 
Let T : $R^3 → R^3$ be the linear transformation given by multiplication by
  $$\begin{bmatrix}2&1& 2\\ 1&2&-2 \\ 1&-1&1 \end{bmatrix}$$ 
Note that λ = −1 is an eigenvalue of this matrix. Find a base B for $R^3$ for which the matrix of T with respect to B is diagonal.

I think i've got the answer but i just wasn't able to word the theory very well.
The basis B for which T is diagnosable are the eigenvectors of T.
Which has a characteristic polynomial of $-(x-3)^2(x+1)$ meaning its eigen values are 3 and -1. Of which 3 has a geometric multiplicity of 2.
From eigen value 3 we get the vectors: (2,0,1) and (1,1,0) 
From -1 we get the vectors: 
So i guess the basis B of T is: (2,0,1), (1,1,0), (-1,1,1)
 A: The question might be a bit to broad to be answered in its full spectrum, I just want to state the connection between what we understand of diagonalization of a matrix and the existence of a basis of eigenvectors.

Definition: An endomorphism $\phi:V\to V$ is called diagonalizable, if there
  exists a basis $B$ of $V$, such that the representing matrix $M$ of
  $\phi$ is of the form of a diagonal matrix. Here we assume $V$ to be finitely generated and call the dimension $\dim(V)=n$.

This immediately means, that $\phi$ is diagonalizable, iff there exists a Basis $B$ of $V$ and scalars $a_k$ over the field $K$ of $V$(e.g. $K=\mathbb{R}$)
$$
B:=\left\{b_1,b_2\ldots,b_n \right\}
$$
such that $\forall b_i\in B$ we have
$$
\phi(b_i)=a_ib_i
$$ 
Then the representing matrix $M$ of $\phi$ is exact of the form of 
$$
M =  \left( \begin{array}{ccc}
a_1 & \ldots & 0 \\
\vdots & \ddots & 0 \\
0 & 0 & a_n \end{array} \right)=:\operatorname{diag}(a_1,\ldots,a_n)
$$
since the entries in the columns of the representing matrix are the coordinates of the image of the basis with respect to $\phi$. 
So you did everything all right with finding the proper basis of eigenvectors of $T$ which form a basis of $V=\mathbb{R}^3$, such as
$$
b_1=(-1,1,1)^t,b_2=(2,0,1)^t,b_3=(1,1,0)^t
$$ 
and you get with $S=(b_1\ b_2\ b_3)$ as basis transformation matrix
$$
T=SDS^{-1}=S\operatorname{diag}(-1,3,3)S^{-1}
$$
