If $n$ divides $m$, then $n$ divides $m^2$ I have been asked in one of my problem sheets to prove that if $3$ divides $n$, then $3$ divides $n^2$. 
So what I did was: Write $n=3d$, $d$ is an integer. So $n^2=9d^2$, therefore $n^2=3*3d^2=3c$, where $c$ is an integer. 
QED. 
But then the same method works in general for any number other than $3$. 
Where am I making a mistake? 
 A: You have no mistake,
$n^2 = n*n$
therefore, if m divides n:
$n=mc,c\in Z$
$n^2=m(mc^2)$
$mc^2\in Z$
therefore m divides $n^2$.
A: $$n|m\implies m=qn\implies m^2=q^2n^2=rn\implies n|m^2.$$
The converse isnt' true. For instance, $9|36$ but $9\not|\ 6$.
A: See that $n^2=n.n$. Now we are given that $3|n$ or $3k=n$ for some integer $k$. Substituting it in the first result, we get $n^2=3k.n$.  Let $kn=p$ for some integer $p$, so $n^2=3p$ which shows that $3|n^2$.  
Remark: Can you prove the converse of your question also? That is, if $3|n^2$, then prove that $3|n$. (But keep in mind that the number which is dividing will always be a prime). Otherwise, it won't be true.  
Hint: Use the fundamental theorem of Arithmetic.
A: If k divide n it means that exists an integer c such that 
n = k*c 
and, conversely, if exists an integer c such that n = k*c 
then k divide n
So n^2 = k^2 * c^2 = k * (k c^2) so k divide n^2. 
No problem
If also k is PRIME, then it's true even the opposite : 
k | n^2 => k | n
Thats because for any PRIME p : p | ab => (p | a or p | b)
Now look here : 
suppose p | a^n ; then p | a 
Proof : 
Suppose p not divide a
then p | a^n => p | a or p | a^(n-1)
But we supposed p not divide a, then must be 
p | a^(n-1) so again p | a^(n-2) or p | a
and so on, until you get that p | a 
So if you suppose not p | a you get a contradiction
(not p | a AND p | a) 
Then, p | a 
CvD
