Show that every ideal of the ring $\mathbb Z$ is principal

Let $\mathbb Z$ be the ring of integers. The question asks to show that every ideal of $\mathbb Z$ is principal. I beg someone to help me because it is a new concept to me.


Goal: show that $\mathbb{Z}$ is a principal ideal domain (or PID).

Let $I$ be an ideal of $\mathbb Z$. If $I={0}$ then $0$ generates $I$. And we are done.

Suppose $I\neq {0}$, and let $a$ be the smallest positive element in $I$.

Claim: $a$ generates $I$ i.e $(a)=I$.

To prove my claim, clearly $a\subset I$ Since $(a)$= {$ar :r \in \mathbb Z$}, $ar\in I$

Let $b \in I$ if $b=0$ then $b=a0 \in (a)$.

If $b\neq 0$, we may assume $b>0$, and by the euclidean algorithm we have

$$b=aq+r.$$ Moreover, $0\le r<a$, and of course $q,r \in \mathbb Z$.

Now, $r=b-aq \in I$ since $b,a \in I$. this implies $r=0$ since $r<a$ and $a$ is the smallest element in $I$.

So, $b=aq \in I$. Thus, $(a)=I$, meaning that $a$ generates $I$.


Suppose that $I$ is an ideal in $\mathbb{Z}$. If $I=(0)$, it’s certainly principal, so assume that it contains a non-zero element. Since $I$ is a subgroup of $\mathbb{Z}$, if it contains a non-zero element, it must contain a positive element. Let $m$ be the smallest positive member of $I$. Show that $I=(m)$, the set of multiples of $m$.

HINT: Use the division algorithm and a proof by contradiction.


HINT $\ $ In $\rm\:\mathbb Z\:,\:$ descent via the Division (Euclidean) algorithm has especially simple form, viz.

LEMMA $\ \ $ If a nonempty set of positive integers $\rm\: M\:$ satisfies $\rm\ n > m\ \in\ M \ \Rightarrow\ \: n-m\ \in\ M$
then every element of $\rm\:M\:$ is a multiple of the least element $\rm\:m_{\:1} \in M\:.$

Proof $\ \: $ If not there is a least nonmultiple $\rm\:n\in M\:,$ contra $\rm\:n-m_{\:1} \in M\:$ is a nonmultiple of $\rm\:m_{\:1}.$

REMARK $\ $ Note that the lemma depends only on the fact that $\rm M$ is discrete and closed under subtraction, so it applies much more generally, e.g. to $\:\mathbb Z$-modules $\subset \mathbb Q\:.\ $ The study of these "fractional ideals" essentially go back to Euclid, who studied the application of the Euclidean algorithm to "line segments" to determine their "greatest common measure". This leads quite naturally to the study of the continued fraction expansion of a real number.