The polynomial ring is an integral domain, since the product of two nonzero polynomials has nonzero leading coefficient. Let be an ideal. If , it is generated by zero. Otherwise choose a nonzero polynomial of minimum degree. For any , the polynomial division algorithm over the field gives with or . Since , minimality forces . Hence every element of is a multiple of , and . Thus is a principal ideal domain.
The nonprincipal coordinate ideal in two variables provides the contrast:
If it were , then would divide and . Total degrees add when nonzero polynomials over a field are multiplied. A nonconstant divisor of consequently has degree one, its cofactor is constant, and it is a nonzero scalar multiple of . Such a polynomial cannot divide , as setting shows. Thus would be a nonzero constant and the ideal would contain one. But all elements of vanish at , so this is impossible.