Let V be an n-dimensional vector space, and assume $\displaystyle V=U\oplus W$ for subspaces U and W. Suppose $\displaystyle T:V\rightarrow V$ is a linear transformation such that $\displaystyle T(U)\subseteq U$ and $\displaystyle T(W)\subseteq W$.

Show that the matrix of T with respect to a basis of V that contains bases of U and W, has block shape:

$\displaystyle \[ \left( \begin{array}{cc}

A & 0 \\

0 & B \end{array} \right)\]$

I am having trouble seeing how the matrix that represents T would be a 2x2 matrix.

So far in my working I have set the basis of U to be $\displaystyle {v_1,v_2,...,v_k}$ and the basis of W to be $\displaystyle v_{k+1},v_{k+2},...,v_n$ and I can see that under the T(u) (where $\displaystyle u\in U$) can be written as a linear combination of the elements in the basis. But I can't see where to go from there. Help would really be appreciated.