# 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 :)

## marked as duplicate by Dietrich Burde, Daniel W. Farlow, user91500, Alex S, user26857 abstract-algebra StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Apr 7 '16 at 21:01

• 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. – Henning Makholm Apr 7 '16 at 11:19
• @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