# Quadratic formula for complex numbers

Consider the equation $$az^2+bz+c=0,$$ where $a,b$ and $c$ are complex numbers and $a\ne 0$. Applying usual operations on $\mathbb{C}$ we have the following: $$az^2+bz+c=0\iff z^2+\frac{b}{a}z = -\frac{c}{a}\iff z^2+\frac{b}{a}z + \frac{b^2}{4a^2} = \frac{b^2}{4a^2} -\frac{4ac}{4a^2} \\ \iff \left(z + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}.$$ Now here's where my doubt comes. I know I can take the square root on both sides but wouldn't I have two results on both sides? Moreover, on the denominator of the right side (and on the whole left side) I have $z_0^2$; taking square root of this means I have only one solution ($z_0$)? Because I was told that the solution for the quadratic equation will be the same as for real numbers.

What you've done is correct, right up to the end. Essentially you've rederived the "quadratic formula".

The last step isn't taking the square root of both sides, it's equating the quantity in parentheses on the left to one of the two square roots of the complex number on the right. That will give you the two solutions to the original equation.

That will be just one solution counted twice if the discriminant is $0$, and will recover the usual real roots of real quadratics if the coefficients are real and the discriminant nonzero.

• Ok, but I can't say that the two solutions will be $-\frac{b}{2a}\pm(\frac{b^2-4ac}{4a^2})^{1/2}$, so how I write the two solutions to the same form of the real case? Commented Sep 24, 2017 at 13:15
• Moreover, if I have $(4a^2)^{1/2}$ I just can't equal this to $2a$ because I have two square roots here. Commented Sep 24, 2017 at 13:21
• Think of the expression on the right as a single complex number $u+iv$ after you do all the arithmetic there. If it's not zero it has two complex square roots. Don't think about "square rooting" the numerator and denominator separately. You should not use the exponent $1/2$ or the square root symbol for complex numbers. It leads to confusion. Commented Sep 24, 2017 at 13:24

Let's call $$\sigma$$ the square root of $$z$$ which means that $$\sigma$$ such as $$\sigma^2=z$$.

Thus, if $$\rho = b^2 - 4ac$$ and $$\sigma^2 = \rho$$ then \begin{align*} & \left(z + \frac{b}{2a}\right)^2 = \frac{b^2 - 4ac}{4a^2}\\ \iff & \left(z + \frac{b}{2a}\right)^2 = \frac{\rho}{4a^2}\\ \iff & z + \frac{b}{2a} = \frac{\pm\sigma}{2a}\\ \iff & z = \frac{\pm\sigma}{2a} - \frac{b}{2a}\\ \iff & z = \frac{-b\pm\sigma}{2a} \end{align*}

Let's say we are looking for the square root $$x + i y$$ of $$a + i b$$ where $$b$$ is positive. It is possible to find the square root of a complex number like this: \begin{align*} & (x + i y)^2 = a + i b \\ \iff & \begin{cases} x^2-y^2 &= a\\ 2xy &= b \end{cases} \iff \begin{cases} x^2-y^2 &= a\\ y &= \frac{b}{2x} \end{cases} \iff \begin{cases} x^2-\left(\frac{b}{2x}\right)^2 &= a\\ y^2 &= x^2 - a\\ 2xy &= b \end{cases}\\ \iff & \begin{cases} x^2-\frac{b^2}{4x^2} &= a\\ y^2 &= x^2 - a\\ 2xy &= b \end{cases} \iff \begin{cases} \frac{4x^4-b^2}{4x^2} &= a\\ y^2 &= x^2 - a\\ 2xy &= b \end{cases} \iff \begin{cases} 4x^4-b^2 &= 4ax^2\\ y^2 &= x^2 - a\\ 2xy &= b \end{cases}\\ \iff & \begin{cases} 4x^4-4ax^2-b^2 &= 0\\ y^2 &= x^2 - a\\ 2xy &= b \end{cases}\\ \end{align*}

We're looking for the $$x$$ such as $$4x^4 - 4ax^2 - b^2 = 0$$ or if we define $$\lambda = x^2$$ we have $$4 \lambda^2 - 4a\lambda - b^2 = 0$$.

$$\rho = (-4a)^2 - 4 (4) (-b^2) = 16 a^2 + 16 b^2 = 16 (a^2 + b^2)$$

$$\lambda = \frac{4a \pm 4\sqrt{a^2 + b^2}}{8} = \frac{a \pm \sqrt{a^2 + b^2}}{2}$$

Since $$\lambda = x^2$$, we have $$\lambda \geq 0$$ and thus $$\lambda = \frac{a + \sqrt{a^2 + b^2}}{2}$$.

It follows that $$x = \pm\sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}}$$.

Knowing that we deduce the value of $$y$$: $$y = \pm\sqrt{x^2-a} = \pm\sqrt{\frac{a + \sqrt{a^2 + b^2}}{2}-a} = \pm\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}$$.

Also we know that $$2xy = b$$ which explains why both $$x = \pm \ldots$$ and $$y = \pm \ldots$$ only produces 2 solutions instead of 4 (anyway we knew that being complex numbers there were only 2 solutions).

If $$b > 0$$, then $$x$$ and $$y$$ have the same sign and the solutions are $$\left( \sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}} , \sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$ and $$\left(-\sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}},-\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$.

If $$b < 0$$, then $$x$$ and $$y$$ have opposite signs and the solutions are $$\left(\sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}} , -\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$ and $$\left(-\sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}},\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$.

We may conclude that the equation $$(x \pm i y)^2 = a \pm i b\mbox{ with } b \mbox{ positive}$$ has the following solutions: $$\left( \sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}} , \pm\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$ and $$\left(-\sqrt{\frac{\sqrt{a^2 + b^2} + a}{2}},\mp\sqrt{\frac{\sqrt{a^2 + b^2} - a}{2}}\,\right)$$.

• That final formula is wrong. If it was right, then the real part and the imaginary part of any square root of any complex number would have the same sign. Commented Jun 29, 2022 at 21:27
• Yes, it only works if b is positive. I will edit my answer Commented Jun 30, 2022 at 4:55