# B If a divides b^2, a divides b

1. Apr 12, 2017

### MandelbrotI

I was trying to find a proof concerning this statement, but I couldn't find anything. I have tried to come up with my own solution:

If a divides b^2, that means that :

a*x=b^2
a*(x/b) = b

This shows that b is divisible by a. Is this correct?

2. Apr 12, 2017

### BvU

Hello Mandebroti,
Not if x/b is not an integer, so you still have to prove that.

3. Apr 12, 2017

### Math_QED

I'm sorry. This is incorrect. Your mistake was that you assumed that $x/b$ was an integer.

Counterexample:

a = 9, b = 3

Then, obviously 9 divides 3^2, but 9 does not divide 3.

4. Apr 12, 2017

### MandelbrotI

Do you have a proof for that?
Maybe this works:

a*x=b^2
With the rule that a and b have to be integers, b can be split up into primes:
b=p1*p2*....pn

Using that for b^2:

a*x=p1*p1*p2*p2....pn*pn

We see that a has to divide one of these prime factors. And all of these factors can be found in b, so when
a divides, for example, py, then a divides b aswell.

5. Apr 12, 2017

### Math_QED

Please check my example above. This is not generally true.

6. Apr 12, 2017

### Staff: Mentor

Another example (counterexample) is if b = 6 = 2 * 3, and a = 4. a | b2, since 4 divides 36, but a doesn't divide b.

7. Apr 14, 2017

### MandelbrotI

I see that problem. The thing is, this statement is used by many people to proof that the square root of 2 is irrational.

sqr(2) = a/b
2 = a^2/b^2
2*b^2 = a^2

At this point, it says: 2 divides a^2, so 2 divides a -> a = 2* some variable. I assumed this is correct.
Of course, this is true as a square number can only be even if the original number is even. But this was used for square root 3 aswell. Anyways, is there another way to prove this? Is it necessary to define a such that a<b?

Last edited: Apr 14, 2017
8. Apr 14, 2017

### Staff: Mentor

I don't see how this is related to your original problem.
In the proof above, one assumption is that a/b is in reduced form; i.e., that a and be don't have any common factors.

In the last equation above, $2b^2 = a^2$, since there is a factor of 2 on the left side, there must also be a factor of 2 on the right side. But, since the right side is $a^2$, there can't be just a single factor of 2 -- there must be two factors of 2, so there must be an additional factor of 2 in $2b^2$ (in addition to the coefficient 2). That can't be, because of the assumption that a and b don't share common factors, so we reach a contradiction.

9. Apr 14, 2017

### MandelbrotI

Yes, the proof uses contradiction. But this contradiction only works, because, when p divides a2, p also divides a. So p divides a and b -> contradiction. But for that to happen, the statement that when x divides y2, x divides y, also has to be true. Only because of this you can say, that they share factors, which leads to a contradiction.

10. Apr 14, 2017

### Math_QED

But, how can it be true if we gave you 2 valid counterexamples? Obviously, there is a flaw in your reasoning.

11. Apr 14, 2017

### MandelbrotI

It is the reasoning of multiple "proofs" on the internet, including the video I posted.

12. Apr 14, 2017

### Staff: Mentor

Which is really irrelevant. If you make a general statement, such as the one in post #1, and others offer counterexamples, then your statement isn't true, regardless of whether there are proofs on the internet.

Either the proofs themselves are wrong, or you have misunderstood what it was that was being proved in the videos. I hope that it is now abundantly clear that if $a | b^2$, then it does not imply that $a | b$. We have provided several counterexamples that disprove this.

13. Apr 14, 2017

### MandelbrotI

Then the proofs on the internet are wrong. Thanks, the first insight I gained so far.

14. Apr 14, 2017

### SlowThinker

You learned the wrong lesson. The proofs are correct.
Notice that the proofs don't work for any square root, for example, sqrt(4) is an integer.

15. Apr 15, 2017

### MandelbrotI

Yes, only for prime numbers.

16. Apr 15, 2017

### SlowThinker

I'd say it applies to $\sqrt 6$ too. You should spend some time thinking before jumping to conclusions.

17. Apr 15, 2017

### MandelbrotI

Fine. I still don't understand, which part of any proof here is correct. I came with the question whether my proof is correct. Seemingly it is not. I tried another approach, still no conclusions. Both of these statements are used in various proofs on the internet. You tell me, they are correct. The others told me, they aren't.

18. Apr 15, 2017

### Staff: Mentor

Here is what you posted to start this thread:
In a nutshell your work above purports to prove that "II a divides b2, then a divides b"
More specifically, the proposition is "∀ a > 0, ∀ b > 0, a | b2 ⇒ a | b, where a and b are positive integers"
The "for all" qualifiers mean that regardless of the choices of a and b, the statement must be true. The counterexamples provided already in this thread are sufficient to show that the statement is not true in general.

In your work above, I'm not sure you fully understand what "divides" means in the context of this problem. When someone says that a divides b (in symbols a | b), it means that there is some integer k such that ka = b. For example, 2 | 6, because 2 * 3 = 6. 2 does not divide 7 because there is no integer k such that 2 * k = 7.

In your work above, given that a | b2, there is some integer x such that a * x = b2. In your next step, you divided both sides of this equation by b, getting $a \frac x b = b$. There is no guarantee that $\frac x b$ is an integer, and that is where your "proof" falls down.

19. Apr 15, 2017

### MandelbrotI

I appreciate your answer, and understand, that there are either certain guidelines a and b have to follow, or the proof is incorrect. In my initial statement, I left out an important detail. a and b can't share the same factors. This could lead to the proof being correct, as all counterexamples have a's and b's that share factors.
Anyways, what about the proof using prime factors, to show that 2, or specifically p, divides a and b, which creates a contradiction.

20. Apr 15, 2017

### SlowThinker

In my opinion, the mistake you are making, is that you see a proof using number 2, and generalize it to any number $a$, which is not justified. The proof works for many numbers $a$, but not for all.
Can you figure out the condition that $a$ must satisfy, so that a | b2 ⇒ a | b ?