# Homework Help: Real Analysis: Proof of irrationality of all Sqrt[n] where n is not a perfect square

1. Oct 23, 2012

### Arkuski

Let n be a positive integer that is not a perfect square. Prove that √n is irrational.

I understand the basic outline that a proof would have. Assume √n is rational and use a proof by contradiction. We can set √n=p/q where p and q are integers with gcd(p,q)=1. Now n=p2/q2. Next, nq2=p2. This implies p2 is divisible by q2, which subsequently implies that p is divisible by q. If n was a perfect square, its root would be an integer so q=1 and this is satisfied. However, if n is not a perfect square, its root would not be an integer. Thus, p divisible by q shows that gcd(p,q)≠1 and we have a contradiction.

My confusion is with the following step: p2 is divisible by q2 implies that p is divisible by q. Thank you so much for all of the help you can give me.

2. Oct 23, 2012

### haruspex

Re: Real Analysis: Proof of irrationality of all Sqrt[n] where n is not a perfect squ

It's more usual to think about common factors between n and p, and how often they divide each.