Lemma. Invariant dimensions count the double cosets [fdip-013G]

Let \(G\) be a finite group and let \(H\) be a subgroup. Work over \(\mathbb C\). Let \(E\) be the space of functions on the left cosets \(G/H\), with \[(g\cdot f)(xH)=f(g^{-1}xH).\] Decompose \(E\) into irreducible representations. For each irreducible \(V\), the multiplicity equals the dimension of the \(H\)-invariants in \(V\). The number of double cosets \(H\backslash G/H\) equals the sum of the squares of those invariant dimensions. The same sum runs over every irreducible representation of \(G\), up to isomorphism.