# The localisation of the ring $\mathbb{Z}$ at the prime ideal $(p)$ is PID [duplicate]

If $p$ is prime number, prove that $$\mathbb{Z}_{(p)}=\left\{\frac{a}{b}\in\mathbb{Q}: \text{p doesn't divide b}\right\}$$ is a PID.

So, first step is to show that $\mathbb{Z}_{(p)}$ is an Ideal Domain and then show that every ideal in it is principal.

I know that $\mathbb{Z}_{(p)}$ is the subring of $\mathbb{Q}$ then it follows that $\mathbb{Z}_{(p)}$ is commutative. Then I'm lost what to do. Any help is appreciated :)

• Try to think a little bit backwards: You know that if there is only one maximal ideal, such ideal contains exactly those element that are not invertible. Do you know which kind of fractions in $\mathbb{Z}_{(p)}$ are not invertible? – Darío G Apr 7 '16 at 11:19
• How is "$p$ doesn't divide $n$" a property of $\frac ab$? There are not even any variables in common. So what you're defining is either all of $\mathbb Q$ or the empty set, depending on whether $p$ divides $n$ or not. – hmakholm left over Monica Apr 7 '16 at 11:19
• @HenningMakholm You are right, I was suggesting help without even noticing this! – Darío G Apr 7 '16 at 11:21
• @Henning, Sorry I have edited the question. It's $p$ doesn't divide $b$ – El Qanas Apr 7 '16 at 11:24
• @Wore, elements in $\mathbb{Z}_{(p)}$ which is not invertible is the fractions where the numerator is the multiple of $p$ – El Qanas Apr 7 '16 at 11:26