How do I get the square root of a complex number?
If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?
This is a three parts post. The first part was written by user Did; it provides a formula and some brief comments on it. The second part was written by user Hans Lundmark; it provides a geometric way to understand the formula. The third part was written by user t.b.; it provides some explanatory pictures and some brief comments on them.
(Did) If one is able to compute the square root of every positive real number and the modulus of every complex number, a nice formula for the principal square root $\sqrt{z}$ of $z$ is $$ \sqrt{z}=\sqrt{r}\frac{z+r}{|z+r|},\quad r=|z|. $$ Try to prove it and you will see, it works...
The principal square root is the one with a positive real part. The only case when the formula fails is when there is no principal square root, that is, when $z$ is a negative real number.
No sine or cosine is involved, one does not even need to solve second degree polynomials, one just uses squares and square roots. For example, for $z=9+4\mathrm{i}$, $$ \sqrt{z}=\frac{9+\sqrt{97}+4\mathrm{i}}{\sqrt{2(9+\sqrt{97})}}. $$
(HL) There's a geometric way of understanding the formula in Did's answer. To find a square root of a given complex number $z$, you first want to find a complex number $w$ which has half the argument of $z$ (since squaring doubles the argument). Compute $r=|z|$ and let $w = z+r$; thus $w$ lies $r$ steps to the right of $z$ in the complex plane. Draw a picture of this, and it should be clear that the points $0$, $z$ and $w$ form an isosceles triangle, from which one sees that the line from $0$ to $w$ bisects the angle between the real axis and the line from $0$ to $z$. In other words, $w$ has half the argument of $z$, as desired. Now it only remains to multiply $w$ by some suitable real constant $c$ so that $|cw|^2 = |z|$; then we will have $(cw)^2=z$ and hence $cw$ is a square root of $z$. Obviously, $c=\pm\sqrt{|z|}/|w|$ will do the trick, so this method only fails when $w$ happens to be zero, i.e., if $z$ is a negative real number.
(t.b.) Following a suggestion of Did, I take the liberty of adding two pictures I originally posted as a separate answer, but it seemed better to have them here:
Here's the picture for $z = 9 + 4i$:
Remark: The construction of the square roots is geometrically exact. That is to say, they were constructed using straightedge and compass only. I decided to hide the construction, as it seems rather obfuscating the intended illustration than adding to it. Nevertheless, I suggest taking a moment and thinking about how you would achieve the geometric construction.
Added (t.b.)
Here's the construction I used: Intersect the circle around $z/2$ through $z$ with the tangent to the unit circle orthogonal to $z$. Then $h^2 = (|z|-1)\cdot 1$ and thus the red circle has radius $\sqrt{|z|}$. It remains to intersect the red circle with the angular bisector of the $x$-axis and $z$ which I constructed using the process Hans described in his part of the post.
The pictures were created using GeoGebra.
The square root is not a well defined function on complex numbers. Because of the fundamental theorem of algebra, you will always have two different square roots for a given number. If you want to find out the possible values, the easiest way is probably to go with De Moivre's formula, that is, converting your number into the form $r(\cos(\theta) + i \sin(\theta))$, and then you will get $(r(\cos(\theta)+ i \sin(\theta)))^{1/2} = ±\sqrt{r}(\cos(\theta/2) + i \sin(\theta/2))$.
Here is a direct algebraic answer.
Suppose that $z=c+di$, and we want to find $\sqrt{z}=a+bi$ lying in the first two quadrants. So what are $a$ and $b$?
Precisely we have $$a=\sqrt{\frac{c+\sqrt{c^{2}+d^{2}}}{2}}$$ and $$b=\frac{d}{|d|}\sqrt{\frac{-c+\sqrt{c^{2}+d^{2}}}{2}}.$$ (The factor of $\frac{d}{|d|}$ is used so that $b$ has the same sign as $d$) To find this, we can use brute force and the quadratic formula. Squaring, we would need to solve $$a^2-b^2 +2abi=c+di.$$ This gives two equations and two unknowns (separate into real and imaginary parts), which can then be solved by substitutions and the quadratic formula.
I hope that helps!
You can also do following (technique often advised at school) :
-
Let's write $z² = 9 + 4i$ with $z = a + bi$. The goal is to find $z$
Thus we have $(a + bi)² = 9 + 4i$ and if you expend we get $a²+ 2abi - b² = 9 + 4i$
If you identify the real and imaginary parts, you obtain :
$a²-b² = 9$ (1)
and
$2ab= 4$ (2)
-
Now, as $z² = 9 + 4i$, the modulus of $z²$ and $9 + 4i$ are equal so we can write :
$a²+b² = \sqrt{9²+4²}$
$a²+b² = \sqrt{97}$ (3)
-
Now find $a$ and $b$ with the the equations (1) , (2) and (3) :
(1) + (3) $\Leftrightarrow 2a² = 9+\sqrt{97} $
so $a = \sqrt{\frac{1}{2}(9+\sqrt{97})} $ or $a = - \sqrt{\frac{1}{2}(9+\sqrt{97})} $
With equation (2) and the previous result you can now find $b$ :
$2ab= 4$
$b= 2/a$
so $b = 2\sqrt{\frac{2}{9+\sqrt{97}}} $ or $b = - 2\sqrt{\frac{2}{9+\sqrt{97}}} $
The answer is : $z = \sqrt{\frac{1}{2}(9+\sqrt{97})} + 2i\sqrt{\frac{2}{9+\sqrt{97}}} $ or $z = - \sqrt{\frac{1}{2}(9+\sqrt{97})} - 2i\sqrt{\frac{2}{9+\sqrt{97}}} $