# Prime ideal decomposition in quadratic field extensions

Once you have the character $\chi$ of a quadratic field extension and the corresponding modulus $N$, it is easy to see which prime ideals split, ramify and are inert by looking at their remainder $\mod N.$ But how do you determine what the ideal actually splits (or ramifies) into? Is this hard in general or is there an algorithm one can use?

For example, in $\mathbb{Q}(\sqrt{3})$, I know that $p=2,3$ are the ramified primes, and $p$ is split if $p=1,11 \pmod{12}$ and inert if $p=5,7 \pmod{12}$. But, without running through all possible combinations of $a$ and $b$, how would I find the specific $a,b\in \mathbb{N}$ such that $2=(a+b\sqrt{3})(a-b\sqrt{3})$? If there is no general algorithm, would you be able to give an explanation for the case of $\mathbb{Q}(\sqrt{3})$?

• In general there need not be such $a,b$, not even in the split case, because the prime ideals may not be principal. A general result when $N\not\equiv1\pmod4$ is that the if $p=m^2\pmod{N}$, then the ideals $\frak{p}_1=(p,m+\sqrt{N})$ and $\frak{p}_2=(p,m-\sqrt{N})$ are the prime factors. But it is possible that neither is generated by a single element of the form $a+b\sqrt{N}$. Similarly in other cases. I suspect that algorithms are known for those $N$, where we know the class number to be equal to one. – Jyrki Lahtonen Feb 25 '13 at 8:26
• @JyrkiLahtonen Your comment fits into an answer. It might be done, for the convenience of the readers? thanks in any case in advance. – awllower Feb 25 '13 at 14:53
• I appreciate the vote of confidence, but I would like to be able to point at an algorithm for finding those generators (when they exist). Something like a Pell equation will pop out, and those have algorithms (IIRC based on continued fractions), but I'm not familiar with those. – Jyrki Lahtonen Feb 25 '13 at 14:56

Let $\omega\in \mathbb{C}$ be the root of a monic irreducible $f\in \mathbb{Z}[X]$ of degree $2$. Let $K=\mathbb{Q}(\omega)$, $R=\mathcal{O}_K$. Suppose the rational prime $p\in \mathbb{Z}$ splits in $R$, so that $p$ doesn't divide the discriminant of $f$. Then $f$ factors mod $p$ as $f=(X-r)(X-s)$ for some $r\neq s$. So, by the Chinese Remainder Theorem, $$R/(p)\cong \frac{\mathbb{Z}[X]}{(p,f)}\cong \mathbb{F}_p[X]/(f) \cong \frac{\mathbb{F}_p[X]}{(X-r)}\times \frac{\mathbb{F}_p[X]}{(X-s)},$$ which is a product of fields. Let $\varphi$ be the isomorphism from the rhs to the lhs. Since $s-r$ is non-zero mod $p$, it has an inverse $u$ mod $p$. So, $u(X-r)-u(X-s)\equiv 1$ mod $p$, which means that $u(\omega-r)-u(\omega-s)\equiv 1$ mod $pR$. So, $\varphi$ takes the two prime ideals $(1)\times 0$ and $0\times (1)$ of the lhs of the above equation to the prime ideals $(-u(\omega-r) \mod{pR})=(\omega-r \mod {pR})$ and $(u(\omega-s) \mod{pR})=(\omega-s \mod {pR})$. Hence, the two prime ideals in $R$ containing $p$ are $$(p,\omega-r)\quad\text{and}\quad(p,\omega-s).$$
Now, suppose $p$ ramifies in $R$. Then $f$ factors mod $p$ as $(X-r)^2$ for some $r$, and so $$R/(p)\cong \frac{\mathbb{F}_p[X]}{((X-r)^2)}.$$ But the rhs is $(X-r)$-primary, so its only prime ideal is the image of $(X-r)$. Hence, the only prime in $R$ containing $p$ is $(p,\omega-r)$.
For any prime $p\in\mathbb{Z}$, either $p$ is inert, or $p$ is not inert and the primes in $R$ containing $p$ are exactly the ideals $(p,r)$, where $r$ is a root of $f$ modulo $p$.