Decomposition of a representation into a direct sum of irreducible ones I'm studying representation theory and in the book (Fulton and Harris) the author makes the following proposition with the following proof:

Proposition: For any representation $V$ of a finite group $G$, there is a decomposition
$$V = V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k},$$
where the $V_i$ are distinct irreducible representations. The decomposition of $V$ into a direct sum of the $k$ factors is unique, as are the $V_i$ that occur and their multiplicities.
Proof: It follows from Schur's lemma that if $W$ is another representation of $G$, with a decomposition $W = \bigoplus W_j^{\oplus b_j}$, and $\varphi : V\to W$ is a map of representations, then $\varphi$ must map the factor $V_i^{\oplus a_i}$ into the factor $W_j^{\oplus b_j}$ for which $W_j\simeq V_i$; when applied to the identity map of $V$ to $V$, the stated uniqueness follows.

I must confess I didn't understand. The fact that we can decompose $V$ like this I do understand that follows from the fact that if $V$ has a proper nonzero subrepresentation $W$ then there is another subrepresentation $W'$ such that $V = W\oplus W'$. In that case, if either $W$ or $W'$ are not irreducible we can apply the same idea to them, until we have the desired decomposition.
Now, this proof of uniqueness I really can't understand. I mean, uniqueness means that if we have
$$V = V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k}\simeq W_1^{\oplus b_1}\oplus\cdots \oplus W_{r}^{\oplus b_r},$$
then we have $k = r$, $a_i = b_i$ and $W_i\simeq V_i$. I can't understand how this argument the author presents shows all of this.
Indeed the whole point is that $V$ has these two decompositions then they are isomorphic, so that there exists one isomorphism
$$\varphi : V_1^{\oplus a_1}\oplus\cdots \oplus V_k^{\oplus a_k}\to W_1^{\oplus b_1}\oplus\cdots \oplus W_r^{\oplus b_r}.$$
If we restrict it to $V_i$ we get one isomorphism $\varphi : V_i\to \varphi(V_i)$. But why $\varphi(V_i)=W_j$ for some $j$? I mean, couldn't $\varphi(V_i)$ be some other subspace of the direct sum of the $W_i$ which is not one of the $W_i$ themselves?
So how to understand this proof about the decomposition of a representation? What really is the argument used in this proof?
 A: Consider the identity map $id: V \to V$. Since $id$ is bijective and commutes with the $G$-action, it is an isomorphism of representations. This implies that for any decomposition 
$$V= \bigoplus_j W_j^{\oplus b_j}$$
it must be that for each $W_j^{\oplus b_j}$ there exists $V_i^{\oplus a_i}$ such that $id(W_j^{\oplus b_j})=V_i^{\oplus a_i}$, otherwise incurring a violation of Schur's lemma. To see this, note each $W_j$ and $V_i$ are irreducible and hence any homomorphism of representations from one to the other is either the zero map or an isomorphism. But since $id$ is bijective, this means each $W_i$ is isomorphic to its image. This implies that up to a permutation of the factors, the decomposition is unique.
A: I think this may be easier to understand if you change the notation a bit.  Instead of grouping the direct summands by their isomorphism type, just list them all without grouping.  So we have two decompositions $V=\bigoplus S_m$ and $W=\bigoplus T_n$, where each $S_m$ and each $T_n$ is irreducible.  Given an isomorphism $\varphi:V\to W$, let $\varphi_{mn}:S_m\to T_n$ be the composition of $\varphi$ with the inclusion $S_m\to V$ and the projection $W\to T_n$.  By Schur's lemma, each $\varphi_{mn}$ is either an isomorphism or $0$.
Now since $\varphi$ is injective, for each $m$ there must exist some $n$ such that $\varphi_{mn}\neq 0$.  Thus for each $m$, there exists some $n$ such that $\varphi_{mn}$ is an isomorphism, and hence $T_n\cong S_m$.  Moreover, $\varphi_{mn}=0$ for all $n$ such that $T_n\not\cong S_m$.  This means that image of the restriction of $\varphi$ to $S_m$ is contained in the direct sum of all the $T_n$'s which are isomorphic to $S_m$.
Now fix an irreducible representation $R$ and let $A\subseteq V$ be the direct sum of all the $S_m$'s that are isomorphic to $R$, and let $B$ be the direct sum of all the other $S_m$'s, so $V=A\oplus B$.  Similarly, let $C\subseteq W$ be the direct sum of all the $T_n$'s that are isomorphic to $R$, and $D$ be the direct sum of all the other $T_n$'s, so $W=C\oplus D$.  The discussion above shows that $\varphi(A)\subseteq C$ and $\varphi(B)\subseteq D$.  Since $\varphi$ is surjective, we must have $\varphi(A)=C$ and $\varphi(B)=D$.  Thus $\varphi$ gives an isomorphism from $A$ to $C$.  It follows that the number of $S_m$'s which are isomorphic to $R$ is equal to the number of $T_n$'s which are isomorphic to $R$, which is exactly what we wanted to prove.
Note that you're right that, for instance, $\varphi(S_m)$ might not actually be equal to any of the $T_n$.  For instance, if $G$ is trivial, this is just saying that if you have two bases for the vector space, you can have a vector in one basis that is not a scalar multiple of any single vector in the other basis.  But $\varphi(S_m)$ is still isomorphic to one of the $T_n$.  Moreover, $\varphi(A)$ is actually equal to $C$, or in the language of the question, $\varphi(V_i^{\oplus a_i})=W_j^{\oplus b_j}$ for some $j$.  So while the individual irreducible summands might not map to individual irreducible summands, when you group together all the irreducible summands of a given isomorphism type, they map to the sum of all the irreducible summands of the same isomorphism type.
