May I divide by number n in order to solve $2n = n^2$ ( even in a case where $n$ is not equal to $0$)? Suppose I have the equation : $2n = n^2$. 
Dividing by $n$ ( provided $n$ is not $0$) , I get (apparently): $n = 2$. However, from another point of view, I have: 
$2n = n^2 \rightarrow  n^2 = 2n $
$\rightarrow \sqrt{n^2} = \sqrt{2n}$
$\rightarrow |n|  = \sqrt{2n}$
$\rightarrow |n| =  \sqrt{2} \cdot \sqrt{n}$
$\rightarrow  n = + \sqrt{2} \cdot \sqrt{n} \text{ or } n = - \sqrt{2} \cdot \sqrt{n}$. 
And I do not think that here $2$ is still a solution (as it appeared to be the case with the first method). 
Which method is correct, if any? 

$2n=n^2$
$n^2-2n=0$
Let $f(x)=x^2-2x$
From the function $f(x)$, it is a quadratic equation. Plot the graph of $y=f(x)$ you can see that it intersects x-axis at $x=0$ and $x=2$. So, theoretically you can't divide the number $n$ straight even thought $n\neq0$.
