## Compute the inverse of an ideal in a given algebraic number field

Recall that if $K$ is an algebraic number field with ring of integers $\mathcal{O}$ and if $A \subseteq \mathcal{O}$ is an ideal, then $A^{-1} = \{r \in K \ |\ rA \subseteq \mathcal{O}\}$. Compute $A^{-1}$ for each of the following ideals $A$ in their respective field $K$: (1) $A = (2)$ in $K = \mathbb{Q}$ with $\mathcal{O} = \mathbb{Z}$, (2) $A = (1+i)$ in $K = \mathbb{Q}(i)$ with $\mathcal{O} = \mathbb{Z}[i]$, and (3) $A = (3, 1+2\sqrt{-5})$ in $K = \mathbb{Q}(\sqrt{-5})$ with $\mathcal{O} = \mathbb{Z}[\sqrt{-5}]$.

1. We claim that $(2)^{-1} = \{ \frac{a}{2} \ |\ a \in \mathbb{Z} \}$ in $\mathbb{Q}$. $(\subseteq)$ Suppose $r \in (2)^{-1}$ in $\mathbb{Q}$. In particular, $2r \in \mathbb{Z}$, so $2r = a$ for some $a \in \mathbb{Z}$. So $r = \frac{a}{2}$ with $a \in \mathbb{Z}$. $(\supseteq)$ Suppose $a \in \mathbb{Z}$ and consider $\frac{a}{2}$. If $2k \in (2)$ (in $\mathbb{Z}$) is arbitrary, then $\frac{a}{2} \cdot 2k = ak \in \mathbb{Z}$. So $\frac{a}{2}(2) \subseteq \mathbb{Z}$, and thus $\frac{a}{2} \in (2)^{-1}$.
2. We claim that $(1+i)^{-1} = \{ \frac{a}{2} + \frac{b}{2}i \ |\ a,b \in \mathbb{Z}, a \equiv b \mod 2 \}$ in $\mathbb{Q}(i)$. $(\subseteq)$ Suppose $s+ti \in (1+i)^{-1}$ in $\mathbb{Q}(i)$. In particular, $(s+ti)(1+i) = (s-t)+(s+t)i \in \mathbb{Z}[i]$, so that $s-t,s+t \in \mathbb{Z}$. Adding, we have $2s \in \mathbb{Z}$, so that $2s = a$ for some $a \in \mathbb{Z}$, and so $s = \frac{a}{2}$. Now $\frac{a}{2} + t \in \mathbb{Z}$, so that $\frac{a}{2} + t = b$ for some $b \in \mathbb{Z}$. Now $t = \frac{2b-a}{2}$. Note that $a \equiv 2b-a$ mod 2. So we have $s+ti = \frac{h}{2} + \frac{k}{2}i$ where $h,k \in \mathbb{Z}$ and $h \equiv k$ mod 2, as desired. $(\supseteq)$ Suppose $a,b \in \mathbb{Z}$ such that $a \equiv b$ mod 2 and consider $\eta = \frac{a}{2} + \frac{b}{2}i$. Note that $\eta(1+i) = \frac{a-b}{2} + \frac{a+b}{2}i \in \mathbb{Z}[i]$, since $a+b \equiv a-b \equiv 0$ mod 2. Thus $\eta\zeta \in \mathbb{Z}[i]$ for all $\zeta \in (1+i)$, so we have $\eta(1+i) \subseteq \mathbb{Z}[i]$, and thus $\eta \in (1+i)^{-1}$.
3. We claim that $(3,1+2\sqrt{-5})^{-1} = \{ \frac{a}{3} + \frac{b}{3}\sqrt{-5}\ |\ a,b \in \mathbb{Z}, a-b \equiv 0 \mod 3 \}$ in $\mathbb{Q}(\sqrt{-5})$. $(\subseteq)$ Suppose $s+t\sqrt{-5} \in (3,1+2\sqrt{-5})^{-1}$. In particular, $3(s+t\sqrt{-5}) \in \mathbb{Z}[\sqrt{-5}]$ so that (comparing coefficients) $s = \frac{a}{3}$ and $t = \frac{b}{3}$ for some $a, b\ in \mathbb{Z}$. Moreover, we have $(s+t\sqrt{-5})(1+2\sqrt{-5}) \in \mathbb{Z}[\sqrt{-5}]$, so that (comparing coefficients) $s-10t \in \mathbb{Z}$. Say $\frac{a}{3} - \frac{10b}{3} = h$, so that $a-10b = 3h$. Mod 3, we have $a-b \equiv 0$, as desired. $(\supseteq)$ Consider $\mu = \frac{a}{3} + \frac{b}{3}\sqrt{-5}$ where $a-b \equiv 0$ mod 3. Now $3\mu \in \mathbb{Z}[\sqrt{-5}]$ and $(1+2\sqrt{-5})\mu = \frac{a-10b}{3} + \frac{2a+b}{3}\sqrt{-5} \in \mathbb{Z}[\sqrt{-5}]$ since $a-10b \equiv 0$ mod 3 and $2a+b \equiv -a+b$ $\equiv -(a-b) \equiv 0$ mod 3. So $\mu\zeta \in \mathbb{Z}[\sqrt{-5}]$ for all $\zeta \in (3,1+2\sqrt{-5})$, and thus $\mu \in (3,1+2\sqrt{-5})^{-1}$.