A product over the characters of a finite abelian group I'm comming up with the following problem in my algebraic number theory course:
Problem: Let $G$ be an abelian group (the operation is denoted as multiplication) of order $fg$. Let $a \in G$ be such that the order of $a$ is $f$. Prove that
$$
\prod_{\chi \in \widehat{G}}(1-\chi(a)T) = (1-T^f)^g,
$$
where $\widehat{G}$ is the group consists of all multiplicative characters $\chi: G \rightarrow \mathbb{C}^{\times}$. We know that $G$ is canonically isomorphic to $\widehat{G}$.
Question: How to prove this?
Attempts: I'm trying to expand both sides and compare the coefficient. The right hand side is direct by binomial theorem:
$(1-T^f)^g = \sum_{k=0}^{g}\binom{g}{k}(-T)^{kf}.$ On the left hand side, the coefficient of $(-T)^n$ is
$$
C_n := \sum_{1 \leq i_1 < i_2 < \cdots < i_n \leq fg} \chi_{i_1}(a) \chi_{i_2}(a) \cdots \chi_{i_n}(a).
$$
Comparing the coefficients, I'm trying to prove:
Claim: $C_n = \binom{g}{m}$ when $n=fm$ for some $m \in \mathbb{Z}_{\geq 0}$, and $C_n = 0$ when $f \nmid n$.
A special case: when $n=1$ and $a \neq 1_G$, $C_1 = 0$ by the orthogonality of characters: $\sum_{\chi \in \widehat{G}} \chi(g) = 0$ if $g \neq 1_G$. So to prove the claim, I also tried to imitate the proof of this orthogonality relation.

Proof: Let $g \in G-\{1_G\}$, then consider the group $G^{\prime}$ generated by $g$. Then $|G/G^{\prime}| < n$. Consider $H = \{\chi \in \widehat{G}: \chi(g)=1\}$, then for any $\chi \in H$, $\ker \chi \supset G^{\prime}$, hence $\chi$ induces $\widetilde{\chi}: G/G^{\prime} \rightarrow \mathbb{C}^{\times}$. Moreover, different characters in $H$ induces different characters on $G/G^{\prime}$. Hence
$$
|H| \leq |(G/G^{\prime})^{\wedge}| = |G/G^{\prime}| < n = |G| = |\widehat{G}|.
$$
Hence $H \subsetneq \widehat{G}$ and therefore, there exists $\psi \in \widehat{G}$ such that $\psi(g) \neq 1$. Therefore
$$
\sum_{\chi \in \widehat{G}} \chi(g) = \sum_{\chi \in \widehat{G}} \psi \chi(g) = \sum_{\chi \in \widehat{G}} \psi(g) \chi(g) = \psi(g) \sum_{\chi \in \widehat{G}} \chi(g).
$$
As $\psi(g) \neq 1$, the only chance is that $\sum_{\chi \in \widehat{G}} \chi(g)=0$.

Inspired by this, I'm trying to consider the order $f$ subgroup generated by $a$ in $G$. But I got stuck here and not knowing how to carry on.
Further question: since the notations here, especially $f$ and $g$ here is also used in the decomposition of primes in number fields (where $f$ is the inertia degree and $g$ is the number of distinct prime ideals in the decompostion of $\mathfrak{p} \subset \mathcal{O}_K$ in $\mathcal{O}_L$.) So just a wild guess, does this have any background on some more deeper results or useful tricks, or some relations to decomposition of primes? Where the result maybe used in number theory?
Sorry for such a long post and thank you all for commenting and answering! :)
 A: I will try to answer the further question by giving some context and motivation from number theory. It will take some time to set everything up before we see the identity in the question appear, but we will see some interesting number theory along the way.
Let $K$ be any number field. Then we have the Dedekind zeta function defined as $$\zeta_K(s)=\sum_{I \subset \mathcal O_K} \frac{1}{N(I)^s}$$ where the sum ranges over all nonzero ideals of the ring of integers $\mathcal O_K$. One can show that this admits analytic continuation and gives rise to an $L$-function that contains a lot of information about the arithmetic of $K$. For a striking result in this direction, see the class number formula.
To better unterstand the Dedekind zeta function, it would be interesting to decompose it into other functions which are maybe easier to understand. Over a general number field, such a decomposition is given via Artin L-functions associated to complex irreducible representations of the Galois group, but they are quite difficult to understand (we don't know if there's analytic continuation for Artin L-functions, that's actually a big open problem in the theory of L-functions.). So let us restrict to a special case:
Let $K$ be the cyclotomic field $K=\Bbb Q(\zeta_n)$. Then the Galois group $\mathrm{Gal}(K/\Bbb Q)\cong (\Bbb Z/n\Bbb Z)^\times$ is abelian, so all complex irreducible representations are one-dimensional which makes the corresponding $L$-functions much easier to handle. In fact, the complex irreducible representations and the corresponding L-functions may be described in terms of other prominent objects in number theory (appearing in elementary, algebraic and analytic number theory), namely Dirichlet characters.
A Dirichlet character $\chi$ of modulus $n$ is simply a group homomorphism $\tilde{\chi}:(\Bbb Z/n\Bbb Z)^\times \to \Bbb C^\times$ that is extended to a function $\chi:\Bbb Z \to \Bbb C$ via $$m \mapsto \begin{cases}\tilde{\chi}(\overline{m})&\text{if $\gcd(n,m)=1$}\\0& \text{else} \end{cases}$$ Of course no new information is added in this way, so we can easily recover the original group homomorphism from the associated Dirichlet character.
As $\Bbb C^\times=\mathrm{GL}_1(\Bbb C)$ and $\mathrm{Gal}(K/\Bbb Q)\cong (\Bbb Z/n\Bbb Z)^\times$, we see that Dirichlet characters of modulus $n$ correspond exactly to one-dimensional (or equivalently, as mentioned before: irreducible) complex representations of $\mathrm{Gal}(K/\Bbb Q)$. To each Dirichlet character $\chi$, we can associate a Dirichlet $L$-function via defining
$$L(\chi,s)=\sum_{m \geq 1}\frac{\chi(m)}{m^s}$$
(Note that if $n=1$ and so necessarily $\chi\equiv 1$, this is the Riemann zeta function. Dirichlet L-functions are probably the easiest class of L-functions after the Riemann zeta function.)
Now the decomposition of the Dedekind zeta function as a product of $L$-functions specializes in our case to the following relation:
$$\zeta_K(s)=\prod_{\mathfrak{p} \mid n\mathcal O_K} \frac{1}{1-N(\mathfrak{p})^{-s}}\prod_{\chi}L(\chi,s)$$ where the product is taken over all Dirichlet characters $\chi$ of modulus $n$. Here the product $\prod_{\mathfrak{p} \mid n\mathcal O_K} \frac{1}{1-N(\mathfrak{p})^{-s}}$ is taken over all prime ideals $\mathfrak{p}$ dividing $n \mathcal O_K$. Here the first factor on the RHS is just some mostly irrelevant normalization factor. If we normalized our Dirichlet L-functions differently (working with the associated primitive character to each character), it would disappear.
If we try to prove this directly (i.e. without refering to more general results on Artin L-functions), we can see how the identity from the question appears. Let's start by some observations. Any Dirichlet character is a completely multiplicative function so that we get an Euler product (by exactly the same proof as for the Riemann zeta function)
$$L(\chi,s)=\prod_{\text{$p$ prime}}\frac{1}{1-\chi(p)p^{-s}}$$
Similarly, by using the unique factorization of ideals in $\mathcal O_K$, we get an Euler product
$$\zeta_K(s)=\prod_{\mathfrak{p} \subset \mathcal O_K}\frac{1}{1-N(\mathfrak{p})^{-s}}$$ where $\mathfrak{p}$ ranges over all maximal ideals of $\mathcal O_K$.
Every non-zero prime ideal of $\mathcal O_K$ lies over a non-zero prime ideal of $\Bbb Z$, so to prove our product decomposition, we can use the Euler products to work with one prime number at a time.
For the ramified primes, i.e. those prime numbers $p$ which divide $n$, all the Euler factors of the Dirichlet L-functions are $1$ because then $\chi(p)=0$, so we get exactly the correct contribution from the normalization factor $\prod_{\mathfrak{p} \mid n\mathcal O_K} \frac{1}{1-N(\mathfrak{p})^{-s}}$ and no contribution from the Euer factors of the Dirichlet L-functions.
It is sufficient to show the following identity for every prime number $p$ coprime to $n$:
$$\prod_{\substack{\mathfrak{p} \subset \mathcal O_K \\ (p)= \mathfrak{p} \cap \Bbb Z}}(1-N(\mathfrak{p})^{-s})=\prod_{\chi}(1-\chi(p)p^{-s})$$
Here the product on the left hand side is taken over all prime ideals in $\mathcal O_K$ lying over $(p)$ and the product on the right hand side is taken over all Dirichlet characters of modulus $n$.
To analyze the product $\displaystyle\prod_{\substack{\mathfrak{p} \subset \mathcal O_K\\ (p)= \mathfrak{p} \cap \Bbb Z}}(1-N(\mathfrak{p})^{-s})$, we can consider the splitting behaviour of $p$ in $\mathcal O_K$. In fact, for a cyclotomic field, the splitting of primes has quite a simple description:

Let $K=\Bbb Q(\zeta_n)$ and let $p$ be a prime number coprime to $n$. Then $p$ is unramified in $\mathcal O_K$ and splits into a product of $g$ primes, each with inertia degree $f$, where $f$ is the order of $\overline{p}$ in $(\Bbb Z/n\Bbb Z)^\times$ and $g=\varphi(n)/f$.

Now suppose that we have a prime a prime ideal $\mathfrak{p}$ in $\mathcal O_K$ lying over $p$ of inertia degree $f$, $\mathcal O_K/\mathfrak{p} \cong \Bbb F_{p^f}$, so that $N(\mathfrak{p})=p^f$.
If we use this information on the splitting behaviour of $p$, we get
$$\prod_{\substack{\mathfrak{p} \subset \mathcal O_K \\(p)= \mathfrak{p} \cap \Bbb Z}}(1-N(\mathfrak{p})^{-s})=(1-(p^{-s})^f)^g$$ where $f$ is the order of $\overline{p}$ in $(\Bbb Z/n\Bbb Z)^\times$ and $g=\varphi(n)/f$
We need to show that this is equal to $$\sum_{\chi}(1-\chi(p)p^{-s})$$ which is of course a special case of the identity in the question for $G=(\Bbb Z/n\Bbb Z)^\times$ and $a=\overline{p}$ and $T=p^{-s}$. So this explains why the identity from the question is relevant to number theory.
Let me conclude by remarking that this decompositon of the Dedekind zeta function of $\Bbb Q(\zeta_n)$ into a product of Dirichlet L-functions has quite nontrivial consequences:
Indeed, one can show that the Dedekind zeta function has a simple pole at $s=1$ and that the Dirichlet L-function for the principal character (i.e. the one coming from the trivial group homomorphism) also has a simple pole at $s=1$. Furthermore, the Dirichlet L-functions for all non-prinicipal characters can be shown to be holomorphic at $s=1$ (using the orthogonality relations for characters). But from the product decomposition of the Dedekind zeta function into Dirichlet L-functions, this implies that for each non-principal Dirichlet character $\chi$, we have $L(\chi,1)\neq 0$, because $L(\chi,1)=0$ would cancel the simple pole from the L-function of the principal character, leaving $\zeta_K(s)$ with no pole at $s=1$. This is a nontrivial result and with a bit of series manipulation, one can use it to show that for each pair of integers $a,n$ such that $\gcd(a,n)=1$, the sum $$\sum_{\substack{\text{$p$ prime}\\ p\equiv a \pmod{n}}} p^{-1}$$ diverges, which shows Dirichlet's theorem on primes in arithmetic progressions.
(If one works over a general number field and with Artin L-functions instead of Dirichlet L-functions, a similar argument is used to prove the Chebotarev density theorem, which is an imporant result on algebraic number theory, used e.g. in class field theory.)
A: Thanks @franz lemmermeyer for his hint in the comment! Following his hint, I have written a solution imitating the proof of the orthogonality relation:
PROOF: Since $a \in G$, $\mathrm{ord}_{G}(a)=f$, $\chi(a^f)=(\chi(a))^f = 1$. Hence $\chi(a)$ is a $f$-th root of unity for any $\chi \in \widehat{G}$.
STEP 1: Consider the evaluation map
$$
\mathrm{ev}_a: \widehat{G} \rightarrow \mathbb{C}^{\times}, \, \chi \mapsto \chi(a).
$$
Let $H := \ker(\mathrm{ev}_a) = \{ \chi \in \widehat{G}: \chi(a)=1\}$. By the isomorphism theorem, we obtain an injection
$$
\overline{\mathrm{ev}}_a: \widehat{G}/H \hookrightarrow \mathbb{C}^{\times}.
$$
Now, we shall count $\widehat{G}/H$.
STEP 2: Let $G^{\prime}$ be the subgroup of $G$ generated by $a$ of order $f$. Let $\chi \in H$, then $\ker \chi \supset G^{\prime}$. So we obtain an induced character on $G/G^{\prime}$: $\overline{\chi}: G/G^{\prime} \rightarrow \mathbb{C}^{\times}$. Different characters in $H$ induces different characters on $G/G^{\prime}$. Hence
$$
|H| \leq |(G/G^{\prime})^{\wedge}| = |G/G^{\prime}|=g.
$$
Conversely, for any character $\phi \in (G/G^{\prime})^{\wedge}$, we can lift it to a character in $H$ as
$$
\widetilde{\phi}: G \rightarrow \mathbb{C}^{\times}; \, a^k \mapsto 1, \, g \mapsto \phi(gG^{\prime}) \text{ for } g \not\in G^{\prime}. 
$$
It is direct to check that $\widetilde{\phi} \in \widehat{G}$. Hence $|H|=g$.
Combining STEP 1 and STEP 2, we get the result in the hint of @franz lemmermeyer : as $\chi$ runs over $\widehat{G}$, $\chi(a)$ attains each $f$-th root of unity exactly $g$ times. Therefore,
$$
\prod_{g \in \widehat{G}}(1-\chi(a)T) = (\prod_{\zeta \in \mu_f(\mathbb{C})} (1-\zeta T))^g.
$$
So it remains to show that $1-T^{f} = \prod_{\zeta \in \mu_f(\mathbb{C})} (1-\zeta T)$. This is clear, once we note that $T^f-1 = \prod_{\zeta \in \mu_f(\mathbb{C})} (T-\zeta)$ and applying $T \mapsto 1/T$, clearing the denominator.  $\square$
As we have proved the equality, the CLAIM in the post also holds. We summarize it into the following way:
Proposition: Let $G$ be a finite abelian group of order $n$. Let $a \in G$ be an element of order $m$. Denote $\widehat{G} = \{\chi_1, \ldots, \chi_n\}$, we have
$$
\sum_{1 \leq i_1 < \cdots < i_\ell \leq n} \chi_{i_1}(a)\cdots \chi_{i_\ell}(a) = \begin{cases}
\binom{n/m}{\ell/m} ,\quad& \text{ when } m \mid \ell, \\
0 ,\quad& \text{ when } m \nmid \ell.
\end{cases}
$$
This may be viewed as a generalized orthogonal relation of characters. Applying $\ell=1$, we obtain the orthogonality relation of characters in the usual sense:
Corollary: Let $G$ be a finite abelian group of order $n$. Let $g \in G$. Then
$$
\sum_{\chi \in \widehat{G}} \chi(g) = \begin{cases}
n ,\quad& \text{ when } g=1_G, \\
0 ,\quad& \text{ when } g \neq 1_G.
\end{cases}
$$
