The following is on page 4 of Atiyah and MacDonald's commutative algebra book. Example 1: Let $A=k[x_1,..,x_n]$, k a field. Let $f \in A$ be an irreducible polynomial. By unique factorization, the ideal $(f)$ is prime. Then they go on to write that in $Z$ every ideal is of the form $(m)$ where $m>=0$ and that $(m)$ is prime if and only if m is $0$ or prime, that $(p)$ is maximal if p is prime, and that $Z(p)$ is the field of p elements.
Right after the above, the last sentence on page 4 of Atiyah and MacDonald's commutative algebra says "The same holds for example 1 for n=1 but not for n>1". Did they mean that for $k[x_1]$ every prime ideal is maximal? If yes, is this because of the following? The irreducible polynomials in $k[x_1]$ are the primes and $x_1$, and the ideals generated by them are prime, and these are all the ideals that are generated. They are maximal too because nothing divides $x_1$ except itself, and nothing divides any prime except itself.
In general, would it be right to say that in a principal ideal domain all prime ideals are maximal? I reckon $k[x_1,x_2]$ is not a principal ideal domain since $(x_1,x_2)$ has two generators. Is this the reason why in $k[x_1,x_2]$ not all prime ideals are maximal? For example, $(x1) \subset (x_1,x_2)$.