I am am very confused about a fundamental result in representation theory of finite groups. Please let me first introduce the setting.
Let $G$ be a finite group. The group algebra $\mathbb{C}[G]$ is a semisimple ring by Maschke's theorem. Hence, there is an isomorphism $$ \mathbb{C}[G]\cong U_1\oplus\ldots\oplus U_n \hspace{20pt}\text{(1)} $$ for simple $\mathbb{C}[G]$ (always ignored in this question: left-)modules $U_i$ and those correspond to (wlog non-trivial) irreducible complex representations of $G$. In particular, we get a formula $|G|=|U_1|+\ldots+|U_n|$ by taking the dimension as complex vector spaces.
On the other hand the Artin-Wedderburn implies that the semisimple ring $\mathbb{C}[G]$ decomposes as $$ \mathbb{C}[G]\cong M_1\oplus\ldots\oplus M_m\hspace{20pt}\text{(2)} $$ where $M_i$ are (wlog non-trivial) matrix rings over division rings $D_i$. It can be seen that $m$ equals the number of conjugacy classes of $G$ and the number of non-equivalent (and non-trivial) irreducible representations of $G$ and one has the formula $|G|=d_1^2+\ldots+d_m^2$ where the $d_i$ are the dimensions of the irreducible representations of $G$.
My question is basically:
How do the two decompositions (1) and (2) relate?
My guess is the following: In the decomposition (1), some of the $U_i$ may be isomorphic as $\mathbb{C}[G]$-modules. Group them together to obtain $$ \mathbb{C}[G]\cong (U_{1}\oplus\ldots\oplus U_{j_1})\oplus\ldots\oplus(U_{j_{k-1}+1}\oplus\ldots\oplus U_{j_k}) $$ (to keep the indexing simple, we assumed that in (1) the modules already ordered properly.). Then one can perhaps (?) show that $$ U_{i_{k-1}+1}\oplus\ldots\oplus U_{i_k}\cong M_i $$ as $\mathbb{C}[G]$ modules. Is this the right way to relate (1) and (2)? Thank you.