# Questions about the sum of Dirichlet characters.

Let $G_N$ be the multiplicative group $(\mathbb{Z}/N\mathbb{Z})^*$ (the order of $G_N$ is $\phi(N)$, the number of integers $n$ such that $1 \leq n \leq N$ and $(n, N)=1$). A Dirichlet character modulo $N$ is a homomorphism of multiplicative groups, $$\chi: G_N \to \mathbb{C}^*.$$ Let $\widehat{G_N}$ be the group consisting Dirichlet characters modulo $N$ whose multiplication is defined by $( \chi \psi )(n) = \chi (n) \psi (n)$. We have the following formulas. $$\sum_{n \in G_N} \chi(n) = \begin{cases} \phi(N) & \text{if } \chi=1 \\ 0 & \text{if } \chi \neq 1 \end{cases} \quad (1)$$ $$\sum_{\chi \in \widehat{G_N} } \chi(n) = \begin{cases} \phi(N) & \text{if } n=1 \\ 0 & \text{if } n \neq 1 \end{cases} \quad (2)$$ The proof of (1) is as follows. Let $n_0$ be an integer such that $(n_0, N)=1$. Since $G_N$ is a group and $(n_0, N)=1$, $$\sum_{n\in G_N} \chi(n) = \sum_{n\in G_N} \chi(n_0 n) = \chi(n_0) \sum_{n\in G_N} \chi(n).$$ It follows that $$(\chi(n_0) - 1) \sum_{n\in G_N} \chi(n) = 0.$$ Suppose that $\sum_{n\in G_N} \chi(n) \neq 0$. Then $\chi(n_0)=1$. That is $\chi(n_0)=1$ for all $n_0$ such that $(n_0, N)=1$. Therefore $\chi=1$ is the trivial character modulo $N$.

I have some questions about the proof of (2). Let $\chi_0$ be a Dirichlet character modulo $N$. Then $$\sum_{\chi \in \widehat{G_N}} \chi(n) = \sum_{\chi \in \widehat{G_N}} \chi_0(n)\chi(n) = \chi_0(n) \sum_{\chi \in \widehat{G_N}} \chi(n).$$ It follows that $$(\chi_0(n)-1) \sum_{\chi \in \widehat{G_N}} \chi(n)=0.$$ Suppose that $\sum_{\chi \in \widehat{G_N}} \chi(n) \neq 0$. Then $\chi_0(n)=1$. That is $\chi_0(n)=1$ for all $\chi_0 \in \widehat{G_N}$. Could we conclude that $n=1$? Are there other proofs of (1) and (2)? Thank you very much.

Perhaps you'd be interested in a little more generality.

If $G$ is any finite group (say of order $n$), there are notions of representations of $G$. These are just homomorphisms $\rho:G\to\text{GL}(V)$ where $V$ is a f.d. $\mathbb{C}$-space. Such representations are called irreducible if the only non-trivial $\rho$-invariant (i.e. invariant under all the linear transformations in $\rho(G)\subseteq\text{GL}(V)$) subspaces of $V$ are the trivial ones.

Given any representation $\rho$ of $G$, one can associate to it a character $\chi_\rho:G\to \mathbb{C}$ defined by $\chi_\rho(g)=\text{tr}(\rho(g))$. The set $\text{irr}(G)$ of irreducible characters is merely the set of characters coming from an irreducible representation of $G$.

Now, while it may be non-obvious, the set $\text{irr}(G)$ is finite. In fact, a simplistic bound is that $\#\text{irr}(G)\leqslant n$, and in fact, $\#\text{irr}(G)$ is the number of conjugacy classes of $G$. This comes from the non-obvious fact that if $Z(\mathbb{C}[G])$ denotes the set of class functions on $G$ (i.e. functions $G\to\mathbb{C}$ which are constant on conjugacy classes) then $\text{irr}(G)$ forms a basis for $Z(\mathbb{C}[G])$. In fact, not only do they form a basis, they form an orthonormal basis. Of course, the obvious question, is with respect to what inner product? While it may seem opaque at first, if you haven't seen such matters before, the correct inner product on $Z(\mathbb{C}[G])$ is the weighted convolution:

$$\langle f_1,f_2\rangle=\frac{1}{|G|}\sum_{g\in G}f_1(g)\overline{f_2(g)}$$

Now, there is serious verbiage needed to justify why, in fact, the irreducible characters of $G$ form an orthornormal set with respect to this inner product. But, once this verbiage has been doled out, you get (by mere definition) the following equality

$$\frac{1}{|G|}\sum_{g\in G}\chi_i(g)\overline{\chi_j(g)}=\langle \chi_i,\chi_j\rangle=\delta_{i,j}$$

if $\text{irr}(G)=\{\chi_1,\ldots,\chi_m\}$. This is the so-called first orthogonality relation for irreducible characters.

The first in first orthgonality relation surely hints that we're not done--and we're not. There is a second orthogonality relation:

$$\frac{1}{|G|}\sum_{\chi\in\text{irr}(G)}\chi(g)\overline{\chi(h)}=\#(\mathbf{C}_G(g))c(g,h)$$

where $\mathbf{C}_G(g)$ denotes the centralizer of $g$ in $G$, and $c(g,h)$ is $1$ if $g$ is conjugate to $h$, and zero otherwise.

Now, at this point, you may be really confused as to what this has to do with your question. The answer is somewhat simple, but perhaps non-obvious. Note if $G$ is any group, and $\chi$ is a homomorphism $G\to\mathbb{C}^\times$, then in fact $\chi$ is a representation of $G$--since $\text{GL}_1(\mathbb{C})=\mathbb{C}^\times$. Moreover, since $\mathbb{C}$ has no non-trivial subspaces, such homomorphisms are trivially irreducible! Lastly noting that the trace of something in the range of $G\to\text{GL}_1(\mathbb{C})$ is nothing but the value that $\chi$ takes at the point of $g$, we can see that, in fact, $\text{Hom}(G,\mathbb{C}^\times)\subseteq\text{irr}(G)$. Now, I told you that $\#\text{irr}(G)$ is the number of conjugacy classes of $G$, and so when $G$ is abelian, $\#\text{irr}(G)=n$. But, if $G$ is abelian, say, you know that $\text{Hom}(G,\mathbb{C}^\times)\cong G$ (why?), and thus we can piece everything together to see that $\text{irr}(G)=\text{Hom}(G,\mathbb{C}^\times)$.

Thus, for an abelian group $G$, the orthogonality relations read as follows:

$$\frac{1}{|G|}\sum_{g\in G}\chi(g)\overline{\psi(g)}=\delta_{\chi,\psi}\qquad \chi,\psi\in\text{Hom}(G,\mathbb{C}^\times)\qquad\mathbf{(1)}$$

and

$$\frac{1}{|G|}\chi(g)\overline{\chi(h)}=|G|\delta_{g,h}\qquad \chi\in\text{Hom}(G,\mathbb{C}^\times)\qquad\mathbf{(2)}$$

Your two equalities are then special cases of these two identities. Indeed, for your first equality, let $\psi$ be the trivial character, i.e. the trivial map $G\to\mathbb{C}^\times$ in $\mathbf{(1)}$. For your second equality, let $h=1\in G$ in $\mathbf{(2)}$.

You can find proofs for the orthogonality relations in any good book on representation theory.

The above may not be of help to you, being at a possible opaque level of generality, but it's nice to put the theory of Dirichlet characters in the more general context of representation theory of finite groups. This elucidates "why" these identities occur, opposed to cute tricks like the proofs you gave above (which are totally fine, just more opaque). I hope this entices you to read more into the beautiful theory of representation theory. For a simple point of view, taking the attitude similar to what I talked about above, I would highly recommend Steinberg's book on the subject.