# Partial proof of orthogonality relations for Dirichlet characters

Let $q\in \mathbb{N}$. For any Dirichlet character $\chi$ modulo $q$, er have $\phi(q)\sum_{a=1}^{q}\chi(a)=\mathbf{1}_{\chi=\chi_0}$.

The case $\chi=\chi_0$ is easy to prove. Suppose $\chi\neq \chi_0$. Then there exists $k\in \mathbb{Z}$ with $(k,q)=1$ such that $\chi(k)\neq 1$. Note that $$\sum_{a=1}^{q}\chi(a)=\sum_{\substack{1\leq a\leq q\\ (a,q)=1}}\chi(a)$$ since $\chi(a)=0$ if $(a,q)>1$. Then $$\chi(k)\sum_{a=1}^{q}\chi(a)=\sum_{\substack{1\leq a\leq q\\ (a,q)=1}}\chi(ka)=\sum_{a=1}^{q}\chi(a).$$ Where does the right side of the last equation come from? I found a reference that says,

Observe that, if $a$ runs through these values, then so does $b=ak$, after reducing modulo $q$. Therefore $$\chi(k)\sum_{a=1}^{q}\chi(a)=\sum_{\substack{1\leq a\leq q\\ (a,q)=1}}\chi(ka)=\sum_{\substack{1\leq b\leq q\\ (b,q)=1}}\chi(b).$$

I do not understand this well. My understanding is as follows: Let $L_q=\{a:1\leq a\leq q \wedge (a,q)=1\}$. Suppose that $(k,q)=1$. The claim is, if $a\in L_q$, then $ka\in L_q$. It is clear that $(ka,q)=1$, but I do not know if $ka$ lies in $[1,q]$.

• $\chi(n)$ is $q$-periodic, so you don't care that $ka \not \in [1, q]$ – reuns Feb 6 '17 at 19:47

$$\chi(k)\sum_{a=1}^{q}\chi(a)=\chi(k)\sum_{a \in (\mathbb{Z}/q\mathbb{Z})^\times}\!\!\chi(a)=\sum_{a \in (\mathbb{Z}/q\mathbb{Z})^\times}\!\!\chi(ak) = |\chi(k)| \sum_{a \in (\mathbb{Z}/q\mathbb{Z})^\times}\!\!\chi(a) =|\chi(k)| \sum_{a=1}^{q}\chi(a)$$ because if $|\chi(k)| \ne 0$ then $|\chi(k)| = 1$ and $k \in (\mathbb{Z}/q\mathbb{Z})^\times$ so the multiplication by $k$ is a bijection $(\mathbb{Z}/q\mathbb{Z})^\times \to (\mathbb{Z}/q\mathbb{Z})^\times$
The same argument shows that the discrete Fourier transform of a Dirichlet character $\chi(n)$ is $\overline{\chi(k)}G(\chi)$ where $G(\chi) = \sum_{n=1}^q \chi(n) e^{-2i \pi n/q}$ (so that $\sum_{n=1}^\infty \chi(n) n^{-s}$ has a functional equation similar to $\zeta(s)$)