Mathematics · Calculus · Complex Analysis
Complex Number Calculator
Performs arithmetic operations on complex numbers including addition, subtraction, multiplication, division, modulus, argument, and polar form conversion.
Calculator
Formula
z₁ = a + bi and z₂ = c + di are complex numbers where a, c are the real parts and b, d are the imaginary parts. Addition and subtraction combine real and imaginary parts separately. Multiplication uses the distributive property with i² = −1. Division multiplies numerator and denominator by the conjugate of z₂. The modulus |z₁| gives the distance from the origin in the complex plane. The argument arg(z₁) is the angle θ (in radians or degrees) measured from the positive real axis, computed using the four-quadrant arctangent (atan2).
Source: Churchill & Brown, Complex Variables and Applications, 9th Ed. McGraw-Hill; NIST Digital Library of Mathematical Functions §1.9.
How it works
A complex number z = a + bi consists of a real part a and an imaginary part b, where i is the imaginary unit satisfying i² = −1. In the complex plane (Argand diagram), the real part is plotted on the horizontal axis and the imaginary part on the vertical axis. Every complex number therefore corresponds to a unique point — or equivalently a vector — in this two-dimensional plane. This geometric interpretation is essential for understanding phase relationships in engineering and the behaviour of complex functions in mathematics.
Arithmetic operations follow directly from the algebraic definition. Addition and subtraction combine real and imaginary components separately, behaving exactly like two-dimensional vector addition. Multiplication uses the FOIL (First, Outer, Inner, Last) method with the substitution i² = −1, yielding the formula (a + bi)(c + di) = (ac − bd) + (ad + bc)i. Division is performed by multiplying both numerator and denominator by the complex conjugate of the denominator — c − di — which eliminates the imaginary part of the denominator and produces a standard a + bi result. The modulus |z| = √(a² + b²) gives the Euclidean distance from the origin, and the argument arg(z) = atan2(b, a) gives the angle in the range (−180°, 180°]. Together, modulus and argument define the polar form z = r(cos θ + i sin θ) = re^(iθ), which is indispensable for multiplication, division, and power operations via De Moivre's theorem.
Practical applications of complex arithmetic span every quantitative discipline. In electrical engineering, impedance is represented as Z = R + jX (using j for the imaginary unit), and circuit analysis requires all four arithmetic operations. In control systems, the positions of poles and zeros in the complex plane determine system stability. In quantum mechanics, the wave function is complex-valued and the modulus squared gives probability density. Signal processing uses the Fast Fourier Transform, which decomposes a signal into complex exponentials. Even in finance, complex numbers appear in certain options pricing models and in the characteristic functions of probability distributions.
Worked example
Example: Multiply z₁ = 3 + 4i by z₂ = 1 − 2i
Step 1 — Apply the multiplication formula:
(a + bi)(c + di) = (ac − bd) + (ad + bc)i
Real part: ac − bd = (3)(1) − (4)(−2) = 3 + 8 = 11
Imaginary part: ad + bc = (3)(−2) + (4)(1) = −6 + 4 = −2
Result: z₁ × z₂ = 11 − 2i
Step 2 — Compute |z₁|:
|z₁| = √(3² + 4²) = √(9 + 16) = √25 = 5
Step 3 — Compute arg(z₁):
arg(z₁) = atan2(4, 3) = arctan(4/3) ≈ 53.13°
Step 4 — Compute |z₂|:
|z₂| = √(1² + (−2)²) = √(1 + 4) = √5 ≈ 2.2361
Step 5 — Verify using polar multiplication:
|z₁ × z₂| = |z₁| × |z₂| = 5 × √5 = √125 ≈ 11.180
Check: |11 − 2i| = √(121 + 4) = √125 ≈ 11.180 ✓
arg(z₁ × z₂) = arg(z₁) + arg(z₂) = 53.13° + (−63.43°) = −10.30°
Check: atan2(−2, 11) ≈ −10.30° ✓
Limitations & notes
Division by zero occurs when z₂ = 0 + 0i (i.e., c = d = 0); the calculator returns NaN in this case and the result is mathematically undefined. The argument (angle) of the complex number z = 0 + 0i is also undefined, as the origin has no direction. The argument is returned in the principal value range (−180°, 180°], following the atan2 convention; if you require a different branch cut, you must adjust the result manually. Floating-point arithmetic may introduce small rounding errors — particularly in division results — at around 15–16 significant digits of precision (IEEE 754 double precision). For symbolic or exact computation with irrational numbers, a computer algebra system such as SymPy or Mathematica is recommended. This calculator performs single-step operations; for chains of operations (e.g., computing (z₁ × z₂) + z₃), perform calculations sequentially using the previous result as the next input.
Frequently asked questions
What is the imaginary unit i and why does i² = −1?
The imaginary unit i is defined as the square root of −1, written i = √(−1). This definition extends the real number system to allow the square roots of negative numbers. The rule i² = −1 follows directly from this definition and is the single algebraic identity that governs all complex arithmetic. It is not a physical impossibility — it is a consistent mathematical construction, just as negative numbers extend the counting numbers.
What is the difference between modulus and argument of a complex number?
The modulus |z| is the magnitude or absolute value of the complex number — its distance from the origin in the complex plane, calculated as √(a² + b²). The argument arg(z) is the angle that the line from the origin to the point makes with the positive real axis, measured in degrees or radians. Together they define the polar representation z = r·e^(iθ), where r = |z| and θ = arg(z). The modulus tells you 'how big' the number is, and the argument tells you 'which direction' it points.
Why do we multiply by the conjugate when dividing complex numbers?
To divide z₁ / z₂, we need to eliminate the imaginary part from the denominator so the result is in standard a + bi form. Multiplying the denominator z₂ = c + di by its conjugate z̄₂ = c − di gives (c + di)(c − di) = c² + d², which is a real number. Multiplying both numerator and denominator by the same conjugate is equivalent to multiplying by 1, so the value of the fraction is unchanged. The conjugate is the key tool that converts complex division into straightforward real arithmetic.
How do complex numbers relate to AC circuit analysis?
In AC electrical engineering, voltage and current oscillate sinusoidally and can be represented as complex phasors V = V₀·e^(iωt). Resistance R is a real impedance, capacitive reactance X_C = −1/(ωC) is purely imaginary-negative, and inductive reactance X_L = ωL is purely imaginary-positive. Total impedance is Z = R + j(X_L − X_C) as a complex number. Ohm's law V = IZ, Kirchhoff's laws, and power calculations all work seamlessly with complex arithmetic, making complex numbers the natural language of AC circuit analysis.
What is De Moivre's theorem and when is polar form more useful?
De Moivre's theorem states that (r·e^(iθ))^n = r^n · e^(inθ), meaning to raise a complex number to a power n, you raise the modulus to the power n and multiply the argument by n. This is dramatically simpler than repeated multiplication in rectangular form. Polar form is superior whenever you need to multiply, divide, or raise complex numbers to powers — since multiplication becomes r₁r₂ and θ₁ + θ₂. Rectangular form is more convenient for addition and subtraction.
Last updated: 2025-01-15 · Formula verified against primary sources.