I'm curious about a specific rule about the square root of a product of two numbers. Let $a,b>0$. Then $$ \sqrt{ab}=\sqrt{a}\sqrt{b}. $$ We also have that $$ \sqrt{-ab}=\sqrt{-a}\sqrt{b}. $$ However, it is not true that $$ \sqrt{(-a)(-b)}=\sqrt{-a}\sqrt{-b}. $$ Indeed, if it was true, we would get $1=\sqrt{1}=\sqrt{(-1)(-1)}=\sqrt{-1}\sqrt{-1}=i^2=-1$, a contradiction.
My question is the following: Is there a stronger reason that makes this impossible? I mean, besides leading to a contradiction given what we know from real and complex numbers. Is there a generalization of the definition of root that includes this kind of manipulation? I'm looking for some deeper understanding, any insight is appreciated.
The deeper understanding that prevents a nice generalization of the rule $$ \sqrt{ab} = \sqrt{a}\sqrt{b} $$ that works for nonnegative $a$ and $b$ is the fact that for every nonzero complex number $z$ there are two solutions to the equation $$ x^2 = z . $$ There is no consistent way to pick one of those roots and call it $\sqrt{z}$ unless $z$ happens to be real and positive. In that case that expression always means the positive root. Only on that domain is $\sqrt{\ }$ a function.
It's often convenient to write $\sqrt{-r} = i\sqrt{r} $ for positive real $r$, but that is not a formal definition. Using it as one leads to the contradiction in the question.