# Is every ideal in $K[x, y]$ of finite codimension necessarily prime?

I'm trying to answer the following question:

Suppose that $$R$$ is an integral domain containing a field $$K$$. Then we may view $$R$$ as a $$K$$-vector space. Show that if R is finite dimensional as a K-vector space then it must be a field. Deduce that if $$I$$ is a prime ideal in $$K[x, y]$$ of finite codimension (i.e. such that the quotient $$K[x, y]/I$$ is finite dimensional) then $$I$$ is maximal. Is every ideal in $$K[x, y]$$ of finite codimension necessarily prime?

I've managed to show that $$R$$ must be a field by using, for each $$y\in R$$, transformation $$T: R\rightarrow R$$ such that $$T(x) = xy$$ and then applying the rank nullity theorem.

I've also been able to apply this to show that every prime ideal with finite codimension is maximal.

The one part I'm struggling with is in working out whether every ideal of finite codimension in $$K[x,y]$$ is prime. I assume it probably isn't the case and that I'm supposed to find some example which is not maximal (and hence not prime by the earlier result), but I'm struggling to come up with a counterexample.

Your help would be greatly appreciated.

New contributor
user643425 is a new contributor to this site. Take care in asking for clarification, commenting, and answering. Check out our Code of Conduct.

Consider, for instance, the ideal $$I=(x,y)^2=(x^2,xy,y^2)$$.

Another counterexample is given by seeing the product ring $$K^2$$ (which is known not to be integral) as a quotient of $$K[x,y]$$. Then since $$K^2$$ clearly has finite dimension over $$K$$, this will be enough.

This can be achieved either by describing a surjective map $$K[x,y]\to K^2, x\mapsto (1,0), y\mapsto (0,1)$$; or by describing an ideal, e.g. $$I=(xy, x+y-1, x^2-x, y^2-y)$$