[Math] Prove that if the square of a number $m$ is a multiple of 3, then the number $m$ is also a multiple of 3.

elementary-number-theory

I'd like to prove that if ${m}^{2}$ is a multiple of $3$, then ${m}$ is also a multiple of $3$. Similarly, I'd like to disprove that if ${n}^{2}$ is a multiple of $4$, then ${n}$ is also a multiple of $4$.

Per the comment from @thisismuchhealthier, the context is that I'm studying the proof of the elementary theorem from analysis that there is no rational number whose square is $2$ and the related statements that $\sqrt{3}$ and $\sqrt{6}$ are both irrational, but there is a rational number whose square is $4$.

Best Answer

Hint $\ 3\mid (m\!-\!1)m(m\!+\!1)=\color{#c00}{m^3\!-m},\ $ so $\ 3\mid\color{#0a0}{m^3}\,\Rightarrow\, 3\mid \color{#0a0}{m^3}\!-(\color{#c00}{m^3\!-m}) = m$