Why does this method work for proving $7|m^2$ thus $7|m$ but it does not work for multiples of 4?

72 Views Asked by At

I am refreshing my high school math since years of not doing any math at all and saw this method that I cannot fully understand.

According to a math video I watched, the teacher showed that for any number m powered to 2 and divisible by 7, then m is also divisible by 7. If $7|m^2$ then $7|m$. He then proved using contradiction of the opposite, assuming that while $7|m^2$ is true, $7|m$ is false:

$m \neq 7k$

$m^2 \neq (7k)^2$

$m^2 \neq 7^2k^2$

$m^2 \neq 7(7k^2)$

$k' = 7k^2$

$m^2 \neq 7k'$

And thus, we somehow have a contradiction with the initial statement of $7|m^2$.

I do the same for multiples of 4, I say that if $4|m^2$ then $4|m$ and I am going to prove it by contradiction of the opposite. If $4|m^2$ is true then $4|m$ is false:

$m \neq 4k$

$m^2 \neq (4k)^2$

$m^2 \neq 4^2k^2$

$m^2 \neq 4(7k^2)$

$k' = 4k^2$

$m^2 \neq 4k'$

So same result, this contradiction proved that if $4|m^2$ then $4|m$. But we know it really is not true, $6^2$ is divisible by 4 but 6 is not. So, some questions:

  • Is there any flaw in the first demonstration?
  • Does this method only works for prime numbers? If so, why? Should have I expressed 4 as $2^2$ instead?