Understanding Hecke Characters as Extension of Dirichlet Characters

The group of fractional ideals (coprime with some ideal $J$..) is a free abelian group generated by the prime ideals $I_{K,J}\cong \prod_{P\not\ni J}' P^\Bbb{Z}$

So it is easy to construct all the homomorphisms $\psi: I_{K,J}\to \Bbb{C}^\times$.

The Hecke characters are those whose restriction to the principal ideals is defined in term of reduction $\bmod J$ and complex embeddings $\sigma_j$, ie. $$\psi(aO_K)=\chi(a) = \phi(a)\prod_j \sigma_j(a)^{r_j}|\sigma_j(a)|^{s_j}$$ where $\phi$ is an homomorphism $O_K/J^\times\to \Bbb{C}^\times$

It is easy to generate all the possible $\chi$, the big restriction is that we need it to be trivial on $O_K^\times$ so that $\psi(aO_K)=\chi(a)$ is well-defined.

Finally we extend $\psi$ by defining $\psi(I_l)$ for the finitely generators of the class group (of fractional ideals coprime with $J$..) :

$Cl_J(K)\cong \prod C_{n_l}$,

$I_l$ is a generator of $C_{n_l}$, so $I_l^{n_l}=(a_l)$ is principal, we choose $\psi(I_l)$ such that $\psi(I_l)^{n_l}=\psi(a_l O_K)$.

Try with $K$ a quadratic imaginary field, $O_K^\times$ is finite thus it is much easier to construct all the possible $\chi$.

Try also with $\psi(I)=\varphi(I\cap O)$ where $\varphi$ is a character of the class group of $O=\Bbb{Z}[mi]$ with $m\ne 1$.

The point of this construction is that $\sum \psi(I) N(I)^{-s}$ (in addition to its Euler product) is the Mellin transform of some kind of theta function similar to $\sum_n e^{-\pi n^2 x}$ which will give the analytic continuation and functional equation.