# Homework Help: B^2 = a with a is an integer and b rational => b is an integer

1. Jan 13, 2012

### Elwin.Martin

1. The problem statement, all variables and given/known data
b^2 = a
b is a rational number
a is an integer
prove that b is an integer.

This is self assigned, but I think this is the appropriate place to put my question.
2. Relevant equations
see above

3. The attempt at a solution
Is this legitimate...?

Since b is a rational number, there exists two integers m and n with n=! 0 s.t. b=(m/n) and gcd(m,n)=1, thus we have
b^2 = a ; (m/n)^2 = a ; m^2/n^2 = a ; m^2 = a*n^2 ; m = n√a.
If a is not a perfect square, then √a is irrational and thus n is irrational since m is an integer...a contradiction. Suppose then that a is a perfect square, then we have that m =nc where c=√a. Since c is an integer, implies that n|m, but since gcd(m,n) = 1 we must have that n = 1 thus b = m and b is an integer.

The first part seems a little sketchy to me, I know it to be true...but I'm not sure I can use it how I did. Any advice on how to clean this up?

I feel kind of dumb working on my properties of real numbers, but I'm hoping it will help my foundations. Sorry to be asking so many questions, I asked something yesterday as well...maybe I should ask elsewhere in the internet? Though I suppose it is up to the viewer to deem it worthy of response, so I guess it doesn't matter too much as long as I'm not spamming.

Thanks in advanced for any help!

2. Jan 13, 2012

### HallsofIvy

I suppose you could clean it up or simplify it a bit but your basic concept is correct.

3. Jan 13, 2012

### Curious3141

I don't know if I'm completely comfortable with your proof. You see, you can distil it down to this proof by contradiction: Negate the original proposition and suppose we can have b rational (condition 1) but nonintegral (condition 2), b^2 = a and a integral. Now, since you're given that a is an integer, a is either a perfect square (which by definition is a square of an integer) or not a perfect square. If a is a perfect square, its square root is an integer, implying b is an integer which contradicts condition 2. If a is not a perfect square, then its square root is irrational, which contradicts condition 1. You've arrived at a contradiction, the supposition is false and therefore the original proposition is true.

That's essentially your proof, reduced to the basics. It's actually a completely correct proof. The only issue I have with it is that you're assuming the part in bold. Of course, this is true, but whether you can assume it for the purpose of this proof depends on whether you've proven that as an earlier result and how much leeway you're given.

Maybe I could suggest another tack: Start with the same supposition. Let $b = \frac{p}{q}$, where $(p,q)=1$ Since b is non-integral, $q \neq 1$. Now $a = b^2 = \frac{p^2}{q^2} \Rightarrow p^2 = aq^2$. Clearly $q | q^2$ (and hence the RHS), so q has to divide the LHS too, and therefore $q|p^2$. But $(p,q)=1$ by definition and $q \neq 1$, so this is a contradiction. QED.

EDIT: I removed the inference: $q|p^2 \Rightarrow q|p$ because it's not true in general, and unnecessary here. Please note the edit carefully.

Last edited: Jan 13, 2012
4. Jan 13, 2012

### Elwin.Martin

Yeah, that was what I was worried about. ^^; Since I'm using someone else's syllabus, I suppose I should be extra careful and do things a little more fundamentally.

I thought I was forgetting something easier and this is it. I saw this problem in my abstract algebra class right after we covered the division algorithm (so at the very beginning), but I'd forgotten how it was done nicely.

Thank you for the help!

5. Jan 13, 2012

### Curious3141

You're welcome. But I noticed an unsupportable inference in my proof, and I've amended it.

Specifically, this line: $q|p^2 \Rightarrow q|p$ is not true in general.

For example, $4 \mid 36$ but $4 \nmid 6$.

It can actually be justified here since p and q are coprime, but it makes the proof less focussed and is unnecessary anyway, so I removed it.

I also removed the "a is an integer" part in that line since it's redundant (The LHS $p^2$ is an integer by definition anyway).

Last edited: Jan 13, 2012