The square root of a complex number a + bi is another complex number x + yi such that (x + yi)² = a + bi. For any non-zero complex number there are exactly two square roots, which are negatives of each other, just like with real numbers. This calculator finds both roots using the standard algebraic formula, taking the real part a and imaginary part b as inputs.
Formula
For a complex number z = a + bi, where a and b are real numbers and i² = −1, the two square roots are given by:
x + yi = ± ( √((|z| + a)/2) + sign(b) · √((|z| − a)/2) · i )
Here |z| = √(a² + b²) is the modulus (magnitude) of the complex number. The sign function sign(b) is +1 when b ≥ 0 and −1 when b < 0. The variables a and b are the real and imaginary parts you input, and they can be any real numbers, positive, negative, or zero. The output x + yi is the principal square root when b ≥ 0, and its negative is the other root.
Worked Example
Take the default input: a = 3, b = 4, so z = 3 + 4i.
- Compute the modulus: |z| = √(3² + 4²) = √(9 + 16) = √25 = 5.
- Compute the real part of the root: √((5 + 3)/2) = √(8/2) = √4 = 2.
- Compute the imaginary part of the root: √((5 − 3)/2) = √(2/2) = √1 = 1.
- Since b = 4 ≥ 0, the sign is +1, so the first root is 2 + 1i.
- The second root is the negative: −2 − 1i.
Check: (2 + i)² = 4 + 4i + i² = 4 + 4i − 1 = 3 + 4i. Correct. The calculator shows the first root as 2 + 1i (rounded to 4 decimals), the second as −2 − 1i, and the modulus as 5.
Why Complex Square Roots Matter
Square roots of complex numbers appear whenever you solve quadratic equations with negative discriminants, analyze alternating current circuits with reactive components, or work with Fourier transforms and signal processing. In engineering, the impedance of a series RLC circuit at resonance involves complex square roots. In mathematics, they are essential for finding roots of polynomials, solving differential equations with complex characteristic roots, and understanding the fundamental theorem of algebra, which guarantees every non-constant polynomial has at least one complex root. Even if you rarely compute them by hand, knowing the formula helps you understand why a quadratic like x² + 1 = 0 has solutions ±i, and why equations that look unsolvable in real numbers always have answers in the complex plane.
How to Choose Between the Two Roots
The two square roots are always negatives of each other, so choosing one is a matter of context. In many applications, the principal square root is defined as the one with a non-negative real part, which is what the calculator returns as the first output when b ≥ 0. When b < 0, some conventions flip the sign to keep the real part non-negative, but the calculator uses the formula above consistently. In physics, you might choose the root that gives a positive real part for a decaying exponential, or the one that matches a positive frequency. In geometry, if you are finding the rotation that squares to a given rotation, both roots correspond to rotating by half the angle and half the angle plus 180°. Always check your problem statement: if it asks for “the” square root, it usually means the principal one, but if it asks for all solutions, include both.
Common Mistakes and Misconceptions
- Forgetting the second root: Every non-zero complex number has two square roots. If you only write one, you miss half the solutions to equations.
- Applying real-number rules to imaginary parts: √(a·b) = √a·√b only works when both are non-negative real numbers. For complex numbers, this rule fails because √(−1)·√(−1) = i·i = −1, not √1 = 1.
- Sign of the imaginary part: If b is negative, the imaginary part of the principal root is negative. A common error is to always take the positive square root of the imaginary component, which gives the wrong root when b < 0.
- Mixing up modulus and real part: The formula uses (|z| + a)/2 and (|z| − a)/2. Swapping these gives the wrong real and imaginary parts.
- Rounding too early: If you round the modulus before computing the roots, small errors can compound. Keep full precision until the final step.
Alternative Methods: Polar Form
An alternative and often simpler method uses polar (trigonometric) form. Write z = r(cos θ + i sin θ), where r = |z| and θ = atan2(b, a) is the argument in radians. Then the square roots are:
√z = ± √r (cos(θ/2) + i sin(θ/2))
This is De Moivre’s formula applied to the power 1/2. It is often easier to visualize: you take the square root of the distance from the origin and halve the angle. For example, z = 3 + 4i has r = 5 and θ ≈ 0.9273 radians. Then √5 ≈ 2.236, and cos(0.4636) ≈ 0.8944, sin(0.4636) ≈ 0.4472, giving 2.236·(0.8944 + 0.4472i) ≈ 2 + i, the same result. The polar method is especially useful when the argument is a nice fraction of π, like 45° or 60°, because the half-angle is then exact.
Limits of the Formula
The algebraic formula works for every complex number, including purely real (b = 0) and purely imaginary (a = 0) inputs. When b = 0 and a ≥ 0, the formula reduces to the familiar real square root ±√a. When b = 0 and a < 0, it gives ±√(−a)·i, which are purely imaginary. The only edge case is z = 0, where the formula gives a single root 0 (since both roots coincide). The calculator handles this naturally because √((0+0)/2) = 0. There is no branch cut issue in the algebraic form because the modulus is always non-negative and the square roots inside are of non-negative real numbers. For extremely large inputs (beyond about 10¹⁵⁴), floating-point overflow can occur, but for all practical engineering and mathematical values the formula is stable.
Frequently Asked Questions
Can the square root of a negative real number be a complex number? Yes. For example, √(−4) = 2i and −2i, because (2i)² = 4i² = −4. In general, √(−a) for a > 0 is ±√a·i.
Why does a complex number have two square roots but a positive real number also has two? Every non-zero complex number has exactly two square roots because the equation x² = z is a degree-2 polynomial, and the fundamental theorem of algebra guarantees two roots (counting multiplicity). For positive reals, those roots are ±√a, which are real. For negative reals, they are ±√a·i, which are imaginary.
What is the principal square root of a complex number? The principal square root is the one with a non-negative real part. If both roots have the same real part (which happens only when z is a negative real number), the principal root is the one with a non-negative imaginary part. This convention matches the calculator’s first output for b ≥ 0.
How do I compute the square root on a scientific calculator? Most scientific calculators only handle real square roots. For complex numbers, you can convert to polar form using the r∠θ notation, take the square root of r, halve θ, and convert back. Some graphing calculators have a built-in complex square root function that does this automatically.
Is the square root of a complex number unique in the complex plane? No, it is two-valued. The two roots are symmetric about the origin: if one root is at angle θ/2, the other is at θ/2 + π, which is the same as the negative of the first. This symmetry is why the roots are always negatives of each other.
Can I use the quadratic formula with complex coefficients? Yes. The quadratic formula x = (−b ± √(b² − 4ac))/(2a) works for complex coefficients a, b, c, as long as you interpret the square root as a complex square root. The two ± signs give the two solutions, which may be complex even when the coefficients are real.
Related
Formula used
in a | Real part (a) | - | 3 | -100000 | 100000 in b | Imaginary part (b) | - | 4 | -100000 | 100000 out r1 | First root (x+yi) | - | sqrt((sqrt(a^2+b^2)+a)/2) + sqrt((sqrt(a^2+b^2)-a)/2) * (b>=0?1:-1) * i | 4 out r2 | Second root (x+yi) | - | -(sqrt((sqrt(a^2+b^2)+a)/2)) - sqrt((sqrt(a^2+b^2)-a)/2) * (b>=0?1:-1) * i | 4 out mod | Modulus | - | sqrt(a^2+b^2) | 4
Each line is one input (in, sel, list) or one result (out: label, unit, formula, decimals). How the calculators work
Method: the standard formula for this calculation, rounded as each result states. See how the calculators work or report an error.
- Day of Year Number: How to Find It74
- Days Left in Year: Countdown & How to Calculate
- Days Between Dates Calculator: How It Works
- D&D What Are Days? In-Game Time Explained168 h
- Lease Years Remaining Calculator87.00 years
- Bank Holidays UK Remaining This Year66