Find transformation matrix with respect to a basis of an invariant subspace Simple question but I've never encountered ones like that.
$T$ is a linear transformation from $\mathbb R^3$ to $\mathbb R^3$ defined by:
$T(v)=Av$ when $A=\begin{pmatrix} 1 & 2 & 2\\6 & 3 & -2\\-3 & 1 & 6\end{pmatrix}$ and $v \in \mathbb R^3$.
Let $U=span\{\begin{pmatrix}1\\0\\0\end{pmatrix},\begin{pmatrix}0\\2\\-1\end{pmatrix}\}$
Let $W = span\{\begin{pmatrix}0\\1\\-1\end{pmatrix}\}$
1) Show that U and W are invariant subspaces (meaning that $Im(U) \subseteq U$ and $Im(W) \subseteq W$). I solved this question
2)I'm stuck here Choose $B_1$ a basis for $U$ and $B_2$ a basis for $W$. Find:
$[T|U]_{B_1}$, $[T|W]_{B_2}$, and $[T]_{B_1 \cup B_2}$  
3) Is this the primary decomposition of $T$ to invariant subspaces over $\mathbb R$?
4) Is this the primary decomposition of $T$ to invariant subspaces over $\mathbb Q$?
Clarification about exactly what I'm having difficulties with:
I was taught that the matrix of a transformation with respect to a basis is just the transformation applied to elements of said basis. for example, if $s$ is the standard base then:
$[T]_s = \begin{pmatrix} T(\begin{pmatrix} 1\\0\\0\end{pmatrix},T(\begin{pmatrix} 0\\1\\0\end{pmatrix},T(\begin{pmatrix} 0\\0\\1\end{pmatrix}\end{pmatrix}$ but since $dim(W)=1$ there will be only 1 column in the matrix $[T|W]_{B_2}$ and so it is not a matrix at all...

You are restricting the transformation $T$ to each of the invariant subspaces, in turn.  For example, $T|_U$ is a linear transformation $U \to U$, so it is represented by a $2 \times 2$ matrix.  You've displayed a pair of linearly independent vectors that span $U$.  Why not let them be your basis $B_1$?  Then, call the matrix for $T|_U$ in this basis $A_1$.
Since $W$ is $1$-dimensional, it is spanned by a single basis vector, so the basis $B_2$ is a singleton set.  The matrix $A_2$ for $T|_W$ in this basis is $1 \times 1$, so it looks like a single number.
Putting this all together, and using $B_1 \cup B_2$ as a basis for $\Bbb{R}^3$, the matrix for $T$ is a block matrix that looks like
$$
\left[
\begin{array}{c|c}
A_1 & \begin{array}{c} 0 \\ 0 \end{array} \\
\hline
\begin{array}{c c} 0 & 0 \end{array} & A_2
\end{array}
\right]
$$
