I am reading the following paper: https://arxiv.org/pdf/math/0211450.pdf (p.10).
In particular, the following part:
My question is the part with red line. Why taking square of $n_i$?
I read the following article: Inequivalent representations of a finite group, which says $$\deg \chi=\sum_{i=1}^k n_i\deg\chi_i$$ where $\chi_i$ is the character of the representation $\rho_i$. The above equality says the degree of the representation $\rho$ is the summation of the multiplicity of each $\rho_i$ times the degree of $\rho_i$. And $\rho = m_i\rho_i\oplus \cdots\oplus m_k\rho_k$.
But I still have no idea why the group order, which represents the number of elements in $G$, is equal to that summation.
Let $\alpha$ and $\beta$ be class functions from $G$ to $\Bbb{C}$ (i.e. $\alpha, \beta:G \to \Bbb{C}$ that are constant on the conjugacy classes). Define an inner product $(\alpha,\beta)$ to be $\frac{1}{|G|}\displaystyle\sum_{g \in G} \overline{\alpha(g)}\beta(g)$. One result that we have for this inner product is that the characters of the irreducible representations are orthonormal with respect to this inner product. This gives a projection formula of characters onto irreducible characters. So one can decompose a representation into its irreducible representations using this.
The character of the regular representation is $\chi_R(g) = \begin{cases}|G| &g=e\\ 0 & \text{else}\end{cases}$. So if $V_i$ is an irreducible representation, $(\chi_R,\chi_{V_i})=\frac{1}{|G|}|G|\chi_{V_i}(e)=\dim(V_i)$. So $R = V_1^{\oplus\dim(V_1)}\oplus \cdots \oplus V_h^{\oplus\dim(V_h)}$. So $|G| = \chi_R(e) = \displaystyle\sum_{i=1}^h \dim(V_i) \chi_{V_i}(e) = \displaystyle\sum_{i=1}^h \dim(V_i)^2$ which is the result you were looking for.