Skip to content
Tutorials Center
My learning

Topics

Lesson 28 of 38 · Complex Numbers and Conic Sections

Complex Numbers

Meet the imaginary unit i, add, subtract, multiply and divide complex numbers, use conjugates and modulus, and plot them on the complex plane.

No real number squares to -1, so the equation x² = -1 has no real solution. Mathematicians fixed that by inventing a new number, i, defined by

Text
i² = -1     (i = √-1)

Numbers built with i are called complex numbers. They are not "imaginary" in the sense of useless: they power electrical engineering, signal processing, quantum physics and computer graphics.

The form a + bi

A complex number is written z = a + bi, where a and b are real numbers. a is the real part and b the imaginary part. If b = 0 the number is real; if a = 0 it is pure imaginary. So every real number is also complex.

Powers of i repeat in a cycle of four:

Text
i¹ = i,  i² = -1,  i³ = -i,  i⁴ = 1,  then it repeats

To compute i^n, divide n by 4 and use the remainder. i^27: 27 = 4·6 + 3, so i^27 = i³ = -i.

Square roots of negatives: √-9 = 3i, and √-12 = 2i√3.

Arithmetic

Add and subtract the real and imaginary parts separately:

Text
(3 + 2i) + (1 - 5i) = 4 - 3i
(3 + 2i) - (1 - 5i) = 2 + 7i

Multiply by FOIL, then replace i² by -1:

Text
(3 + 2i)(1 - 5i) = 3 - 15i + 2i - 10i² = 3 - 13i + 10 = 13 - 13i

Conjugates and division

The conjugate of a + bi is a - bi. A number times its conjugate is real:

Text
(a + bi)(a - bi) = a² + b²

To divide, multiply numerator and denominator by the conjugate of the denominator, just like rationalizing a radical:

Text
(2 + 3i) / (1 - 2i) = (2 + 3i)(1 + 2i) / ((1 - 2i)(1 + 2i))
                    = (2 + 4i + 3i + 6i²) / 5
                    = (-4 + 7i) / 5

so the quotient is -4/5 + (7/5)i.

Modulus and the complex plane

Plot a + bi as the point (a, b). The horizontal axis holds real parts, the vertical axis holds imaginary parts. The modulus (absolute value) is the distance from the origin:

Text
|a + bi| = √(a² + b²)

For 3 + 4i that is √25 = 5. Adding complex numbers adds the arrows like vectors; multiplying by i rotates a point 90° counterclockwise.

Complex numbers cannot be put in order with < and > the way real numbers can. You can compare their moduli, which are real.

A small complex-number calculator

Python has built-in complex numbers (it writes the imaginary unit as j). We first build the rules by hand, then compare.

Python Complex arithmetic from scratch

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Plot complex numbers

Python Multiplying by i rotates 90 degrees

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is (2 + 3i)(1 - i)?

    2 - 2i + 3i - 3i² = 2 + i + 3 = 5 + i.
  2. 2. What is i^27?

    27 = 4·6 + 3, so i^27 = i³ = -i.
  3. 3. What is the conjugate of 4 - 7i?

    The conjugate keeps the real part and flips the sign of the imaginary part.
  4. 4. What is |5 - 12i|?

    √(25 + 144) = √169 = 13.

Summary

  • i² = -1; a complex number is a + bi; powers of i cycle with period 4.
  • Add and subtract part by part, multiply by FOIL and replace i² with -1.
  • Divide by multiplying by the conjugate; (a + bi)(a - bi) = a² + b².
  • |a + bi| = √(a² + b²); multiplying by i rotates by 90°.

Next: Complex Solutions of Quadratic Equations