Curious expression about $\left(\mathbb{Z}/n\mathbb{Z}\right)^{\times}$, adeles, ideles, ... I was watching this video, trying my best to understand what a Hecke character is (though after more research, I am pretty convinced that it is quite out of my reach). At timestamp 6:05, the speaker begins to introduce dirichlet characters of number fields, and beginned with this formula/identity:
Fix $N \geq 1$ and write it's prime factorisation as $N = \prod_{p \in S} p^{m_p}$, where $S$ is the support of $N$ and $p^{m_p} \| N$. Then,
$$
\frac{\mathbb{I}_{\mathbb{Q}}}{\mathbb{Q}^{\times} \times \left(\mathbb{R}_{>0} \times \prod_{p \in S} \left(1 + p^{m_p}\mathbb{Z}_p\right) \times \prod_{p \not \in S} \mathbb{Z}_p^{\times}\right)} \cong \left(\mathbb{Z} / m\mathbb{Z}\right)^{\times}
$$
I can tell that this is pretty complicated and probably involves some deep maths, so feel free to leave an answer that may require slightly advanced theory, and I can work my way to it. Essentially all I know about adele and idele so far is that an element of $\mathbb{A}_{\mathbb{Q}}$ looks like $\mathbb{R} \times \prod_p \mathbb{Q}_p$ with the restriction that all but finitely many of the terms in the product must lie in $\mathbb{Z}_p$ instead. I guess it can be thought of as $\prod_p \mathbb{Z}_p$ with finitely many "exceptions" of $\mathbb{Q}_p$.
However, I am looking for the following
(1) What is $\mathbb{I}_{\mathbb{Q}}$? I believe he mentions that it is the Idele group of $\mathbb{Q}$, but what does it look like, or what properties of it do I need to understand the expression above?
(2) The rest of the block - what are the individual terms doing? And why when they're combined the quotient group would equal to $\left(\mathbb{Z}/m\mathbb{Z}\right)^{\times}$? If possible, is there any "intuition" rather than just technicla definitions?
(3) How does this formula relate to Dirichlet characters, which I understand as group homomorphisms $\chi: \left(\mathbb{Z} / m\mathbb{Z}\right)^{\times} \to \mathbb{C}^{\times}$? As in, clearly the identity gives an expression that's isomorphic to $\left(\mathbb{Z}/m\mathbb{Z}\right)^{\times}$, but how does it help to generalise Dirichlet characters over number fields? I would be very grateful if someone can provide some concrete examples and references / further readings her.
(4) If possible do you mind also explaining Hecke characters and how they relate to everything above?
Thank you so much, and sorry if this is too much to ask for in a single question. The resources on the internet about idele and adele seems quite scattered and I can't really locate which part of the theories are relevant at all to this.
 A: $\Bbb{A_Q}$ is what you said, it is a ring, $\Bbb{I_Q} = \Bbb{A_Q}^\times$ is its unit group, the elements $x_\infty \prod x_p$ with each $x_v$ non-zero and all but finitely many $x_p$ taken in $\Bbb{Z}_p^\times$.
In $\frac{\mathbb{I}_{\mathbb{Q}}}{\mathbb{Q}^{\times} \times \mathbb{R}_{>0} \times \prod_{p \in S} \left(1 + p^{m_p}\mathbb{Z}_p\right) \times \prod_{p \not \in S} \mathbb{Z}_p^{\times}}$ you really really need to understand that the $\Bbb{Q}^\times$ in the denominator is the "diagonal embedding", that is sending $a\in \Bbb{Q}^\times$ to the idele $x_v=a$ for all $v$. Better to call it $\iota(a)$.
Given an idele $x$, there is exactly one rational $a$ such that $(x\, \iota(a))_p \in \Bbb{Z}_p^\times$ for all $p$ and $(x\iota(a))_\infty > 0$.
Then we quotient by $\Bbb{R}_{>0}^\times$ so we forget about $(x\, \iota(a))_\infty$.
We get that $$\frac{\mathbb{I}_{\mathbb{Q}}}{\iota(\mathbb{Q}^{\times}) \times \mathbb{R}_{>0} \times \prod_{p \in S} \left(1 + p^{m_p}\mathbb{Z}_p\right) \times \prod_{p \not \in S} \mathbb{Z}_p^{\times}}\cong \frac{\prod_p \Bbb{Z}_p^\times}{\prod_{p \in S} \left(1 + p^{m_p}\mathbb{Z}_p\right) \times \prod_{p \not \in S} \mathbb{Z}_p^{\times}}$$ $$\cong \frac{\prod_{p\in S} \Bbb{Z}_p^\times}{\prod_{p \in S} \left(1 + p^{m_p}\mathbb{Z}_p\right)}\cong \prod_{p\in S} \Bbb{Z}/p^{m_p}\Bbb{Z}^\times\cong\Bbb{Z}/m\Bbb{Z}^\times$$
The Hecke characters of $\Bbb{Q}$ (that is the Dirichlet characters, up to some $n^{-s}$ scaling) are the continuous homomorphisms $\Bbb{A_Q^\times/\iota(Q^\times)\to C^\times}$. This generalizes to number fields.
We care of it for two reason: it is the key object of class field theory, and their L-function have properties similar to the Riemann zeta function.
