[proofplan]
The proof centres on the **regular representation** $\rho_{\mathrm{reg}}: G \to \operatorname{GL}(\mathbb{C}G)$, where $G$ acts on the group algebra $\mathbb{C}G$ by left multiplication. We compute its character $\pi_{\mathrm{reg}}$ in two different ways. First, by counting fixed basis vectors: $\pi_{\mathrm{reg}}(1) = |G|$ and $\pi_{\mathrm{reg}}(h) = 0$ for $h \neq 1$. Second, by decomposing $\pi_{\mathrm{reg}}$ into irreducibles via [Maschke's Theorem](/theorems/2409) and reading off the multiplicity of each $\chi_j$ using row orthogonality and the [Multiplicity Formula](/theorems/2420): the result is $\pi_{\mathrm{reg}} = \sum_j n_j \chi_j$ where $n_j = \dim \rho_j$. Evaluating both expressions at $g = 1$ and equating them gives $|G| = \sum_j n_j^2$.
[/proofplan]
[step:Define the regular representation and its character]
Let $\mathbb{C}G$ denote the group algebra of $G$ over $\mathbb{C}$: it is a $\mathbb{C}$-vector space of dimension $|G|$ with distinguished basis $\{e_g : g \in G\}$ indexed by elements of $G$. Define the **regular representation** as the map
\begin{align*}
\rho_{\mathrm{reg}}: G &\to \operatorname{GL}(\mathbb{C}G), \\
g &\mapsto \rho_{\mathrm{reg}}(g),
\end{align*}
where $\rho_{\mathrm{reg}}(g)$ is the linear extension of the permutation $e_h \mapsto e_{gh}$ on basis vectors. Composition of permutations gives the homomorphism property: $\rho_{\mathrm{reg}}(g_1) \rho_{\mathrm{reg}}(g_2)(e_h) = \rho_{\mathrm{reg}}(g_1)(e_{g_2 h}) = e_{g_1 g_2 h} = \rho_{\mathrm{reg}}(g_1 g_2)(e_h)$ for all basis vectors. So $\rho_{\mathrm{reg}}$ is a complex representation of $G$ of dimension $|G|$. Denote its character by $\pi_{\mathrm{reg}}$.
[/step]
[step:Compute $\pi_{\mathrm{reg}}(g)$ by counting fixed basis vectors]
Fix $g \in G$. With respect to the basis $\{e_h : h \in G\}$, the matrix $[\rho_{\mathrm{reg}}(g)]$ is a permutation matrix: its $(h, h')$-entry is $1$ if $g h' = h$ (i.e. $h' = g^{-1} h$) and $0$ otherwise. The trace counts the number of indices $h$ with $g h = h$, i.e. the number of fixed basis vectors. The equation $g h = h$ (in $G$) holds iff $g = 1$. Hence:
\begin{align*}
\pi_{\mathrm{reg}}(g) = \begin{cases} |G| & \text{if } g = 1, \\ 0 & \text{if } g \neq 1. \end{cases}
\end{align*}
The value at $g = 1$ is $|G|$ because $\rho_{\mathrm{reg}}(1)$ is the identity on $\mathbb{C}G$, whose trace equals $\dim \mathbb{C}G = |G|$.
[guided]
The regular representation realises $G$ as a permutation group on its own elements, by left translation. Concretely, $\rho_{\mathrm{reg}}(g)$ permutes the basis $\{e_h\}$ via $e_h \mapsto e_{gh}$.
For a permutation representation, the character at $g$ counts the number of basis vectors fixed by $\rho_{\mathrm{reg}}(g)$:
\begin{align*}
\pi_{\mathrm{reg}}(g) = |\{h \in G : g h = h\}|.
\end{align*}
The equation $g h = h$ in the group $G$ is equivalent to $g = 1$ (multiply on the right by $h^{-1}$). So when $g \neq 1$, no basis vector is fixed, and $\pi_{\mathrm{reg}}(g) = 0$. When $g = 1$, every basis vector is fixed, and $\pi_{\mathrm{reg}}(1) = |G|$.
This is the key combinatorial input: $\pi_{\mathrm{reg}}$ is supported only at the identity element of $G$, where it takes the value $|G|$.
[/guided]
[/step]
[step:Decompose $\pi_{\mathrm{reg}}$ into irreducibles via Maschke and compute the multiplicities]
Apply [Maschke's Theorem](/theorems/2409) to $\rho_{\mathrm{reg}}$. Hypothesis check: $G$ is finite (global hypothesis) and $\operatorname{char} \mathbb{C} = 0$ does not divide $|G|$, so $\rho_{\mathrm{reg}}$ is completely reducible. Let $\rho_1, \ldots, \rho_k$ be representatives of the isomorphism classes of irreducible complex representations of $G$, with characters $\chi_1, \ldots, \chi_k$ and dimensions $n_j = \chi_j(1) = \dim \rho_j$. By complete reducibility there exist non-negative integers $a_j \geq 0$ with
\begin{align*}
\rho_{\mathrm{reg}} \cong \bigoplus_{j=1}^k a_j \rho_j, \quad \text{equivalently} \quad \pi_{\mathrm{reg}} = \sum_{j=1}^k a_j \chi_j,
\end{align*}
the second using Property 4 of [Elementary Properties of Characters](/theorems/2421).
To compute $a_j$, take the inner product with $\chi_j$. By the [Multiplicity Formula](/theorems/2420) (or, equivalently, by row orthogonality applied to the decomposition above, using [Row Orthogonality Relations](/theorems/2430)):
\begin{align*}
a_j = \langle \pi_{\mathrm{reg}}, \chi_j \rangle = \frac{1}{|G|} \sum_{g \in G} \overline{\pi_{\mathrm{reg}}(g)}\, \chi_j(g).
\end{align*}
By Step 2, the only non-zero term in this sum is at $g = 1$, where $\pi_{\mathrm{reg}}(1) = |G|$ (real). Hence
\begin{align*}
a_j = \frac{1}{|G|} \cdot |G| \cdot \chi_j(1) = \chi_j(1) = n_j.
\end{align*}
So
\begin{align*}
\pi_{\mathrm{reg}} = \sum_{j=1}^k n_j\, \chi_j.
\end{align*}
[guided]
We now decompose $\rho_{\mathrm{reg}}$ as a direct sum of irreducibles. [Maschke's Theorem](/theorems/2409) requires the field characteristic not to divide $|G|$. Over $\mathbb{C}$ (characteristic $0$), this is automatic. So Maschke produces non-negative integers $a_1, \ldots, a_k$ with
\begin{align*}
\rho_{\mathrm{reg}} \cong \bigoplus_j a_j \rho_j.
\end{align*}
Taking characters (additivity of characters under direct sums, Property 4 of [Elementary Properties of Characters](/theorems/2421)):
\begin{align*}
\pi_{\mathrm{reg}} = \sum_j a_j \chi_j.
\end{align*}
We extract $a_j$ via the [Multiplicity Formula](/theorems/2420): the multiplicity of $\rho_j$ in any representation $\rho$ with character $\chi$ equals $\langle \chi, \chi_j \rangle$. So
\begin{align*}
a_j = \langle \pi_{\mathrm{reg}}, \chi_j \rangle = \frac{1}{|G|} \sum_g \overline{\pi_{\mathrm{reg}}(g)} \chi_j(g).
\end{align*}
But by Step 2, $\pi_{\mathrm{reg}}(g) = 0$ except at $g = 1$, where $\pi_{\mathrm{reg}}(1) = |G|$. So the entire sum collapses:
\begin{align*}
a_j = \frac{1}{|G|} \cdot \overline{|G|} \cdot \chi_j(1) = \chi_j(1) = n_j.
\end{align*}
The multiplicity of $\rho_j$ in the regular representation is exactly $n_j = \dim \rho_j$. This is a striking fact in its own right: every irreducible appears in $\rho_{\mathrm{reg}}$, and it appears with multiplicity equal to its dimension.
[/guided]
[/step]
[step:Equate the two computations of $\pi_{\mathrm{reg}}(1)$ to obtain $|G| = \sum n_j^2$]
Evaluate the decomposition $\pi_{\mathrm{reg}} = \sum_j n_j \chi_j$ at $g = 1$:
\begin{align*}
\pi_{\mathrm{reg}}(1) = \sum_{j=1}^k n_j \chi_j(1) = \sum_{j=1}^k n_j \cdot n_j = \sum_{j=1}^k n_j^2.
\end{align*}
By Step 2, $\pi_{\mathrm{reg}}(1) = |G|$. Equating:
\begin{align*}
|G| = \sum_{j=1}^k n_j^2.
\end{align*}
This is the claimed identity.
[guided]
We have two expressions for $\pi_{\mathrm{reg}}(1)$:
- From Step 2 (direct trace count): $\pi_{\mathrm{reg}}(1) = |G|$.
- From Step 3 (decomposition): $\pi_{\mathrm{reg}} = \sum_j n_j \chi_j$, so evaluating at $1$ and using $\chi_j(1) = n_j$ gives $\pi_{\mathrm{reg}}(1) = \sum_j n_j \cdot n_j = \sum_j n_j^2$.
Setting them equal:
\begin{align*}
|G| = \sum_{j=1}^k n_j^2.
\end{align*}
The identity is the **dimension count for irreducibles**: it forces strong constraints on the dimensions of the irreducible representations. For example, the one-dimensional trivial representation $1_G$ always contributes $1^2 = 1$ to the sum, so the sum of squares of dimensions of the remaining irreducibles equals $|G| - 1$. This is enormously useful in practice when constructing character tables.
[/guided]
[/step]