Are the rings $\mathbb{Q}[x]$ and $\mathbb{Q}[x,y]$ principal ideal domains?
I understand what an integral domain is. I know the definitions of ideal and principal but have not ever dealt with principal ideal domains. I know that from the discussion here, $\mathbb{Z}[x]$ is not a principal ideal domain, but I'm not sure if the example with the ideal $(2,x)$ should extend to the polynomials with rational coefficients and would like some help.
If $k$ is a field, then $k[x]$ is a PID, for essentially the same reason that $\mathbb{Z}$ is -- in both, we have Euclidean algorithm for division.
On the other hand, $k[x, y]$ is not a PID: consider ideal $I = (x, y)$. Supposed that $I$ is principal, $I = (f)$. Then $x = fg$, $y = fh$ for some $g, h \in k[x, y]$. Since $x = fg$, degree of $f$ in variable $y$ must be $0$. Considering $y = fh$, we conclude the same about degree of $f$ in variable $x$. Thus $f \in k$, which contradicts $I = (f) = (x, y)$.