So, my friend show me prove that $1=-1$ by using this way:
$$1=\sqrt{1}=\sqrt{(-1)\times(-1)}=\sqrt{-1}\times\sqrt{-1}=i\times i=i^2=-1$$
At first sight, I stated "No, $\sqrt{ab}=\sqrt{a}\times\sqrt{b}$ is valid only for $a,b\in\mathbb{R}$ and $a,b\geq0$"
But, I remember that $\sqrt{-4}=\sqrt{4}\times\sqrt{-1}=2i$ which is true (I guess).
Was my statement true? But, $\sqrt{ab}=\sqrt{a}\times\sqrt{b}$ is also valid if one of a or b is negative real number. Why is it not valid for a and b both negative? If my statement was wrong, what is wrong with that proof?