Is $\sqrt{-a -ib} = i\sqrt{a + ib}$ true? I am grade 12th student. I am learning complex numbers through recorded lectures of my mentor. He taught us that $\sqrt{ab} = \sqrt{a}\sqrt{b}$ if atleast one of them is positive. He told us that this operation can't be performed on imaginary numbers since they can't be compared with zero. However, he himself has used $\sqrt{-a -ib} = i\sqrt{a + ib} \space\space\space (b \neq 0)$ thrice. Each time he got the correct the answer.
My question is that is  $(\sqrt{-a -ib} = i\sqrt{a + ib})$  always true? Or is it by chance that the answers that came were correct.
What I know is that if $a,b$ are imaginary numbers, then $\sqrt{ab} \neq \sqrt{a}\sqrt{b}$. Is $\sqrt{-a -ib} = i\sqrt{a + ib}$ an exception to this rule? Please correct me if I am wrong.
Also, if possible please give examples.
Sorry for my poor english. Thank you.
 A: Let's first recall why there are restrictions on the identity $$\sqrt{ab} = \sqrt{\vphantom{b}a} \sqrt{b}. \tag{1}$$  The reasoning is that often given is that if, say, $a = b = -1$, then $(1)$ would yield the apparent contradiction
$$1 = \sqrt{1} = \sqrt{(-1)(-1)} = \sqrt{-1}\sqrt{-1} = i^2 = -1.$$
But this computation hides an implicit property that we are using when we use the symbol $\sqrt{\vphantom{x}}$ and what we mean when we use it.
The key point to remember is that every nonzero number, whether real or complex, has two square roots.  That is to say, if $z \ne 0$, then there are two distinct solutions (possibly real, possibly complex) to the equation
$$w^2 = z.$$  For instance, if I ask for the solution to the equation
$$w^2 = 4,$$ you might write
$$0 = w^2 - 4 = (w + 2)(w - 2)$$ hence $w \in \{-2, 2\}$.  And if $z = -1$, we have
$$0 = w^2 + 1 = (w + i)(w - i)$$ hence $w \in \{-i, i\}$.
When the solution to such an equation is real-valued, it is often convenient to use the notation $$w = \sqrt{z} \tag{2}$$ to denote the positive real-valued square root; so for example, when we write $\sqrt{4}$, what we mean is $2$, and not $-2$.  But over the complex numbers, this notion of "positive" or "negative" does not apply, because complex numbers are merely ordered pairs of reals with a special multiplication rule.
This imposition on $\sqrt{}$ (namely, that we are talking about the positive root) for real-valued square roots, is what leads to caveats regarding the identity $(1)$.  But a different way to conceptualize square roots that has more applicability to complex numbers is to think of it as a mapping rather than a function.
For instance, consider the function $$f(x) : \mathbb R^+ \to \mathbb R^+, \quad f(x) = x^2.$$  This function has as its inverse
$$f^{-1}(x) : \mathbb R^+ \to \mathbb R^+, \quad f^{-1}(x) = \sqrt{x}.$$  There is no issue with uniqueness because we restricted the domain and codomain to the positive reals.  But if we instead write
$$f(x) : \mathbb R \to \mathbb R, \quad f(x) = x^2,$$ then the inverse function is not well-defined because as we pointed out, there are in general two distinct square roots, and there is no intrinsic mathematical reason to choose one over the other.  That we mean the positive root when writing the symbol $\sqrt{}$ is just a notational convenience.  We address this shortcoming by allowing the inverse to not be a function but a mapping; e.g., the map
$$f(z) : \mathbb C \to \mathbb C, \quad f(z) = z^2$$ has an inverse mapping
$$f^{-1}(z) : \mathbb C \to \mathbb C \times \mathbb C, \quad f^{-1}(z) = z^{1/2}$$ where the codomain is a set of two complex numbers; e.g.,
$$f^{-1}(3 - 4i) = \{2 - i, -2 + i\},$$ and this also works for reals, whether positive or negative:
$$f^{-1}(4) = \{-2, 2\},$$ and
$$f^{-1}(-9) = \{-3i, 3i\}.$$  We basically choose not to choose between either equally valid solution.
So when we say, $\sqrt{a + bi}$, what do we really mean by this?  The use of $\sqrt{}$ is an abuse of notation because it doesn't make sense to ask for the "positive" square root of a complex number.  For instance, when we write $\sqrt{3 - 4i}$, do we mean $2 - i$, or do we mean $-2 + i$?  Some people might say, "just pick the root with positive real part."  And where does that lead us if we write $\sqrt{-1}$ which has zero real part?  Or if we say "just pick the root with positive imaginary part," that of course is no better.
One of the fundamental concepts in complex analysis is the notion of multivalued functions.  This is the mapping idea that we discussed above.  So for instance, when we ask for the $3$ cube roots of $1$, we mean the set $$\left\{1, -\frac{1}{2} + \frac{\sqrt{3}}{2} i, -\frac{1}{2} - \frac{\sqrt{3}}{2} i \right\}.$$  Or when we talk about solutions to the quadratic equation, we write $$x = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}.$$  That $\pm$ symbol is a notational shorthand for the set
$$\left\{\frac{-b - \sqrt{b^2 - 4ac}}{2a}, \frac{-b + \sqrt{b^2 - 4ac}}{2a}\right\},$$ which we would not actually need to use if we instead kept in mind that there are two square roots of the discriminant.
A: What you need to realize is that $\sqrt{a}=:y$ as a function is defined as the (positive) solution $y$ of $y^2=a$. Of course, this only works as a function, if $a\geq 0$. Otherwise, the solution splits into two sheets. In polar coordinates $re^{i\theta}=a$, by the $2\pi$-periodicity of trigonometric functions, the solutions can be realized as $\sqrt{r}e^{\frac{i}{2}\theta}$ and $\sqrt{r}e^{(\frac{i}{2})\theta+i\pi}$. As there is no natural choice of one of the two solutions for $\theta\neq 0$ (i.e. outside of $\mathbb{R}_{>0}$), the square root is no function, but rather a set-theoretic mapping.
However, there is a way out. We can define the principal square root of $x=re^{i\theta}$ as $\sqrt{r}e^{\frac{i}{2}\theta}$, which seems like the more natural choice. This agrees with the usual definition on $\mathbb{R}_{>0}$.
With this approach, you can prove that $\sqrt{-a-ib}=i\sqrt{a+ib}$ is correct using $i=e^{i\frac{\pi}{2}}$ and that the angles $\theta_1$ and $\theta_2$ differ by $\pi$. The important thing to take away from this, however, is that there is a deliberate choice in the square root, as in general the equation $x^2=a$ has two complex solutions for $a\in \mathbb{C}$ (counting multiplicities).
A: Actually, when $(a,b)=$ $(-1,0)$ or $(0,1)$ or $(1,1)$, $$\sqrt{-a-ib} \ne i\sqrt{a+ib}.$$
Adopting the branch cut $(-\infty,0)$ and writing $a+ib\,$ as $\,r\exp\left(i\theta\right):$ \begin{align}&\sqrt{-a-ib}\\={}
&\sqrt{-r\exp\left(i\theta\right)}\\={}
&\sqrt{r\exp\left(i(\theta+\pi)\right)}\\={}
&\sqrt{r}\exp\left(i\frac{(\theta+\pi)\mod{(-\pi,\pi]}} 2\right)\\={}
&\begin{cases}\sqrt{r}\exp\left(i\frac{\theta+\pi} 2\right) &&\text{if }-\pi<\theta\leq0;
\\ \sqrt{r}\exp\left(i\frac{\theta-\pi} 2\right) &&\text{if }0<\theta\leq\pi \end{cases}\\={}
&\begin{cases}\sqrt{r}\exp\left(i\frac\theta2\right) \exp\left(i\frac\pi2\right) &&\text{if }-\pi<\theta\leq0;
\\ \sqrt{r}\exp\left(i\frac\theta2\right) \exp\left(-i\frac\pi2\right) &&\text{if }0<\theta\leq\pi \end{cases}\\={}
&\begin{cases}i\sqrt{r}\exp\left(i\frac\theta2\right) &&\text{if }-\pi<\theta\leq0;
\\ -i\sqrt{r}\exp\left(i\frac\theta2\right) &&\text{if }0<\theta\leq\pi \end{cases}\\={}
&\begin{cases}i\sqrt{r\exp\left(i\theta\right)} &&\text{if }-\pi<\theta\leq0;
\\ -i\sqrt{r\exp\left(i\theta\right)} &&\text{if }0<\theta\leq\pi \end{cases}\\={}
&\begin{cases}i\sqrt{a+ib} &&\text{if }-\pi<\theta\leq0;
\\ -i\sqrt{a+ib} &&\text{if }0<\theta\leq\pi \end{cases}.
\end{align}
For $z\in\mathbb C,\:\sqrt z$ is defined as the single-valued square root (based on the specified branch cut) of $z;$ this justifies the third and seventh equalities.
