# Defining a principal square root in the complex space : Wolfram case

In Wikipedia(https://en.wikipedia.org/wiki/Square_root), we define the square root as

In mathematics, a square root of a number $$a$$ is a number y such that $$y^2 = a$$; in other words, a number $$y$$ whose square (the result of multiplying the number by itself, or $$y × y$$) is $$a$$.[1]

Every non-negative real number a has a unique non-negative square root, called the principal square root, which is denoted by $$\sqrt{a}$$, where $$\sqrt{}$$ is called the radical sign or radix.

For positive $$a$$, the principal square root can also be written in exponent notation, as $$a^{1/2}$$.

If one would like to construct the concept of square root in $$\mathbb{C}$$, we would just use Wikipedia definition with $$a\in \mathbb{C}$$. Since $$P_a(x)=x^2-a$$ is a polynomial of degree $$2$$, it has two roots in $$\mathbb{C}$$. How do we choose the principal square root ? Obviously, there is no solution ! However , when one goes to Wolfram , and type

solve x^2=1+i

Right away, and without any warning, it returns two solutions in terms of a square root of a complex number.

Even worse, when one types

solve sqrt(x)=1+i

we get a solution : $$2i$$

How would one define the principal square root? For the sake of simplicity, we ignore $$0$$.

Let $$\Phi_{\alpha} : \mathbb{C^*}\rightarrow]0,\infty[×]\alpha,\alpha+2\pi]$$ denote a bijection from the Cartesian to Polar coordinates, with $$]\alpha,\alpha+2\pi]$$ supplied with the $$2\pi$$-equivalence, and $$\alpha \in \mathbb{R}$$

We can say that $$\forall z\in \mathbb{C^*} \exists!(\rho,\theta) \in]0,\infty[×]\alpha,\alpha+2\pi]$$ such as $$z=\rho(cos(\theta)+isin(\theta))$$ or $$z=\rho e^{i\theta}$$

One natural definition would be to define the principal square root of $$z$$ as $$\sqrt{z}=\sqrt{\rho}e^{i\frac{\theta}{2}}$$, however, because we introduced $$\theta$$, the $$\sqrt{}$$ function depends on the defintion of $$\Phi_{\alpha}$$.

Indeed , if we pick $$\alpha=0$$, $$\sqrt{(\mathbb{C^*})}=\mathbb{C^*}\backslash\{\mathbb{R_{+}^*}\cup \{z \in \mathbb{C} | \Im(z)<0\}$$.

This $$\alpha$$ is not appropriate as it violates what we build for the principal square root in $$\mathbb{R}$$

An interesting choice would be $$\alpha=-\pi$$ , indeed, the square root image will be in $$\{z \in\mathbb{C*}| Re(z)\geq0\}$$

It seems to be what Wolfram adopted...

Now, this is where it gets messy for me : if we look back at the defintion of $$\Phi_{\alpha}$$, nothing prevents us to define it as $$\Phi_{\alpha} : \mathbb{C^*}\rightarrow]0,\infty[×[\alpha,\alpha+2\pi[$$, where we change the bracket of the interval.

This change has a significant impact ! If we pick again $$\alpha=-\pi$$, the equation $$\sqrt{z}=i$$ used to have a solution, but not anymore when changing the brackets.

Similarly, Wolfram return "no solution exists" if we type

solve sqrt(x)=-i

I am trying to get a natural and intuitive definition of the square root in $$\mathbb{C}$$ : Wolfram seems to accept one , I would agree that the best bijection would be the one with $$\alpha=-\pi$$, but I am not sure about the order of the brackets : why did Wolfram choose to reject $$\{z \in \mathbb{C} | \Re(z)=0, \Im(z)<0\}$$ ?

Thanks.

By the Fundamental Theorem of Algebra, the equation $z^2 - a = 0$ has two solutions in the complex numbers. When $a = 0$, those two solutions overlap, both being $0$ themselves. But for any other complex number $a$ they will be unique, with each the opposite of the other.

### The solutions of $z^2 = i$

When $a$ is a non-negative real number, its square roots are real, and one of those roots is easily distinguished and is generally more useful than the other. That is of course the positive root. So we have a strong convention of defining the radical $\sqrt{\ \ \ }\$ and the text sqrt operators to return only it.

But when $a$ is negative or not real, the reasons for differentiating between the two roots decrease dramatically. The choice that works best in answering one problem will often be a poor choice for the next problem. Therefore, there is no similar strong convention for defining one of the square roots as being "principal". When mathematicians need a particular choice, they will define it for the work they are doing, without being bothered about what choices other mathematicians (or they themselves) have made in the past, or will make in the future.

One place where such a choice is needed is in computation languages such as Wolfram Alpha. An operator needs to return a definite value, so if they are going to define the sqrt operator, a fixed choice of principal root is needed. The choice they made is the most common: if $a$ is not a negative real number, then sqrt(a) is the unique value $z$ such that $z^2 = a$ and $\Re(z) > 0$, the "positive real half-plane". When $a$ is a negative real number, so $\Re(z) = 0$ for both roots, they have chosen the $z$ with $\Im(z) > 0$.

If we write $a = re^{i\theta}$, restricting $-\pi < \theta \le \pi$, then Wolfram Alpha's $\sqrt a = \sqrt re^{i\left(\frac \theta 2\right)}$. This is the choice they have made for their site. But do not expect other sources to always agree.

### Range of Wolphram Alpha's sqrt function

Thus your solve x^2 = 1 + i gives two solutions because that polynomial equation has two solutions. And by any definition of the square root, they can be described as $\pm \sqrt{1+i}$. (It is disappointing that Wolfram Alpha fails to provide any other expression for these roots. I would call that a failure of the engine. The real and imaginary parts of this expression are fairly easy to obtain.)

And of course solve sqrt(x)=1+i will give $2i$ as the solution: $(1 + i)^2 = 2i$!

So why doesn't solve sqrt(x)=-i give $-1$ as the result? Because $1 + i$ is in the range of Wolfram Alpha's square root function, but $-i$ is not.

• Well written ! It confirms my thoughts and my assumptions on Wolfram, thanks. Yet, I m still resistant on the reason why removing $\{\Im(z) < 0\}$ is a better choice than $\{\Im(z) > 0\}$. I know, you are not claiming that , neither is Wolfram(or maybe ?), the convention argument is a reason. I wish I could conclude , taking $-\pi$ instead of $\pi$ is a better a choice, rather than taking the other case. I am pretty sure that Physics use the square root in the complex worls, can someone confirm ? Maybe in these applications removing $\{\Im(z) < 0\}$ make more sense ? Commented Dec 20, 2016 at 14:09
• The reason for choosing the positve imaginary axis is simple: We first introduce $i$ to be the square root of $-1$. So if we are choosing a definite value for $\sqrt{-1}$, why would make it $-i$ instead? I have no idea what you mean by "Physics use the square root in the complex worls". Physics makes much use of square roots and also of complex numbers, but as I said above, we don't try to define a fixed principal square root function to be used in general. Anytime we have need for a square root function, we choose whatever branch fits the needs of the current problem. Commented Dec 20, 2016 at 23:57
• Great, convinced . Commented Dec 21, 2016 at 0:58