Explanation of $|G|=d_1 n_1^2 + \cdots +d_s n_s^2$ in representation theory Can anyone help me to understand the equation
$$|G|=\sum^s_{i=1} d_i n_i^2$$
please?
The context is representation theory of finite groups over a field $\mathbb{K}$ of characteristic zero. I know that for complex representations the is a formula $|G|= \sum_in_i^2$ , where $n_i$'s are the dimensions of the representations. The $d_i$ here are defined as the index $d_i=[D_i : K]$, but I cannot find the book, I saw this, so I don't know what the $D_i$'s are. 
Maybe someone knows this equation?
 A: If $\mathbb{K}$ is algebraically closed (e.g. $\mathbb{K}=\mathbb{C}$), then the Artin-Wedderburn theorem says that the group algebra $\mathbb{K}G$ splits as a direct sum of matrix algebras over $\mathbb{K}$:
$$
\mathbb{K}G \cong \bigoplus_i M_{n_i}(\mathbb{K}).
$$
Each of the matrix algebras, the so-called blocks, consists of $n_i$ copies of isomorphic irreducible representations of dimension $n_i$, corresponding to sub-algebras consisting of matrices that are 0 outside a given column (my modules are left modules). For $i\neq j$, the associated irreducible representations are mutually non-isomorphic, since they are annihilated by different blocks.
That is one way of deriving the familiar formula $|G|=\sum_i n_i^2$.
But when $\mathbb{K}$ is not algebraically closed, this statement needs to be modified. Now, Artin-Wedderburn says that the group algebra $\mathbb{K}G$ is isomorphic to a direct sum of matrix algebras over division algebras:
$$
\mathbb{K}G \cong \bigoplus_i M_{n_i}(D_i),
$$
where each $D_i$ is a division algebra over $\mathbb{K}$, and each block consists of $n_i$ isomorphic copies of irreducible representations, again corresponding to sub-algebras of matrices that are 0 outside a given column. But now, each of these is $n_i$-dimensional over $D_i$, which in turn has dimension $d_i$ over $\mathbb{K}$. Thus, each irreducible representation has dimension $d_in_i$ over $\mathbb{K}$. Hence the formula
$$
\dim_{\mathbb{K}} \mathbb{K}G = \dim_{\mathbb{K}}\left(\bigoplus_i M_{n_i}(D_i)\right)= \sum_i d_in_i^2.
$$
This will become clearer if you consider a specific example. Take $G=Q_8$, the quaternion group of order 8. Let's take a non-algebraically closed field of characteristic 0, e.g. $\mathbb{R}$. Recall that the only division algebras over $\mathbb{R}$ are $\mathbb{R}$, $\mathbb{C}$, and $\mathbb{H}$, the quaternion algebra. It turns out that
$$
\mathbb{R}Q_8 \cong \mathbb{R}\oplus \mathbb{R}\oplus \mathbb{R}\oplus \mathbb{R}\oplus\mathbb{H},
$$
whence $8 = 1+1+1+1+4$. Note that the block corresponding to $\mathbb{H}$ becomes $M_2(\mathbb{C})$ over $\mathbb{C}$, meaning that the irreducible 4-dimensional representation over $\mathbb{R}$ splits as a direct sum of two 2-dimensional irreducible representations over $\mathbb{C}$.
