If I'm given a complex number (say $9 + 4i$), how do I calculate its square root?

23The answers of using de Moivre's formula are correct but it may also be instructive to try and find the square roots directly using $(a+bi)^2 = 9 + 4i$ (say) and solve for $a$ and $b$ or even just use the quadratic formula directly, which will give you an appreciation for why we use de Moivre's formula. – Jun 09 '11 at 19:38
12 Answers
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 = (z1)\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.
 1
 3
 35
 77
 48,535
 7
 82
 143

@Hans: Yes. This is a question where a picture would be useful (if only I knew how to draw pictures on MSE (and if I had more time on my hands)). Thanks. – Did Jun 10 '11 at 06:14

2Hans: Following a suggestion of @Didier I added two pictures I originally posted as a separate answer. It seemed more reasonable to have them in one answer. I hope you don't mind. – t.b. Jun 10 '11 at 11:44

Since you can't see it on my deleted post, here's @Didier's original comment: "Theo and @Hans: What do you think about the idea of making one single post from our three complementary answers? (Re reputation, if that matters, either one of you may sign the resulting post, I really do not care.)" I refrain from adding Didier's answer in since it seems a bit too aggressive an edit to me, but I'd be strongly in favor of doing it. – t.b. Jun 10 '11 at 11:53

Hans, @Theo: Done (at the risk of being seen as aggressive...). As soon as Hans says he is OK with the expanded version of his post, I will delete mine. – Did Jun 10 '11 at 12:17

Hans, @Didier: I added a little bit to the aggression since I think the people at [GeoGebra](http://www.geogebra.org/cms/) deserve being mentioned prominently for creating such a nice and free tool. – t.b. Jun 10 '11 at 12:25

@Didier: That's fine with me. As far as rep is concerned, I don't care either. We could make this answer CW. – Hans Lundmark Jun 10 '11 at 12:26





@Theo: This conversation is not going to make much sense to anyone else after we both edited our comments almost at the same time... ;) – Hans Lundmark Jun 10 '11 at 17:40

1

2@legends2k Right, the formula gets even simpler... Thanks for noticing this. Since you checked the formula, I cancelled the mention "unless I am mistaken". – Did Jan 06 '14 at 14:53

@Did Thanks for clearing that up, I was getting confused for sometime looking at it. – legends2k Jan 06 '14 at 14:55


As the pictures show, this formula bisects the argument of z and rescales to have the appropriate modulus. Does the fact that we can't trisect angles with a compass and ruler suggest that there's no analogous formula for $\sqrt[3]{z}$? – David Robertson Apr 16 '18 at 20:15

@NickBoshaft: I rolled back your edit. The issue is with $z$ on the negative real **axis**, and for those $z$ the formula really breaks down. Your comment along with the edit seemed to indicate that you were thinking of $z$ in the left half **plane** (but not on the negative real axis), and for those $z$ there is indeed no problem (but also no need for a separate drawing). – Hans Lundmark May 03 '18 at 14:11

Awesome answer! An extra thought on the geometric construction: If z is located within the unit circle, seems you can use a similar construction method, but would need to swap the roles of the circles to get an intersection. Using the the intersection of the tangent to circle around the origin radius z (instead of 1) with the circle around 1/2 through 1 (instead of around z/2 through z). – ben Sep 20 '19 at 01:12

I would say one must be careful, the first formula collapses at $z=1$. – AD  Stop Putin  Jan 07 '20 at 22:14
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))$.
 39,794
 7
 90
 125
 2,808
 17
 16

45The "two different square roots" issue applies to real numbers as well; it's just that in that case there's a consensus on which one is the "principal" square root. – Dan Jun 09 '11 at 23:49

4@user1374 There is also a consensus about which square root of a complex number is the principal square rootat least for *almost every* complex number... See my answer. – Did Jun 10 '11 at 05:55

13Oh, and I am afraid I must object to the assertion that going with De Moivre's formula would be *the easiest way*. – Did Jun 10 '11 at 06:35

1@Did What's the rational basis for having positive square roots as the principal square roots instead of negative square roots? – Doug Spoonwood May 22 '13 at 13:47

1@DougSpoonwood You might want to explain what you have in mind when you call some complex numbers *positive* and some others *negative*. – Did May 22 '13 at 15:13

2The reason for preferring positive square roots of positive real numbers is practical. For instance, the distance formula in any finite number of dimensions is a positive square root  namely, for two points, the distance apart is the square root of the sum of the squares of the respective differences of coordinates. It also ensures that the squareroot function is the simple function we all know, and so we may and do speak naturally of THE square root of a number a simpler idea than otherwise... In fact, I can think of no argument for why one would want to do anything different than this. – Dr. Michael W. Ecker Jun 02 '20 at 23:25
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^2b^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!
 1
 3
 35
 77
 69,703
 11
 166
 260

1


2This is actually a very useful formula that people don’t use often enough. Universally, this can be written as √(A+B)=(√(A+√(A²B²))+sgn(B)√(A√(A²B²)))/√(2). This can be used to take complex square roots as well as determine if a number, such as 6+2√(5), has a simple square root. √(6+2√(5)) can now be rewritten as √(5)+1. Some numbers, like 2√(5)+7, don’t have a simple square root and return something lengthy like in this case (√(7+√(29))+√(7√(29))/√(2). – Math Machine Aug 12 '19 at 22:50

For fast computation, you can use b=d/(2a), which even works for positive real numbers (but not negative reals). This with the formula for a give the fastest algorithm I've found for computing. – galinette Mar 18 '21 at 17:26

@Eric Naslund, the $\frac{d}{d}$ point is very important and interesting, but I haven't seen this being used anywhere else in any topic of math. The closest thing I get is $(1)^n$ when determining the final terms of series with alternating signs. Where else is $$\frac{d}{d}$$ used? Perhaps I will make a post asking for examples. – user71207 Apr 11 '21 at 13:24

1@MostowskiCollapse what do you mean by that? Isn't it impossible for $d=0$? SO how can $\frac{d}{d} =1$? – user71207 Apr 11 '21 at 13:26
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}}} $
 315
 3
 7

Why is the modulus of z = a^2 + b^2 instead of sqr( a^4 + b^4 + 4*a^2*b^2 )? – Mirte Feb 14 '17 at 13:55

Shouldn't you get 4 roots for a=+ and b=+. How did you eliminate two choices?? – Harshit Joshi Aug 12 '18 at 16:42

@HarshitJoshi: As you have $2ab=4>0$, you *know* $a$ and $b$ have the same sign, whence only two square roots, which arre opposite . – Bernard Nov 14 '20 at 14:11

One way is to convert the complex number into polar form. For $z = re^{i\theta}$, $z^2 = r^2 e^{i(2\theta)}$. So to take the square root, you'll find $z^{1/2} = \pm \sqrt{r} e^{i\theta/2}$.
Added: Just as with the nonnegative real numbers, there are two complex numbers whose square will be $z$. So there are two square roots (except when $z = 0$).
 3,981
 1
 28
 43
Claim 1. Suppose $b\neq 0$. Then the two roots to the equation $x^2 = a +bi$ are: $$\pm\frac{\sqrt{2}}{2}\left(\sqrt{\sqrt{a^{2}+b^{2}}+a}+\mathrm{i}\frac{b}{\leftb\right}\sqrt{\sqrt{a^{2}+b^{2}}a}\right).$$
Claim 2. Suppose $b>0$. Then:
(a) The two roots to the equation $x^2 = a +bi$ are $$x = \pm\frac{\sqrt{2}}{2}\left(\sqrt{\sqrt{a^{2}+b^{2}}+a}+\textrm{i}\sqrt{\sqrt{a^{2}+b^{2}}a}\right). $$
(b) And the two roots to the equation $x^2 = a bi$ are $$x=\pm\frac{\sqrt{2}}{2}\left(\sqrt{a+\sqrt{a^{2}b^{2}}}\textrm{i}\sqrt{a\sqrt{a^{2}b^{2}}}\right).$$
Proof of Claim 1. \begin{alignat*}{1} & \left[\pm\frac{\sqrt{2}}{2}\left(\sqrt{\sqrt{a^{2}+b^{2}}+a}+\mathrm{i}\frac{b}{\leftb\right}\sqrt{\sqrt{a^{2}+b^{2}}a}\right)\right]^{2}\\ =\ & \frac{1}{2}\left[\sqrt{a^{2}+b^{2}}+a\left(\sqrt{a^{2}+b^{2}}a\right)+2\mathrm{i}\frac{b}{\leftb\right}\sqrt{\left(\sqrt{a^{2}+b^{2}}+a\right)\left(\sqrt{a^{2}+b^{2}}a\right)}\right]\\ =\ & \frac{1}{2}\left(2a+2\mathrm{i}\frac{b}{\leftb\right}\sqrt{a^{2}+b^{2}a^{2}}\right)=a+\mathrm{i}\frac{b}{\leftb\right}\leftb\right=a+\mathrm{i}b. \end{alignat*}
Proof of Claim 2. \begin{alignat*}{1} \textbf{(a)} \ & \left[\pm\frac{\sqrt{2}}{2}\left(\sqrt{\sqrt{a^{2}+b^{2}}+a}+\mathrm{i}\sqrt{\sqrt{a^{2}+b^{2}}a}\right)\right]^{2}\\ = \ & \frac{1}{2}\left[\sqrt{a^{2}+b^{2}}+a\left(\sqrt{a^{2}+b^{2}}a\right)+2\mathrm{i}\sqrt{\left(\sqrt{a^{2}+b^{2}}+a\right)\left(\sqrt{a^{2}+b^{2}}a\right)}\right]\\ = \ & \frac{1}{2}\left(2a+2\mathrm{i}\sqrt{a^{2}+b^{2}a^{2}}\right)=a+\mathrm{i}\sqrt{b^{2}}=a+\mathrm{i}b. \end{alignat*}
\begin{alignat*}{1} \textbf{(b)} \ & \left[\pm\frac{\sqrt{2}}{2}\left(\sqrt{a+\sqrt{a^{2}b^{2}}}\mathrm{i}\sqrt{a\sqrt{a^{2}b^{2}}}\right)\right]^{2}\\ = \ & \frac{1}{2}\left[a+\sqrt{a^{2}b^{2}}+a\sqrt{a^{2}+b^{2}}2\mathrm{i}\sqrt{\left(a+\sqrt{a^{2}b^{2}}\right)\left(a\sqrt{a^{2}b^{2}}\right)}\right]\\ = \ & \frac{1}{2}\left[2a2\mathrm{i}\sqrt{a^{2}\left(a^{2}b^{2}\right)}\right]=a\mathrm{i}\sqrt{b^{2}}=a\mathrm{i}b. \end{alignat*}

1Except when b < 0 the last line isn't true because sqrt(b^2) isn't equal to b. For b < 0 replace + i... by i... Also typo in second to last line: r + a  (r + a) should be r + a  (r  a), where r = sqrt(a^2 + b^2). – Wout Jun 27 '16 at 15:11

@Wout: Thanks for spotting that error! I've now corrected, hopefully it's now good. – Jun 28 '16 at 08:49

Here's a useful picture from Wikipedia (ref). This helps visualise some comments above about having two square roots of most complex numbers.
The horizontal plane is the original complex number $z$.
The vertical axis is the real part of the square root(s) of $z$. (Note how there are two solutions for most numbers, i.e. all except zero.)
The colour is the angle of a square root of $z$, where red is 0° i.e. the real axis, cyan is $\pm$180° and so on.
The principal square root is the top half of the surface.
The see how the imaginary part behaves, rotate the surface 180° about the vertical axis. (Of course, the colours don't rotate, they stay where they are. More precisely, the magenta part will go to the bottom, and the green to the top, while the yellow and blue will stay as they are.)
 415
 4
 9
SQUARE ROOT OF A BINOMIC COMPLEX NUMBER
The number $\sqrt{a+bi}$ is a complex (or complex) $x+yi$ such that: $a+bi=(x+yi)^{2}$
So: $a+bi=(x^{2}y^{2})+2xyi\rightarrow \left. x^{2}y^{2}=a \atop 2xy=b \right\}$ Solving this system, and taking into account, to solve the bisquare equation, that $\sqrt{a^{2}+b^{2}}\geq a$: $$\left. y=\dfrac{b}{2x} \atop 4x^{4}4ax^{2}b^{2}=0 \right\}\rightarrow \left. x^{2}y^{2}=a \atop x^{2}=\dfrac{a+\sqrt{a^{2}+b^{2}}}{2} \right\}\rightarrow \left. x^{2}=\dfrac{a+\sqrt{a^{2}+b^{2}}}{2} \atop y^{2}=\dfrac{a+\sqrt{a^{2}+b^{2}}}{2} \right\}$$ Now, the equation $2xy=b$ tells us that the product $xy$ has the same sign as $b$. Therefore, if $b>0$, $x$ and $y$ have the same signs, and if $b<0$, they have different signs. $$b\geq 0\rightarrow \sqrt{a+bi}=\pm \left( \sqrt{\dfrac{a+\sqrt{a^{2}+b^{2}}}{2}}+i\sqrt{\dfrac{a+\sqrt{a^{2}+b^{2}}}{2}}\right)$$ $$b<0\rightarrow \sqrt{a+bi}=\pm \left( \sqrt{\dfrac{a+\sqrt{a^{2}+b^{2}}}{2}}i\sqrt{\dfrac{a+\sqrt{a^{2}+b^{2}}}{2}}\right)$$ In practice, these formulas are not used, but the process is followed.
Also, it is highly recommended to pass it to polar.
 1,037
 9
 15
$x^2  y^2 +2ixy$ = write the complex no.
$x^2  y^2$ = write the real value(1)
$2xy$ = write the imaginary value(2)
from equation (1) and (2)
$x^2 + y^2 = \sqrt{(x^2  y^2)^2 + 4x^2y^2}$
you will get $x^2 + y^2 = ?$ (3)
from equation (1) and (3)
you will get the value of $x$ and $y$
 1,861
 4
 17
 31
 31
 1
You can write each complex number $a+bi$ as $re^{i\theta}$ for some $r$ and $\theta$. To take the square root of that would be $$\sqrt{a+bi}=\sqrt{r}e^{\frac{i\theta}{2}}$$ which answers your question.
 191
 8
ok, Would someone please tell me if I'm wrong about this.
We want $\pm\sqrt{a+bi}.$ $($This kind of square root is not welldefined without the $\text{“}{\pm}\text{''}.)$
If $a+bi = r(\cos\theta+i\sin\theta)$ then $\displaystyle\tan\frac\theta2 = \frac{\sin\theta}{1+\cos\theta} = \frac b {\sqrt{a^2+b^2}+a},$ so $$ \sin\frac\theta2 = \frac b{\text{something}} \text{ and } \cos\frac\theta 2 = \frac{\sqrt{b^2+a^2}+a}{\text{something}} $$ where $\text{“something''}$ makes $\sin^2+\cos^2=1,$ so the efficient way to think about this is the tangent halfangle formula. Or is there a more efficient way?
 1
 30
 276
 565
Write $(a+bi)^2 = 9+4i$. Then $a^2b^2 +2abi = 9+4i$. By comparison of coefficients, $2ab = 4$ and $a^2b^2 = 9$. Thus $ab=2$ and $a^2 = 9 +b^2$. Setting $a = 2/b$ with $b\ne 0$ gives $4/b^2 = 9 + b^2$ and so $4 = 9b^2 + b^4$, i.e., $b^4 + 9b^2 4 = 0$. Solve $x^2 + 9x4=0$, where $x=b^2$. Solutions are $x_{1,2} = \frac{9\pm\sqrt{9^24\cdot 1\cdot (4)}}{2\cdot 1} = \frac{9\pm\sqrt{97}}{2}$. Solutions are $b_{1,2,3,4} = \pm\sqrt{\frac{9\pm\sqrt{97}}{2}}$. This gives the corresponding values $a_{1,2,3,4}$. All solution pairs are realvalued.
 20,232
 2
 12
 24