DigitHelm

Complex Number Calculator | a+bi

Add, subtract, multiply, divide, and apply powers and logs to complex numbers. Shows Argand diagram, polar form, modulus, and step-by-step working.

Angle unit:

PRESETS

z₁ = a + bi

z₂ = c + di

Keyboard: Enter to calculate · Esc to reset

What Is the Complex Number Calculator | a+bi?

This calculator handles ten operations on complex numbers in a + bi form, with complete step-by-step working, polar/Euler form display, and an interactive Argand diagram that auto-scales to your values.

  • Four arithmetic operations, add, subtract, multiply, and divide any two complex numbers, with FOIL working shown for multiplication and conjugate-denominator working for division.
  • Powers via De Moivre's theorem, raise z to any real exponent n without manual FOIL chains. Converts to polar, applies the power, converts back.
  • Square root with both solutions, computes the principal √z and its negation, both shown explicitly.
  • Exponential and natural log, e^z via Euler's formula, ln(z) via the principal branch; both show intermediate values for learning.
  • Conjugate and reciprocal, one-click transforms with proofs shown (z·z̄ = |z|², 1/z = z̄/|z|²).
  • Argand diagram, vectors for z₁, z₂, and the result plotted on auto-scaling axes with a real/imaginary grid.
  • Degrees and radians, toggle angle display between degrees and radians for argument and polar form.

Formula

Rectangular Form

z = a + bi    (a = real part, b = imaginary part, i = √−1)

Arithmetic Operations (z₁ = a+bi, z₂ = c+di)

z₁ + z₂ = (a+c) + (b+d)i

z₁ − z₂ = (a−c) + (b−d)i

z₁ × z₂ = (ac−bd) + (ad+bc)i

z₁ ÷ z₂ = [(ac+bd) + (bc−ad)i] / (c²+d²)

Modulus, Argument & Polar Form

|z| = √(a² + b²)    arg(z) = atan2(b, a)

Polar: z = |z| ∠ θ = |z|(cos θ + i·sin θ)

Euler: z = |z| · e^(iθ)    [Euler's formula]

Powers, Roots & Transcendentals

zⁿ = |z|ⁿ ∠ nθ    [De Moivre's theorem]

√z = √|z| ∠ (θ/2)    [principal root; second: negate]

e^z = eᵃ(cos b + i·sin b)    ln(z) = ln|z| + i·arg(z)

Conjugate: z̄ = a − bi    Reciprocal: 1/z = z̄/|z|²

SymbolNameDescription
z, z₁, z₂Complex numbersVariables; z₁ = a+bi and z₂ = c+di for binary ops
a, cReal partsThe real-number component of each complex number
b, dImaginary partsCoefficients of i; the vertical axis in the complex plane
iImaginary unitDefined by i² = −1; not a real number
|z|Modulus|z| = √(a²+b²), distance from origin in the Argand diagram
arg(z)ArgumentAngle from the positive real axis; atan2(b, a) in radians
Conjugatea − bi; reflects z across the real axis
θAngle (polar)arg(z) in degrees or radians; same value, different unit
nExponentReal number used in the power operation z₁ⁿ via De Moivre

Key Identities

i² = −1    i³ = −i    i⁴ = 1    (cycle of 4)

z · z̄ = |z|²    (always a non-negative real)

e^(iπ) + 1 = 0    (Euler's identity)

cos θ = (e^(iθ) + e^(−iθ))/2    sin θ = (e^(iθ) − e^(−iθ))/(2i)

How to Use

  1. 1
    Set angle unit: Choose degrees or radians for how arguments and polar angles are displayed. The computation is always exact.
  2. 2
    Pick a preset (optional): Click a preset to load a worked example instantly, multiplication, division, Euler's identity, square root, power, or natural log.
  3. 3
    Enter z₁: Type the real part a and imaginary part b. Leave b blank to treat it as 0. Decimals and negatives are accepted.
  4. 4
    Select operation: Choose from the 10 operations: Add, Subtract, Multiply, Divide, Power (z₁ⁿ), Square Root, Exponential, Natural Log, Conjugate, or Reciprocal.
  5. 5
    Enter z₂ or n: For binary operations (add/sub/mul/div) enter z₂. For the power operation, enter exponent n. Other operations use z₁ only.
  6. 6
    Calculate: Press Enter or click Calculate. Results show: rectangular form, polar form, Euler form, modulus, argument, conjugate, and the step-by-step working.
  7. 7
    Read the Argand diagram: The vector diagram shows z₁ (indigo), z₂ (green, binary ops only), and the result (orange) as arrows from the origin.

Example Calculation

Example 1: Multiplication (3+4i) × (1−2i)

z₁ = 3 + 4i, z₂ = 1 − 2i

Step 1: (a+bi)(c+di) = (ac−bd) + (ad+bc)i

Step 2: ac−bd = (3×1) − (4×−2) = 3 + 8 = 11

Step 3: ad+bc = (3×−2) + (4×1) = −6 + 4 = −2

Result: 11 − 2i

Polar: |result| = √(121+4) ≈ 10.630 | arg ≈ −10.62°

Example 2: Division (3+4i) ÷ (1+2i)

Multiply numerator and denominator by z̄₂ = 1−2i

Step 1: Denominator = |z₂|² = 1² + 2² = 5

Step 2: Numerator = (3+4i)(1−2i) = (3+8) + (4−6)i = 11 − 2i

Step 3: Divide: (11−2i) / 5

Result: 2.2 − 0.4i

Example 3: Euler's Identity, e^(iπ)

z₁ = 0 + πi (a = 0, b = π ≈ 3.14159)

e^z = eᵃ · (cos b + i·sin b)

e⁰ = 1

cos(π) = −1, sin(π) = 0

e^(iπ) = −1 + 0i = −1 ✓ (Euler's identity)

Operationz₁z₂ / nResultPolar Form
Add2+3i1−i3+2i3.606 ∠ 33.69°
Multiply3+4i1−2i11−2i10.630 ∠ −10.31°
Divide3+4i1+2i2.2−0.4i2.236 ∠ −10.31°
Power ³1+in=3−2+2i2.828 ∠ 135°
Sqrt−42i2 ∠ 90°
e^z−11 ∠ 180°

Understanding Complex Number | a+bi

The Complex Plane (Argand Diagram)

Every complex number a + bi corresponds to a unique point in the complex plane, also called the Argand diagram, where the horizontal axis represents the real part and the vertical axis the imaginary part. This two-dimensional view transforms abstract algebra into geometry, making otherwise opaque operations visually intuitive.

  • Addition of two complex numbers is identical to vector addition, place the vectors tip to tail.
  • Multiplication by i rotates a point 90° counterclockwise around the origin.
  • Multiplication in general scales by |z₂| and rotates by arg(z₂), a combined scaling and rotation.
  • Division is the inverse: scale by 1/|z₂| and rotate by −arg(z₂).
  • The modulus |z| is simply the length of the vector from the origin to the point (a, b).

Why i² = −1 makes geometric sense

Multiplication by i rotates a vector 90° counterclockwise. Applying that rotation twice gives 180°, which is the same as multiplying by −1. So i × i = −1 is not a strange algebraic rule, it is a geometric statement: two quarter-turns equal a half-turn.

Rectangular vs Polar Form

A complex number can be written in two equivalent forms, each optimised for different operations:

FormNotationBest for
Rectangulara + biAddition, subtraction, reading real/imaginary parts
Polarr ∠ θMultiplication, division, powers, roots
Eulerr·e^(iθ)Calculus, series, Fourier analysis, physics
Trigonometricr(cos θ + i·sin θ)Deriving identities, De Moivre's theorem

Converting between forms: given a + bi, compute r = √(a²+b²) and θ = atan2(b, a). Given r and θ, compute a = r·cos θ and b = r·sin θ.

De Moivre's Theorem and Complex Powers

De Moivre's theorem states that (cos θ + i·sin θ)ⁿ = cos(nθ) + i·sin(nθ), which extends to any complex number: zⁿ = |z|ⁿ ∠ nθ. This makes computing high powers trivial, even (1+i)¹⁰⁰ is computed in three steps rather than 99 multiplications.

  • Convert z to polar: r = |z|, θ = arg(z).
  • Apply the power: rⁿ ∠ nθ.
  • Convert back to rectangular: (rⁿ cos nθ) + (rⁿ sin nθ)i.

For fractional n, De Moivre's theorem gives the nth roots of a complex number. There are always exactly n distinct nth roots, equally spaced by 2π/n radians around the origin.

Euler's Formula, The Bridge Between Exponentials and Trigonometry

Euler's formula e^(iθ) = cos θ + i·sin θ is one of the most celebrated results in mathematics. It shows that the complex exponential function traces a circle of radius 1 in the complex plane as θ varies. Setting θ = π gives Euler's identity: e^(iπ) + 1 = 0, connecting five fundamental constants with three basic operations.

For a general complex number z = a + bi:

e^z = e^(a+bi) = eᵃ · e^(bi) = eᵃ(cos b + i·sin b)

The real part eᵃ scales the result; the imaginary part b determines the rotation angle.

The inverse, the complex natural logarithm, is multivalued. The principal branch ln(z) = ln|z| + i·arg(z) uses arg(z) ∈ (−π, π]. This calculator always returns the principal branch.

Division by Conjugate, Why It Works

Dividing complex numbers looks difficult because i appears in the denominator. The trick is to multiply both numerator and denominator by the conjugate z̄₂ = c − di:

z₁/z₂ = (z₁ × z̄₂) / (z₂ × z̄₂) = (z₁ × z̄₂) / |z₂|²

Since z₂ × z̄₂ = c² + d², the denominator is always a real number.

This technique, multiplying by the conjugate, appears throughout complex analysis and also in rationalising surds in real arithmetic.

Real-World Applications

FieldHow complex numbers are usedKey operation
Electrical engineeringImpedance Z = R + jX in AC circuits; phasorsAdd, multiply, divide
Signal processingFourier transforms decompose signals into complex exponentialsMultiply, e^z
Quantum mechanicsWave functions ψ are complex-valued; probability = |ψ|²Modulus squared
Control theoryLaplace transform poles in the complex s-plane determine stabilityArg, modulus
Fluid dynamicsConformal mapping transforms flow around complex shapesPowers, ln
Computer graphicsMandelbrot set: iterate z → z² + c; colour by escape timePower, modulus
NavigationRotations in 2D encoded as multiplication by unit complex numbersMultiply
Structural engineeringVibration analysis uses complex eigenvalues for dampingSqrt, divide

Frequently Asked Questions

What is a complex number and why does i = √(−1)?

A complex number a + bi combines a real number a with an imaginary number bi. The imaginary unit i is defined by the equation i² = −1.

No real number satisfies x² = −1, but we can define a new type of number that does:

  • i¹ = i, i² = −1, i³ = −i, i⁴ = 1 , then the cycle repeats.
  • Geometrically, multiplying by i rotates a point 90° counterclockwise in the complex plane.
  • Two 90° rotations = 180° rotation = multiplication by −1, confirming i × i = −1.
  • Complex numbers are not imaginary in the colloquial sense, they are necessary for solving all polynomial equations and appear throughout physics and engineering.

How do you multiply two complex numbers?

Use FOIL (First, Outer, Inner, Last) just like multiplying binomials, then replace i² with −1:

(a+bi)(c+di) = ac + adi + bci + bdi²

= ac + (ad+bc)i + bd(−1)

= (ac−bd) + (ad+bc)i

Geometrically, multiplication:

  • Multiplies the moduli: |z₁ × z₂| = |z₁| × |z₂|
  • Adds the arguments: arg(z₁ × z₂) = arg(z₁) + arg(z₂)

This geometric view is why multiplication by i (which has |i| = 1 and arg(i) = 90°) is a 90° rotation.

How do you divide complex numbers?

Multiply numerator and denominator by the conjugate of the denominator to eliminate i from the bottom:

  • Find the conjugate of z₂: z̄₂ = c − di.
  • Multiply: (z₁/z₂) × (z̄₂/z̄₂), this does not change the value since z̄₂/z̄₂ = 1.
  • Denominator becomes z₂ · z̄₂ = c² + d², which is real.
  • Numerator: z₁ · z̄₂ = (ac+bd) + (bc−ad)i.
  • Divide real and imaginary parts separately by (c² + d²).

Geometrically, division divides the moduli and subtracts the arguments.

What is the modulus and how is it different from the absolute value?

The modulus |z| = √(a² + b²) is the distance from the origin to the point (a, b) in the complex plane. It directly generalises absolute value:

  • For a real number (b = 0): |a+0i| = |a|, the ordinary absolute value.
  • For a purely imaginary number (a = 0): |0+bi| = |b|.
  • For a general complex number: the Pythagorean distance √(a²+b²).
  • |z| is always a non-negative real number.
  • Key property: |z₁ · z₂| = |z₁| · |z₂|, making the modulus a multiplicative norm.

In physics, |ψ|² for a quantum wave function ψ gives the probability density.

What is Euler's formula and why is it important?

Euler's formula states: e^(iθ) = cos θ + i·sin θ. It connects three seemingly unrelated branches of mathematics: exponential functions, trigonometry, and complex numbers.

  • Setting θ = π: e^(iπ) = cos(π) + i·sin(π) = −1, giving Euler's identity e^(iπ) + 1 = 0.
  • It makes multiplication of complex numbers equivalent to adding angles and multiplying lengths.
  • The entire theory of Fourier analysis rests on Euler's formula, signals decompose into complex exponentials.
  • In quantum mechanics, wave functions evolve as e^(−iEt/ℏ), a direct application.
  • Deriving sin and cos addition formulas becomes as simple as multiplying two exponentials.

For computation: e^(a+bi) = eᵃ · (cos b + i·sin b), where b must be in radians.

What is De Moivre's theorem and when should I use it?

De Moivre's theorem: (cos θ + i·sin θ)ⁿ = cos(nθ) + i·sin(nθ). More generally for any complex number z: zⁿ = |z|ⁿ ∠ nθ.

Use it when:

  • Computing high powers like (1+i)^20, far easier than repeated multiplication.
  • Finding all nth roots of a complex number (there are always n distinct roots).
  • Deriving multiple-angle trigonometric identities (e.g. cos 3θ in terms of cos θ).
  • Solving equations of the form zⁿ = w in the complex plane.

The nth roots are spaced evenly at 2π/n radians apart around a circle of radius |z|^(1/n). The calculator returns the principal root; to find all n roots, add k·(360°/n) for k = 0, 1, …, n−1.

What is a complex conjugate and why is it useful?

The conjugate of z = a + bi is z̄ = a − bi, you simply negate the imaginary part. Key properties:

  • z · z̄ = a² + b² = |z|², always a non-negative real number. This is the key to division.
  • z + z̄ = 2a, twice the real part.
  • z − z̄ = 2bi, twice the imaginary part.
  • |z̄| = |z|, the conjugate has the same modulus.
  • arg(z̄) = −arg(z), the conjugate reflects z across the real axis.
  • Complex roots of real polynomials always come in conjugate pairs: if z is a root, so is z̄.

In electrical engineering, the conjugate is used to compute power and to impedance-match circuits for maximum power transfer (the conjugate matching condition).

Does the calculator save my inputs automatically?

Yes, all inputs are saved to your browser's localStorage after each calculation:

  • The real parts a, c and imaginary parts b, d are saved.
  • The selected operation, angle unit (degrees/radians), and power exponent n are saved.
  • Data stays entirely in your browser, nothing is sent to any server.
  • Your inputs are restored automatically the next time you visit the page.

Click Reset or press Esc to clear all fields and delete the saved data.

Related Calculators