# Dirichlet characters modulo 8

Let $G$ be the group of invertible elements of the ring $\mathbb{Z}/8\mathbb{Z}$. We would like to determine the Dirichlet characters modulo 8. Namely we would like to determine Hom$(G, \mathbb{C}^\times)$.

We denote by $[n]$ the residue class modulo $8$ represented by an integer $n$. Then $G = \{1, [3], [5], [7]\}$. $[3]^2 = [5]^2 = [7]^2 = 1, [3][5] = [7], [5][7] = [3], [3][7] = [5]$. Hence $G$ is the direct product of $\{1, [3]\}$ and $\{1, [5]\}$. Let $\phi \in$ Hom$(G, \mathbb{C}^\times)$. Then $\phi([3]) = \pm 1, \phi([5]) = \pm 1$. We define $\phi_1, \phi_2, \phi_3 \in$ Hom$(G, \mathbb{C}^\times)$ as follows.

$\phi_1([3]) = -1, \phi_1([5]) = 1$.

$\phi_2([3]) = -1, \phi_2([5]) = -1$.

$\phi_3([3]) = 1, \phi_3([5]) = -1$.

Then Hom$(G, \mathbb{C}^\times) = \{1, \phi_1, \phi_2, \phi_3\}$.

Clearly $\phi_3 = \phi_1\phi_2$.

Is the following proposition true? If yes, how can we prove it?

Proposition Let $n$ be an odd integer. Then

$\phi_1([n]) = (-1)^{(n-1)/2}$

$\phi_2([n]) = (-1)^{(n^2 - 1)/8}$

• I would like to point out the following policy of StackExchange because it doesn't seem to be well-known and some users seem to dislike a question to which the poster already knows the answer. [It’s also perfectly fine to ask and answer your own question, as long as you pretend you’re on Jeopardy! — phrase it in the form of a question. To be crystal clear, it is not merely OK to ask and answer your own question, it is explicitly encouraged.] blog.stackoverflow.com/2011/07/… – Makoto Kato Nov 7 '13 at 0:25

I mean, you can calculate $\text{Hom}(G,\mathbb{C}^\times)$ for any finite abelian group $G$. Namely, factor $G\cong C_{p_1^{e_1}}\times\cdots\times C_{p_m^{e_m}}$. Then you have an isomorphism

$$\text{Hom}(G,\mathbb{C}^\times)\cong \prod_i \text{Hom}(C_{p_i^{e_i}},\mathbb{C}^\times)$$

defined in the obvious way. Lastly, you have an isomorphism

$$\text{Hom}(C_{p_i^{e_i}},\mathbb{C}^\times)\xrightarrow{\approx}C_{p_i^{e_i}}:(1\mapsto e^{\frac{2\pi i \ell}{p_i^{e_i}}})\mapsto \ell$$

Thus, tracking these isomorphisms back, you get explicitly what the elements of $\text{Hom}(G,\mathbb{C}^\times)$ are.

$$(\mathbb{Z}/8\mathbb{Z})^\times\cong (\mathbb{Z}/2\mathbb{Z})^2$$
We define a map $f:\mathbb{Z} \rightarrow \mathbb{C}^\times$ by $f(n) = (-1)^{(n-1)/2}$. Let $n, m$ be integers such that $n \equiv m$ (mod $8$). Then $n - 1 \equiv m - 1$ (mod $8$). Hence $(n - 1)/2 \equiv (m - 1)/2$ (mod $4$). Hence $f(n) = f(m)$. Hence we can define a map $\psi_1:G \rightarrow \mathbb{C}^\times$ by $\psi_1([n]) = f(n)$. By Lemma 1 of my answer to this question, $f(nm) = f(n)f(m)$ for odd integers $n, m$. Hence $\psi_1([nm]) = \psi_1([n])\psi_1([m])$. Hence $\psi_1 \in$ Hom$(G, \mathbb{C}^\times)$. Clearly $\psi_1([3]) = -1, \psi_1([5]) = 1$. Hence $\phi_1 = \psi_1$.
We define a map $g:\mathbb{Z} \rightarrow \mathbb{C}^\times$ by $g(n) = (-1)^{(n^2-1)/8}$. Let $n, m$ be integers such that $n \equiv m$ (mod $8$). There exists an integer $k$ such that $n = m + 8k$. Since $n^2 = m^2 + 16mk + 64k^2$, $n^2 \equiv m^2$ (mod $16$). Hence $(n^2 - 1)/8 \equiv (m^2 - 1)/8$ (mod $2$). Hence $g(n) = g(m)$. Hence we can define a map $\psi_2:G \rightarrow \mathbb{C}^\times$ by $\psi_2([n]) = g(n)$. By Lemma 2 of my answer to this question, $g(nm) = g(n)g(m)$ for odd integers $n, m$ Hence $\psi_2([nm]) = \psi_2([n])\psi_2([m])$. Hence $\psi_2 \in$ Hom$(G, \mathbb{C}^\times)$. Clearly $\psi_2([3]) = -1, \psi_2([5]) = -1$. Hence $\phi_2 = \psi_2$.