Complex numbers

The imaginary unit i² = −1, the algebraic form and operations, the conjugate, modulus and argument, trigonometric and exponential forms, Euler's formula, De Moivre's formula, roots of unity and quadratics with a negative discriminant.

  • University
  • 30 min
  • 10 questions
  • Lesson 89 of 92

In this lesson you will learn

  • Add, multiply and divide complex numbers in algebraic form
  • Convert between the algebraic, trigonometric and exponential forms
  • Compute powers and n-th roots with De Moivre's formula
  • Solve quadratic equations with a negative discriminant

In the lesson on quadratic equations a negative discriminant meant “no roots”: x² + 1 = 0 has no real solution, because no real square is negative. In the 16th century Italian mathematicians, Cardano and Bombelli among them, noticed that the formulas for cubic equations sometimes pass through square roots of negative numbers even when the final answer is an ordinary real number. They decided to calculate with such numbers anyway, and today complex numbers are an everyday tool in electrical engineering, signal processing, control theory and quantum physics.

The imaginary unit and the algebraic form

Imaginary unitDefinition

The number i with i² = −1. A complex number is an expression z = a + bi with real a and b; the set of all complex numbers is denoted ℂ.

z = a + b · ii² = −1

Where

a = Re z
the real part
b = Im z
the imaginary part (a real number, without i!)
i
the imaginary unit

Real numbers are the complex numbers with b = 0; numbers with a = 0, such as 3i, are called purely imaginary. Two complex numbers are equal only when both their real parts and their imaginary parts are equal. Unlike real numbers, complex numbers cannot be ordered: an inequality such as 2 + i < 3 has no meaning.

Sign up free to keep reading

The rest of the lesson, the quiz and your notes open with an Educora account. Signing up takes a minute, and your progress is saved on all your devices.

Operations and the conjugate

Complex numbers are added and subtracted part by part, and multiplied like ordinary brackets, replacing i² with −1:

(a + bi) + (c + di) = (a + c) + (b + d)i(a + bi)(c + di) = (ac − bd) + (ad + bc)i

Where

a, b, c, d
real numbers
−bd
comes from bi · di = bd · i² = −bd
z̄ = a − biz · z̄ = a² + b²

Where

z̄
the conjugate of z = a + bi: the sign of the imaginary part changes
a² + b²
always a non-negative real number

In the plane, the conjugate is the mirror image of z in the real axis.

(a + bi) / (c + di) = (a + bi)(c − di) / (c² + d²)(a + bi) / (c + di) = (a + bi)(c − di) / (c² + d²)

Where

c − di
the conjugate of the denominator
c² + d²
a real denominator, which must be non-zero

To divide, multiply the numerator and the denominator by the conjugate of the denominator: the i disappears from the denominator.

Geometrically, adding complex numbers means adding vectors (the parallelogram rule), and |z₁ − z₂| is the distance between the points z₁ and z₂. For example, |z − 2| = 1 describes the circle of radius 1 centred at the point 2. In this way complex numbers turn plane geometry into algebra.

Four operations

Problem

z₁ = 3 + 2i, z₂ = 1 − 4i. Find z₁ + z₂, z₁ − z₂, z₁z₂ and z₁/z₂.

Show solutionHide solution

Solution

z₁ + z₂ = (3 + 1) + (2 − 4)i = 4 − 2i.
z₁ − z₂ = (3 − 1) + (2 + 4)i = 2 + 6i.
z₁z₂ = 3 − 12i + 2i − 8i² = 3 − 10i + 8 = 11 − 10i.
z₁/z₂ = (3 + 2i)(1 + 4i) / (1² + 4²) = (3 + 12i + 2i + 8i²)/17 = (−5 + 14i)/17 = −5/17 + (14/17)i.
Check: z₂ · (−5 + 14i)/17 = (−5 + 14i + 20i − 56i²)/17 = (51 + 34i)/17 = 3 + 2i ✓.

Modulus, argument, trigonometric and exponential form

Draw z = a + bi as the point (a, b) of the complex plane: the horizontal axis is real and the vertical axis is imaginary. The distance from the origin is the modulus r = |z|, and the angle measured from the positive real axis is the argument φ = arg z. Then a = r cos φ and b = r sin φ.

r = |z| = √(a² + b²)cos φ = a / rsin φ = b / rr = |z| = √(a² + b²)cos φ = a / rsin φ = b / r

Where

r
the modulus: the distance from 0 to z
φ
the argument (an angle), usually −π < φ ≤ π
a, b
the real and imaginary parts
z = r(cos φ + i sin φ) = r · e^(iφ)

Where

r(cos φ + i sin φ)
the trigonometric form
r · e^(iφ)
the exponential form
e^(iφ) = cos φ + i sin φ

Where

e
the base of the natural logarithm, e ≈ 2.718
φ
an angle in radians

Euler's formula. It follows from the power series of eˣ, cos x and sin x: substitute x = iφ into eˣ = 1 + x + x²/2! + x³/3! + … and group the real and the imaginary terms; you get exactly the series of cos φ and of i sin φ.

Interactive

Loading simulation…
e^(iφ) is the point of the unit circle at the angle φ: its real part is cos φ and its imaginary part is sin φ. Drag the angle and read off e^(iφ).
z₁ · z₂ = r₁r₂ · e^(i(φ₁ + φ₂))z₁ / z₂ = (r₁ / r₂) · e^(i(φ₁ − φ₂))z₁ · z₂ = r₁r₂ · e^(i(φ₁ + φ₂))z₁ / z₂ = (r₁ / r₂) · e^(i(φ₁ − φ₂))

Where

r₁, r₂
the moduli
φ₁, φ₂
the arguments

Multiplying means multiplying the moduli and adding the angles: multiplication by i is a rotation by 90°.

From algebraic to exponential form

Problem

Write z = 1 + i√3 and w = −1 − i in trigonometric and exponential form.

Show solutionHide solution

Solution

z: r = √(1² + (√3)²) = √4 = 2; cos φ = 1/2, sin φ = √3/2 ⇒ φ = π/3 (60°).
z = 2(cos 60° + i sin 60°) = 2e^(iπ/3).
w: r = √(1 + 1) = √2; cos φ = −1/√2, sin φ = −1/√2: both are negative, so φ is in the third quadrant, φ = −3π/4 (−135°).
w = √2(cos(−135°) + i sin(−135°)) = √2 · e^(−3iπ/4).

De Moivre's formula and roots

[r(cos φ + i sin φ)]ⁿ = rⁿ(cos nφ + i sin nφ)

Where

n
an integer
rⁿ
the modulus of the power
nφ
the argument of the power

De Moivre's formula follows from (e^(iφ))ⁿ = e^(inφ). With n = 2 it gives the double-angle formulas at once: (cos φ + i sin φ)² = cos²φ − sin²φ + 2i sin φ cos φ, so cos 2φ = cos²φ − sin²φ and sin 2φ = 2 sin φ cos φ.

(1 + i)¹⁰ in three lines

Problem

Compute (1 + i)¹⁰.

Show solutionHide solution

Solution

1 + i: r = √2, φ = π/4 (45°).
(1 + i)¹⁰ = (√2)¹⁰ · (cos(10·45°) + i sin(10·45°)) = 32 · (cos 450° + i sin 450°).
450° = 360° + 90°, so cos 450° = 0 and sin 450° = 1 ⇒ (1 + i)¹⁰ = 32i.
Multiplying out ten brackets would take far longer.
wₖ = ⁿ√r · e^(i·(φ + 2πk)/n), k = 0, 1, …, n − 1

Where

wₖ
the n-th roots of z = r·e^(iφ)
ⁿ√r
the ordinary real root of the modulus
k
the number of the root

A non-zero complex number has exactly n different n-th roots; they are the vertices of a regular n-gon centred at 0.

The solutions of zⁿ = 1 are the n-th roots of unity e^(2πik/n). For n = 3 they are 1 and −1/2 ± (√3/2)i; for n = 4 they are 1, i, −1 and −i. For n ≥ 2 they add up to 0, because the regular polygon is balanced around the origin. Roots of unity are the heart of the fast Fourier transform used in audio and image processing.

Solving z³ = 8

Problem

Find all complex solutions of z³ = 8.

Show solutionHide solution

Solution

8 = 8e^(i·0), so r = 8, φ = 0 and ∛8 = 2.
Arguments: (0 + 2πk)/3 = 0°, 120°, 240° for k = 0, 1, 2.
w₀ = 2, w₁ = 2(cos 120° + i sin 120°) = −1 + i√3, w₂ = 2(cos 240° + i sin 240°) = −1 − i√3.
Check: (−1 + i√3)³ = (2e^(i·2π/3))³ = 8e^(i·2π) = 8 ✓. The three roots form an equilateral triangle.

Quadratics with a negative discriminant

x = (−b ± i√(−D)) / (2a)D = b² − 4ac < 0x = (−b ± i√(−D)) / (2a)D = b² − 4ac < 0

Where

a, b, c
the real coefficients of ax² + bx + c = 0
D
the discriminant
√(−D)
an ordinary square root of a positive number

A quadratic with D < 0

Problem

Solve x² − 4x + 13 = 0.

Show solutionHide solution

Solution

D = (−4)² − 4·1·13 = 16 − 52 = −36 < 0, √(−D) = 6.
x = (4 ± 6i)/2 = 2 ± 3i.
Check for 2 + 3i: (2 + 3i)² − 4(2 + 3i) + 13 = (4 + 12i − 9) − 8 − 12i + 13 = 0 ✓.
The roots are conjugates: their sum is 4 = −b/a and their product is (2 + 3i)(2 − 3i) = 4 + 9 = 13 = c/a, just as Vieta's formulas say.

Interactive

Loading simulation…
y = x² − 4x + c. For c > 4 the parabola does not meet the x-axis: D = 16 − 4c < 0, and the roots are the complex numbers 2 ± i√(c − 4).

A polynomial with real coefficients has its non-real roots in conjugate pairs a ± bi. And by the fundamental theorem of algebra, every polynomial of degree n ≥ 1 has exactly n complex roots counted with multiplicity: in ℂ every polynomial equation can be solved.

Python
import cmath

z1, z2 = 3 + 2j, 1 - 4j
print(z1 * z2)
print(z1 / z2)
print((1 + 1j) ** 10)
print(cmath.polar(1 + 1j))
print(cmath.exp(1j * cmath.pi) + 1)
Expected output
(11-10j)
(-0.29411764705882354+0.8235294117647058j)
32j
(1.4142135623730951, 0.7853981633974483)
1.2246467991473532e-16j
Python has complex numbers built in (the imaginary unit is written j). polar returns the pair (r, φ): √2 and π/4. The last line gives 1.2 · 10⁻¹⁶i instead of 0: e^(iπ) + 1 = 0 holds exactly, but π inside the computer is rounded.

Remember

  • i² = −1; z = a + bi with a = Re z and b = Im z; powers of i repeat every 4 steps.
  • Multiply like brackets with i² = −1; to divide, multiply by the conjugate of the denominator; z·z̄ = a² + b².
  • |z| = √(a² + b²); find φ from cos φ = a/r and sin φ = b/r, watching the quadrant.
  • Euler: e^(iφ) = cos φ + i sin φ, so z = r·e^(iφ); multiplication multiplies moduli and adds angles.
  • De Moivre: (r·e^(iφ))ⁿ = rⁿ·e^(inφ); zⁿ = w has n roots lying on a circle.
  • When D < 0, x = (−b ± i√(−D))/(2a): a pair of conjugate roots.
Spotted a mistake or something inaccurate in this lesson?

Check yourself

10 questions. Every correct answer earns XP.

Question 1 / 10

Question 1 / 10. What is i²⁰²⁷?