Square Root of Complex Number in Cartesian Form

Theorem
Let $z \in \C$ be a complex number.

Let $z = x + i y$ where $x, y \in \R$ are real numbers.

Let $z$ not be wholly real, that is, such that $y \ne 0$.

Then the square root of $z$ is given by:
 * $z^{1/2} = \pm \left({a + i b}\right)$

where:

Proof
Let $a + i b \in z^{1/2}$.

Then:

Equating imaginary parts in $(1)$:

Equating real parts in $(1)$:

Note that in $(3)$, only the positive square root of the discriminant $x^2 + y^2$ is used.

This is because the negative square root of $x^2 + y^2$ would yield $\dfrac {x - \sqrt {x^2 + y^2} } 2 < 0$.

As $a \in \R$, it is necessary that $\dfrac {x + \sqrt {x^2 + y^2} } 2 > 0$.

Hence $\sqrt {x^2 + y^2} > 0$.

Then:

But from $(2)$ we have:
 * $b = \dfrac y {2 a}$

and so having picked either the positive square root or negative square root of either $a^2$ or $b^2$, the root of the other is forced.

So:


 * if $y > 0$, then $a$ and $b$ are both of the same sign.

Thus:
 * $b = 1 \times \sqrt {\dfrac {-x + \sqrt{x^2 + y^2} } 2}$


 * if $y < 0$, then $a$ and $b$ are of opposite sign.

Thus:
 * $b = \left({-1}\right) \times \sqrt {\dfrac {-x + \sqrt{x^2 + y^2} } 2}$

Hence:
 * $b = \dfrac y {\cmod y} \sqrt {\dfrac {-x + \sqrt {x^2 + y^2} } 2}$