Matrix of a representation given a decomposition I am having a course about group representations and I saw this today:

If $T : V \rightarrow V$ is a linear transformation and $B$ is a basis
  for $V$ , then we shall use $[T]_B$ to denote the matrix for $T$ in
  the basis $B$. Let $\phi : G \rightarrow GL(V)$ be a decomposable
  representation, say with $V = V_1 \oplus V_2$ where $V_1$ and $V_2$
  are non-trivial G-invariant subspaces. Let $\phi_i = \phi_{| V_i}$.
  Choose bases $B_1$ and $B_2$ for $V_1$ and $V_2$, respectively. Then
  it follows from the denition of a direct sum that $B$ = $B_1 \cup
 B_2$ is a basis for $V$ . Since $V_i$ is $G$-invariant, we have
  $\phi(g)(B_i) \subseteq V_i = \mathbb{C} B_i$. Thus we have in matrix
  form $$ [\phi(g)]_B = \begin{bmatrix} [\phi_1(g)]_{B_1} & 0 \\ 0 &
 [\phi_2(g)]_{B_2} \end{bmatrix} $$

But why is the matrix of this form? Can someone give a detailed explanation? (I know this is linear algebra).
Thank you in advance.
 A: First I assume that you mean that $\phi_i(g) = \phi(g)\lvert_{V_i}$
Say that $B_1 = \{e_1, \dots, e_n\}$ and $B_2 = \{f_1, \dots, f_m\}$. Then, as you note, $B = B_1 \cup B_2$. With respect to this basis you want to write down the matrix for $\phi(g)$. The way you (by definition) do this is:


*

*The first column in the matrix is the (vertical) vector you get by finding $\phi(g)e_1 = \phi_1(g)e_1$

*The second column in the matrix is the (vertical) vector you get by finding $\phi(g)e_2 = \phi_1(g)e_2$

*And so on

*The last column in in the matrix is the (vertical) vector you get by finding $\phi(g)f_m = \phi_2(g)f_m$


Now you have have noted that $\phi(g)B_1 \subseteq \mathbb{C}B_1$ so that means that the vectors in the first $n$ columns only have something non-zero in the first $n$ entries (rows). That is $\phi(g)e_i \subseteq \mathbb{C}B_1$.
Likewise $\phi(g)B_2\subseteq \mathbb{C}B_2$, so the vectors in the last $m$ columns on the matrix will only have something non-zero in the last $m$ entries (rows).
