# How to determine whether a given ideal of an order of a quadratic number field is invertible or not

Let $K$ be a quadratic number field. Let $R$ be an order of $K$, i.e. a subring of $K$ which is a free $\mathbb{Z}$-module of rank $2$. Let $D$ be the discriminant of $R$. Let $x_1,\cdots, x_n$ be a sequence of elements of $R$. We denote by $[x_1,\cdots,x_n]$ the $\mathbb{Z}$-submodule of $R$ generated by $x_1,\cdots, x_n$. By this question, $R = [1, \omega]$, where $\omega = \frac{(D + \sqrt D)}{2}$. Let $I$ be an ideal of $R$. If there exists an $R$-submodule $J$ of $K$ such that $IJ = R$, $I$ is called invertible. It is easy to see that $J$ is uniquely determined by $I$. It is also easy to see that $J$ is a $\mathbb{Z}$-free submodule of $K$ of rank $2$. $J$ is denoted by $I^{-1}$.

I would like to determine whether a given non-zero ideal $I$ of $R$ is invertible or not. By this question, there exist unique rational integers $a, b, c$ such that $I = [a, b + c\omega], a \gt 0, c \gt 0, 0 \le b \lt a, a \equiv 0$ (mod $c$), $b \equiv 0$ (mod $c$). If $c = 1$, we say $I$ is a primitive ideal. Let $a = ca'$, $b = cb'$. Then $I = cJ$, where $J = [a', b' + \omega]$. Clearly $J$ is a primitive ideal. $I$ is invertible if and only if $J$ is invertible. Hence we can assume that $I$ is primitive.

My question Let $I = [a, r + \omega]$ be a primitive ideal of $R$, where $a \gt 0, r$ are rational integers. How can we solve the following problems?

1. Determine whether $I$ is invertible or not.

2. If $I$ is invertible, find a free $\mathbb{Z}$-basis of $I^{-1}$.

• What's the reason for the downvote? Unless you tell me, I cannot improve the question. – Makoto Kato Nov 20 '13 at 3:45

Let $\sigma$ be the unique non-identity automorphism of $K/\mathbb{Q}$. We denote $\sigma(\alpha)$ by $\alpha'$ for $\alpha \in K$.
Let $I = [a, r + \omega]$ be a primitive ideal of $R$, where $a \gt 0, r$ are rational integers. Let $\theta = (r + \omega)/a$. The minimal polynomial of $\theta$ over $\mathbb{Q}$ is $x^2 - px + q = (x - \theta)(x - \theta')$. where $p = \theta + \theta', q = \theta\theta'$. Let us compute $p$ and $q$. $p = (r + \omega)/a + (r + \omega')/a = (2r + D)/a$. $q = (r + \omega)(r + \omega')/a^2 = (r^2 + rD + (D^2 - D)/4)/a^2$. Hence $\theta$ is a root of a polynomial $ax^2 + bx + c$, where $b = -ap = -(2r + D), c = aq = (r^2 + rD + (D^2 - D)/4)/a$. By this question, $N(r + \omega) = (r + \omega)(r + \omega')$ is divisinle by $a$. Hence $c$ is an integer. Note that $(-b + \sqrt D)/2 = r + \omega$. The discriminant of this polynomial is $b^2 - 4ac = (2r + D)^2 - 4(r^2 + rD + (D^2 - D)/4) = D$. By this question, $I = [a,\ (-b + \sqrt D)/2]$ is invertible if and only if gcd$(a, b, c) = 1$. By Lemma 2 of my ansewer to the question, $(R : I) = \mathbb{Z} + \mathbb{Z}\frac{(b + \sqrt D)}{2a}$. Suppose $I$ is invertible. By this question, $I^{-1} = (R : I) = \mathbb{Z} + \mathbb{Z}\frac{(b + \sqrt D)}{2a}$.