Let be a ring which is a PID, and let be an element of . Then is irreducible if and only if is prime.
In fact, it is easier to prove a stronger statement: that the following are equivalent. [1]
A proof that "prime implies irreducible" appears on the page for irreducibility.
We wish to show that if is maximal, then it is prime. (Indeed, is prime if and only if its generated ideal is prime.)
An ideal is maximal if and only if the quotient is a field. (Proof.)
An ideal is prime if and only if the quotient is an integral domain. (Proof.)
All fields are integral domains. (A proof of this appears on the page on integral domains.)
Hence maximal ideals are prime.
Let be irreducible; then in particular it is not invertible, so isn't simply the whole ring.
To show that is maximal, we need to show that if it is contained in any larger ideal then that ideal is the whole ring.
Suppose is contained in the larger ideal , then. Because we are in a principal ideal domain, , say, for some , and so for some . It will be enough to show that is invertible, because then would be the entire ring.
But is irreducible, so one of and is invertible; if is invertible then we are done, so suppose is invertible.
Then . We have supposed that is indeed larger than : that there is which is not in . Since , we can find (say) such that ; so and hence , which is a contradiction.
Every proof known to the author is of this shape either implicitly or explicitly, but when it's explicit, it should be clearer what is going on.