## Find a basis for a given ideal in a quadratic integer ring

Let $I = (3+i,7+i)$ be considered as an ideal in $\mathbb{Z}[i]$. Find a generator and a basis for $I$. Draw a diagram to visualize the elements of $I$ on the complex plane.

Note that $7+i = (1+i)(2-i)$ and $3+i = (1+i)(4-3i)$, so that $I \subseteq (1+i)$. Conversely, since $-2i(3+i) + i(7+i) = 1+i$, we have $(1+i) \subseteq I$. Hence $I = (1+i)$.

We claim that $B = \{1+i, -1+i\}$ is a basis for $I$ over $\mathbb{Z}$. To see this, note that $-1+i = i(1+i)$, so that $(1+i,-1+i)_\mathbb{Z} \subseteq (1+i)$; certainly $(1+i) \subseteq (1+i, -1+i)_\mathbb{Z}$, so these sets are equal. Now suppose $a(1+i) + b(-1+i) = 0$. Comparing coefficients, we have $a-b = 0$ and $a+b = 0$, so that $a = b = 0$. Thus $B$ is free as a generating set for $I$ over $\mathbb{Z}$.

We can visualize this ideal in the complex plane as in the following diagram.

The ideal (1+i) in the Gaussian integers