Non-principal ideal in $K[x,y]$? Context: Let $K$ be a field. Then $K[x,y]$ is not a PID because $x$ is irreducible but the quotient $K[x,y]/(x)$ is isomorphic to $K[y]$, which is not a field.
So there must be an ideal in there which is not principal.
Question: What is an example of such an ideal?
 A: Hint: if $R$ is a domain and not a field, take $r\in R$ such that $r\ne0$ and $r$ is not invertible. Then the ideal $(r,x)$ in $R[x]$ is not principal.
A: Consider the function $\phi\colon K[x,y]\to K$ defined by $\phi(f) = f(0,0)$ (that is evaluation at $(0,0)$). Check that it is a homomorphism.
So its kernel  consists of polynomials of two variables vanishing at origin; that is they have no constant terms. This is not a principal ideal (in fact all maximal ideals of this ring are non principal).
A: Apply the Lemma below with $\rm\,C = K[y],\,$ noting $\rm \,0\neq y\,$ is not a unit.
Lemma $\, $ If $\ \rm \color{#90f}{0\neq c\in domain}\ C\ $ then $\rm \ (c,x) = (f)\ $ in $\rm \,C[x]\,\Rightarrow \,c\,$ is a unit in $\,\rm C.\ $
${\bf Proof}_{\,1}\ $  If $\,(c,x)\!=\!(f)\,$ then $f\mid c\Rightarrow \deg f \!=\! 0$ $\Rightarrow\!\color{#0a0}{f(1)=f(0)},\,$ so eval $\,(c,x)=(f)\,$ at $\,x\!=\!0\,\Rightarrow\, \color{#c00}{(c)}=\color{#0a0}{(f(0))};\ $ eval at $\,x\!=\!1\Rightarrow (1)= (\color{#0a0}{f(1)})\! = \!(\color{#0a0}{f(0)}) = \color{#c00}{(c)}\Rightarrow \color{#c00}c\mid 1\Rightarrow c\,$ unit.

$\bf Proof_{\,2}\ $ Below is an element-ary form of above proof (it evaluates elements vs. ideals)
$\rm\ \ f\ \in\ (c,x)\ \Rightarrow\ f = c\, g_1 + x\,h_1.\, $ Eval at $\rm\, x = 0\ \Rightarrow\ \color{#0a0}{f(0)} = cg_1(0) = \color{#0a0}{cd},\,\ d\in  C$
$\rm\  \ c\ \in\ (f)\ \Rightarrow\ c\ =\ f\, g, \ \,\color{#90f}{hence}\,\ \ \deg f\:\! =\:\! 0\:\Rightarrow\:  \color{#c00}f = \color{#0a0}{f(0) = cd}$
$\rm\ \ x\ \in\ (f)\ \Rightarrow\, x\ =\ \color{#c00}f\, h\ =\ \color{#0a0}{cd}\:\!h.\, $ Eval at $\rm\ x\! =\! 1\ \Rightarrow\ 1 = cd\,h(1)\ \Rightarrow\ c\,$ is a unit in $\rm\,C$

Beware $ $ Our use of $\rm C$ is a $\rm\color{#90f}{domain}$ to infer $\,\deg c=0,\ f\mid c\Rightarrow \deg f = 0\,$ is crucial to the proof. This generally fails for non-domains, and so does the Lemma, e.g. in $\,\Bbb Z/6[x]\!:\ (2,x) = (2+3x)\,$ by $\,(2,x)=(2+3x,x)=(2+3x),\,$ by $\,2+3x\mid x,\,$ by $\,(2+3x)(3+2x)=x.\,$ Notice  here we have positive degree $ f\mid c,\,$  i.e. $\,2+3x\mid 2\,$ [by $\,-2(2+3x) = 2$].
Remark $ $  It is often true that evaluation serves to reduce many arithmetical properties of polynomial rings to corresponding properties in their coefficient ring, e.g. see here and its links for application of such methods to factoring polynomials.
See here for general results characterizating when a polynomial ring or semigroup ring R[S] is a PIR (principal ideal ring), e.g. we have
Theorem $\ $ TFAE for a semigroup ring R[S], with unitary ring R, and nonzero torsion-free cancellative monoid S.

*

*$\ $  R[S] is a PIR (Principal Ideal Ring)

*$\ $ R[S] is a general ZPI-ring  (i.e. a Dedekind ring, see below)

*$\ $ R[S] is a multiplication ring  (i.e.  $\rm\ I \supset\ J \Rightarrow\ I\ |\ J\ $  for ideals $\rm\:I,J\:$)

*$\ $ R is a finite direct sum of fields, and S is isomorphic to $\mathbb Z$ or $\mathbb N$
A  general ZPI-ring  is a ring theoretic analog of a Dedekind domain
i.e. a ring where every ideal is a finite product of prime ideals.
A unitary ring R is a general ZPI-ring $\iff$ R is a finite direct sum
of Dedekind domains and special primary rings (aka SPIR = special PIR)
i.e. local PIRs with nilpotent max ideals. ZPI comes from the German
phrase "Zerlegung in Primideale" = factorization in prime ideals.
The classical results on Dedekind domains were extended to rings
with zero divisors by S. Mori circa 1940, then later by K. Asano
and, more recently, by R. Gilmer. See Gilmer's book "Commutative
Semigroup Rings" sections 18 (and section 13 for the domain case).
