Prove that all ideals in Q[x] are principal Prove that all ideals in the polynomial ring $\mathbb{Q}[x]$ are principal.
There is probably some elegant shortcut one can use for this proof, but I am only just beginning to study ring theory and would prefer a more straightforward approach if one is possible.
So far I've been thinking along these lines: consider an ideal $I$ that is generated by, let's say, two elements, call them $p(x)$ and $q(x)$. Then $I=\{a(x)p(x)+b(x)q(x)\mid a(x), b(x)\in\mathbb{Q}[x]\}$.
Now, I should like to prove that this ideal is in fact principal, so I want to find a single element that generates this ideal. How do I proceed from here? Or am I on the wrong track completely? Hints appreciated.
 A: Okay, I think I may have solved it using the hints I got.
If $d(x)$ is a polynomial of least degree in $I$, and $a(x)$ is some element in $I$, then we can use polynomial long division to write $a(x)=q(x)d(x)+r(x)$ for some quotient $q(x)$ and remainder $r(x)$. Now, because $d(x)$ is in the ideal $I$, so too is $q(x)d(x)$, and therefore also $r(x)=a(x)-q(x)d(x)$. The remainder $r(x)$ must be zero or have degree strictly lower than that of $d(x)$. But because $d(x)$ is of least degree, the latter is impossible. This means that $a(x)=q(x)d(x)$. Since $a(x)$ was an arbitrary element of $I$, it follows that any element can be written as a multiple of $d(x)$, i.e. all of $I$ is generated by $d(x)$.
A: Hint $ $ Ideals are closed under  $\!\bmod\!$ (remainder), i.e. $\,f,g\in I\,\Rightarrow\, f\ {\rm mod}\ g = f - qg \in I.\,$ Therefore a nonzero element  $\,f\in I\,$ of least degree must divide every element of $I$ (else $\,f\nmid g\,$ so $\, 0\ne g\ {\rm mod}\ f\in I\,$ has smaller degree than $f$, contra minimality of $f).\,$ Therefore $\ I = (f).$
Remark $\ $ Notice $f$ is the gcd of all elements of $I$ and the descent step in the proof $\, g\mapsto g\ {\rm mod}\ f\,$ can be viewed as computing $\,\gcd I\,$ by the Euclidean algorithm.
Note that the above proof works in any Euclidean domain (i.e. enjoying division with "smaller" remainder), where size can be measured in any well-ordered set. It shows that ideals $\neq 0$ are generated by any element of minimal size.
